(3707,170,0.19,'smarty','0','added content',1117259162,16,'128.187.0.164','<h1 class=\"withBG\">Solution</h1>\r\n\r\n<p>Jeff Rebleski, benefits expert and sales\r\nteam leader at Blue Cross Blue Shield of\r\nMichigan said <i>What I do see on the horizon\r\nis a massive push among employers to\r\nshift more costs to employees. When this\r\ncost shifting occurs on a large scale,\r\nhealth promotion and wellness will be\r\nuniquely poised to play a major role in a\r\nnew type of system. Beating Healthcare Costs is\r\nit really possible, wellness councils of America, interview\r\n2004.</i></p>\r\n\r\n<p>Your company needs a unique strategy that\r\nwill change behavior and cut healthrelated\r\nexpenses. The health care industry\r\nis on a move toward consumerism; encouraging\r\nemployees to make more costeffective\r\nchoices for routine health care\r\nservices.\r\neHealthCompete has\r\nbeen built to effectively\r\npromote, educate, and\r\nenlist your employees\r\ninto the health care\r\ncost equation.</p>\r\n\r\n<p>eHealthCompete has designed a new approach to wellness that gets results.  \r\nThrough the products and services that we have created more of your employees \r\nwill participate in wellness.  We specialize in creating wellness campaigns that \r\ndraw the interest of your employees and therefore boost participation rates.  \r\nThe greater participation  you have, the greater your R.O.I.</p>\r\n\r\n<p>Our engaging wellness campaigns\r\nfocus on each area of wellness: Physical\r\nActivity, Nutrition and Lifestyle. These\r\ncampaigns are both educational and motivational.\r\nAs a result, we have seen some of\r\nthe highest participation rates in the industry\r\n(69%). We have also seen significant\r\nbehavioral change from participants who\r\nwouldn’t participate in typical wellness\r\nprograms.</p>\r\n\r\n<p>Our wellness campaigns will create a buzz\r\naround your office that will\r\nmake your work environment\r\nexciting and give you\r\na more professional image.\r\nWe are confident that our\r\nservices will increase employee\r\nproductivity and\r\nmorale, while decreasing\r\nhealth care costs, absenteeism, and sick\r\ndays. Let us provide you with a total\r\nwellness solution that will result in happy\r\nemployees and a better bottom line.</p>\r\n\r\n<p>eHealthCompete is your solution!\r\nFinally, you’ll have the\r\nfun and unique approach\r\nto wellness that will save\r\nyour company money.</p>\r\n\r\n\r\n<p>Learn more about our <a href=\"?pg=products\">products</a>  \r\n</p>'),(3708,170,0.20,'smarty','0','added content',1117259280,16,'128.187.0.164','<h1 class=\"withBG\">Solution</h1>\r\n<img src=\"{$skinFolder}images/icon_solution.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n\r\n\r\n<p>Jeff Rebleski, benefits expert and sales\r\nteam leader at Blue Cross Blue Shield of\r\nMichigan said <i>What I do see on the horizon\r\nis a massive push among employers to\r\nshift more costs to employees. When this\r\ncost shifting occurs on a large scale,\r\nhealth promotion and wellness will be\r\nuniquely poised to play a major role in a\r\nnew type of system. Beating Healthcare Costs is\r\nit really possible, wellness councils of America, interview\r\n2004.</i></p>\r\n\r\n<p>Your company needs a unique strategy that\r\nwill change behavior and cut healthrelated\r\nexpenses. The health care industry\r\nis on a move toward consumerism; encouraging\r\nemployees to make more costeffective\r\nchoices for routine health care\r\nservices.\r\neHealthCompete has\r\nbeen built to effectively\r\npromote, educate, and\r\nenlist your employees\r\ninto the health care\r\ncost equation.</p>\r\n\r\n<p>eHealthCompete has designed a new approach to wellness that gets results.  \r\nThrough the products and services that we have created more of your employees \r\nwill participate in wellness.  We specialize in creating wellness campaigns that \r\ndraw the interest of your employees and therefore boost participation rates.  \r\nThe greater participation  you have, the greater your R.O.I.</p>\r\n\r\n<p>Our engaging wellness campaigns\r\nfocus on each area of wellness: Physical\r\nActivity, Nutrition and Lifestyle. These\r\ncampaigns are both educational and motivational.\r\nAs a result, we have seen some of\r\nthe highest participation rates in the industry\r\n(69%). We have also seen significant\r\nbehavioral change from participants who\r\nwouldn’t participate in typical wellness\r\nprograms.</p>\r\n\r\n<p>Our wellness campaigns will create a buzz\r\naround your office that will\r\nmake your work environment\r\nexciting and give you\r\na more professional image.\r\nWe are confident that our\r\nservices will increase employee\r\nproductivity and\r\nmorale, while decreasing\r\nhealth care costs, absenteeism, and sick\r\ndays. Let us provide you with a total\r\nwellness solution that will result in happy\r\nemployees and a better bottom line.</p>\r\n\r\n<p>eHealthCompete is your solution!\r\nFinally, you’ll have the\r\nfun and unique approach\r\nto wellness that will save\r\nyour company money.</p>\r\n\r\n\r\n<p>Learn more about our <a href=\"?pg=products\">products</a>  \r\n</p>'),(3709,171,0.22,'smarty','0','added content',1117259678,16,'128.187.0.164','<h1 class=\"withBG\">Products</h1>\r\n\r\n<h2> Wellness Campaigns</h2>\r\n<p>eHealthCompete creates campaigns that\r\nfocus on a specific area of wellness:\r\nweight loss, nutrition, exercise, stress,\r\nrelationships, etc. By surveying your\r\npopulation we discover the areas of interest\r\nand concern and develop our campaigns\r\nto fit your needs.</p>\r\n\r\n<p>A campaign is a 12 week program that\r\nspecializes in one specific area of wellness.\r\nCampaigns include a combination\r\nof promotion, educational material (tips,\r\nnewsletters, etc), competition, surveys/\r\nquizzes, point earnings, stat tracking and\r\nrewards.</p>\r\n\r\n<p>To save further on costs, our standard\r\npackage allows our clients to select a predesigned\r\ncampaign to implement at their\r\noffice, or use our campaign creation wizard\r\nto create your own.</p>\r\n\r\n<p>These full scale programs are results driven\r\nand include a detailed report on the\r\noutcomes of the campaign. That way you\r\ncan keep your\r\nfinger on the\r\npulse of your\r\ninvestment in\r\neHealthCompete.</p>\r\n\r\n<h2>Incentive Program</h2>\r\n<p>This popular program is for everyone and\r\nespecially those who do not want to compete\r\nor be a part of any community wellness\r\nprogram. The incentive program is a\r\nprivate program just for the employee.\r\nHere is how it works…\r\nEmployees earn points by taking\r\nsurveys designed to educate them in wellness\r\nor promote behavior changes.\r\nBased on their answers, employees\r\nreceive customized feedback\r\nfor improvement.\r\nPoints are accumulated\r\nbased on their participation\r\nand on their health choices.\r\nThese points can then be\r\nturned in for prizes.</p>\r\n<p>The Incentive Program comes with...\r\nPre-built standard surveys in the\r\nareas of Nutrition, Exercise and Lifestyle\r\nAn Incentive Creation Wizard. If\r\nyou want to award employees for other\r\nbehavior specific to your company, their\r\njob, or wellness then you can create your\r\nown incentive program by using our simple\r\ncreation wizard.\r\nThe incentive program\r\nencourages\r\nlong term health behavior\r\nchanges and\r\nis perfect for your\r\nnon-competitive\r\nemployees!</p>\r\n\r\n<h2>Competitions</h2>\r\n\r\n<h2>Survey Creation</h2>\r\n<p>Looking for ways to receive real time data from your employees?  eHealthCompete gives you the ability to survey your employee population based on whatever criteria you want.  Our survey engine will distribute, collect and display the results of your survey - eliminating the paper based methods you have used in the past.</p>\r\n\r\n<h2>Now What?</h2>\r\n<a href=\"?pg=contact\">Contact us</a> for more information on how your company can benefit from eHealthCompete!'),(3710,171,0.23,'smarty','0','added content',1117259885,16,'128.187.0.164','<h1 class=\"withBG\">Products</h1>\r\n\r\n<h2> Wellness Campaigns</h2>\r\n<p>eHealthCompete creates campaigns that\r\nfocus on a specific area of wellness:\r\nweight loss, nutrition, exercise, stress,\r\nrelationships, etc. By surveying your\r\npopulation we discover the areas of interest\r\nand concern and develop our campaigns\r\nto fit your needs.</p>\r\n\r\n<p>A campaign is a 12 week program that\r\nspecializes in one specific area of wellness.\r\nCampaigns include a combination\r\nof promotion, educational material (tips,\r\nnewsletters, etc), competition, surveys/\r\nquizzes, point earnings, stat tracking and\r\nrewards.</p>\r\n\r\n<p>To save further on costs, our standard\r\npackage allows our clients to select a predesigned\r\ncampaign to implement at their\r\noffice, or use our campaign creation wizard\r\nto create your own.</p>\r\n\r\n<p>These full scale programs are results driven\r\nand include a detailed report on the\r\noutcomes of the campaign. That way you\r\ncan keep your\r\nfinger on the\r\npulse of your\r\ninvestment in\r\neHealthCompete.</p>\r\n\r\n<h2>Incentive Program</h2>\r\n<p>This popular program is for everyone and\r\nespecially those who do not want to compete\r\nor be a part of any community wellness\r\nprogram. The incentive program is a\r\nprivate program just for the employee.\r\nHere is how it works…\r\n<ol>\r\n	<li>Employees earn points by taking\r\n	surveys designed to educate them in wellness\r\n	or promote behavior changes.</li>\r\n	<li>Based on their answers, employees\r\n	receive customized feedback\r\n	for improvement.</li>\r\n	<li>Points are accumulated\r\n	based on their participation\r\n	and on their health choices.\r\n	These points can then be\r\n	turned in for prizes.<li>\r\n</ol></p>\r\n\r\n<p>The Incentive Program comes with...\r\n<ol>\r\n	<li>Pre-built standard surveys in the\r\n	areas of Nutrition, Exercise and Lifestyle</li>\r\n	<li>An Incentive Creation Wizard. If\r\n	you want to award employees for other\r\n	behavior specific to your company, their\r\n	job, or wellness then you can create your\r\n	own incentive program by using our simple\r\n	creation wizard.</li>\r\n</ol></p>\r\n<p>The incentive program encourages\r\nlong term health behavior\r\nchanges and is perfect for your\r\nnon-competitive\r\nemployees!</p>\r\n\r\n<h2>Competitions</h2>\r\n\r\n<h2>Survey Creation</h2>\r\n<p>Looking for ways to receive real time data from your employees?  eHealthCompete gives you the ability to survey your employee population based on whatever criteria you want.  Our survey engine will distribute, collect and display the results of your survey - eliminating the paper based methods you have used in the past.</p>\r\n\r\n<h2>Now What?</h2>\r\n<a href=\"?pg=contact\">Contact us</a> for more information on how your company can benefit from eHealthCompete!'),(3711,171,0.24,'smarty','0','added content',1117259929,16,'128.187.0.164','<h1 class=\"withBG\">Products</h1>\r\n\r\n<h2> Wellness Campaigns</h2>\r\n<p>eHealthCompete creates campaigns that\r\nfocus on a specific area of wellness:\r\nweight loss, nutrition, exercise, stress,\r\nrelationships, etc. By surveying your\r\npopulation we discover the areas of interest\r\nand concern and develop our campaigns\r\nto fit your needs.</p>\r\n\r\n<p>A campaign is a 12 week program that\r\nspecializes in one specific area of wellness.\r\nCampaigns include a combination\r\nof promotion, educational material (tips,\r\nnewsletters, etc), competition, surveys/\r\nquizzes, point earnings, stat tracking and\r\nrewards.</p>\r\n\r\n<p>To save further on costs, our standard\r\npackage allows our clients to select a predesigned\r\ncampaign to implement at their\r\noffice, or use our campaign creation wizard\r\nto create your own.</p>\r\n\r\n<p>These full scale programs are results driven\r\nand include a detailed report on the\r\noutcomes of the campaign. That way you\r\ncan keep your\r\nfinger on the\r\npulse of your\r\ninvestment in\r\neHealthCompete.</p>\r\n\r\n<h2>Incentive Program</h2>\r\n<p>This popular program is for everyone and\r\nespecially those who do not want to compete\r\nor be a part of any community wellness\r\nprogram. The incentive program is a\r\nprivate program just for the employee.\r\nHere is how it works…\r\n<ul>\r\n	<li>Employees earn points by taking\r\n	surveys designed to educate them in wellness\r\n	or promote behavior changes.</li>\r\n	<li>Based on their answers, employees\r\n	receive customized feedback\r\n	for improvement.</li>\r\n	<li>Points are accumulated\r\n	based on their participation\r\n	and on their health choices.\r\n	These points can then be\r\n	turned in for prizes.</li>\r\n</ul></p>\r\n\r\n<p>The Incentive Program comes with...\r\n<ul>\r\n	<li>Pre-built standard surveys in the\r\n	areas of Nutrition, Exercise and Lifestyle</li>\r\n	<li>An Incentive Creation Wizard. If\r\n	you want to award employees for other\r\n	behavior specific to your company, their\r\n	job, or wellness then you can create your\r\n	own incentive program by using our simple\r\n	creation wizard.</li>\r\n</ul></p>\r\n<p>The incentive program encourages\r\nlong term health behavior\r\nchanges and is perfect for your\r\nnon-competitive\r\nemployees!</p>\r\n\r\n<h2>Competitions</h2>\r\n\r\n<h2>Survey Creation</h2>\r\n<p>Looking for ways to receive real time data from your employees?  eHealthCompete gives you the ability to survey your employee population based on whatever criteria you want.  Our survey engine will distribute, collect and display the results of your survey - eliminating the paper based methods you have used in the past.</p>\r\n\r\n<h2>Now What?</h2>\r\n<a href=\"?pg=contact\">Contact us</a> for more information on how your company can benefit from eHealthCompete!'),(3712,171,0.25,'smarty','0','added content',1117260143,16,'128.187.0.164','<h1 class=\"withBG\">Products</h1>\r\n\r\n<h2> Wellness Campaigns</h2>\r\n<p>eHealthCompete creates campaigns that\r\nfocus on a specific area of wellness:\r\nweight loss, nutrition, exercise, stress,\r\nrelationships, etc. By surveying your\r\npopulation we discover the areas of interest\r\nand concern and develop our campaigns\r\nto fit your needs.</p>\r\n\r\n<p>A campaign is a 12 week program that\r\nspecializes in one specific area of wellness.\r\nCampaigns include a combination\r\nof promotion, educational material (tips,\r\nnewsletters, etc), competition, surveys/\r\nquizzes, point earnings, stat tracking and\r\nrewards.</p>\r\n\r\n<p>To save further on costs, our standard\r\npackage allows our clients to select a predesigned\r\ncampaign to implement at their\r\noffice, or use our campaign creation wizard\r\nto create your own.</p>\r\n\r\n<p>These full scale programs are results driven\r\nand include a detailed report on the\r\noutcomes of the campaign. That way you\r\ncan keep your\r\nfinger on the\r\npulse of your\r\ninvestment in\r\neHealthCompete.</p>\r\n\r\n<h2>Incentive Program</h2>\r\n<p>This popular program is for everyone and\r\nespecially those who do not want to compete\r\nor be a part of any community wellness\r\nprogram. The incentive program is a\r\nprivate program just for the employee.\r\nHere is how it works…\r\n<ul>\r\n	<li>Employees earn points by taking\r\n	surveys designed to educate them in wellness\r\n	or promote behavior changes.</li>\r\n	<li>Based on their answers, employees\r\n	receive customized feedback\r\n	for improvement.</li>\r\n	<li>Points are accumulated\r\n	based on their participation\r\n	and on their health choices.\r\n	These points can then be\r\n	turned in for prizes.</li>\r\n</ul></p>\r\n\r\n<p>The Incentive Program comes with...\r\n<ul>\r\n	<li>Pre-built standard surveys in the\r\n	areas of Nutrition, Exercise and Lifestyle</li>\r\n	<li>An Incentive Creation Wizard. If\r\n	you want to award employees for other\r\n	behavior specific to your company, their\r\n	job, or wellness then you can create your\r\n	own incentive program by using our simple\r\n	creation wizard.</li>\r\n</ul></p>\r\n<p>The incentive program encourages\r\nlong term health behavior\r\nchanges and is perfect for your\r\nnon-competitive\r\nemployees!</p>\r\n\r\n<h2>Competitions</h2>\r\n<p>Competitions are exciting events that are a part of\r\nmost of our campaigns.\r\nYou have the option to create any type of competition\r\nthat you’d like, i.e. 5-a-day, exercise minutes,\r\nexercise distance, weight loss, flossing, you name\r\nit.</p>\r\n<p>Competitions can be in teams or as individuals and include the following…\r\n<ul>\r\n	<li>Real-time leader board</li>\r\n	<li>Discussion board</li>\r\n	<li>Weekly winners</li>\r\n	<li>Comparative graphs</li>\r\n	<li>In addition, your employees can create private competitions\r\n	for their family or friends to increase their motivation and\r\n	the likelihood of participation.</li>\r\n</ul>\r\n</p>\r\n\r\n<h2>Survey Creation</h2>\r\n<p>Looking for ways to receive real time data from your employees?  eHealthCompete gives you the ability to survey your employee population based on whatever criteria you want.  Our survey engine will distribute, collect and display the results of your survey - eliminating the paper based methods you have used in the past.</p>\r\n\r\n<h2>Now What?</h2>\r\n<a href=\"?pg=contact\">Contact us</a> for more information on how your company can benefit from eHealthCompete!'),(3713,171,0.26,'smarty','1','added content',1117260220,16,'128.187.0.164','<h1 class=\"withBG\">Products</h1>\r\n\r\n<h2> Wellness Campaigns</h2>\r\n<p>eHealthCompete creates campaigns that\r\nfocus on a specific area of wellness:\r\nweight loss, nutrition, exercise, stress,\r\nrelationships, etc. By surveying your\r\npopulation we discover the areas of interest\r\nand concern and develop our campaigns\r\nto fit your needs.</p>\r\n\r\n<p>A campaign is a 12 week program that\r\nspecializes in one specific area of wellness.\r\nCampaigns include a combination\r\nof promotion, educational material (tips,\r\nnewsletters, etc), competition, surveys/\r\nquizzes, point earnings, stat tracking and\r\nrewards.</p>\r\n\r\n<p>To save further on costs, our standard\r\npackage allows our clients to select a predesigned\r\ncampaign to implement at their\r\noffice, or use our campaign creation wizard\r\nto create your own.</p>\r\n\r\n<p>These full scale programs are results driven\r\nand include a detailed report on the\r\noutcomes of the campaign. That way you\r\ncan keep your finger on the\r\npulse of your investment in\r\neHealthCompete.</p>\r\n\r\n<h2>Incentive Program</h2>\r\n<p>This popular program is for everyone and\r\nespecially those who do not want to compete\r\nor be a part of any community wellness\r\nprogram. The incentive program is a\r\nprivate program just for the employee.\r\nHere is how it works…\r\n<ul>\r\n	<li>Employees earn points by taking\r\n	surveys designed to educate them in wellness\r\n	or promote behavior changes.</li>\r\n	<li>Based on their answers, employees\r\n	receive customized feedback\r\n	for improvement.</li>\r\n	<li>Points are accumulated\r\n	based on their participation\r\n	and on their health choices.\r\n	These points can then be\r\n	turned in for prizes.</li>\r\n</ul></p>\r\n\r\n<p>The Incentive Program comes with...\r\n<ul>\r\n	<li>Pre-built standard surveys in the\r\n	areas of Nutrition, Exercise and Lifestyle</li>\r\n	<li>An Incentive Creation Wizard. If\r\n	you want to award employees for other\r\n	behavior specific to your company, their\r\n	job, or wellness then you can create your\r\n	own incentive program by using our simple\r\n	creation wizard.</li>\r\n</ul></p>\r\n<p>The incentive program encourages\r\nlong term health behavior\r\nchanges and is perfect for your\r\nnon-competitive\r\nemployees!</p>\r\n\r\n<h2>Competitions</h2>\r\n<p>Competitions are exciting events that are a part of\r\nmost of our campaigns.\r\nYou have the option to create any type of competition\r\nthat you’d like, i.e. 5-a-day, exercise minutes,\r\nexercise distance, weight loss, flossing, you name\r\nit.</p>\r\n<p>Competitions can be in teams or as individuals and include the following…\r\n<ul>\r\n	<li>Real-time leader board</li>\r\n	<li>Discussion board</li>\r\n	<li>Weekly winners</li>\r\n	<li>Comparative graphs</li>\r\n	<li>In addition, your employees can create private competitions\r\n	for their family or friends to increase their motivation and\r\n	the likelihood of participation.</li>\r\n</ul>\r\n<p><i>\"I get employees poppin’ in my\r\noffice with health related questions\r\nall the time now. They are excited.\r\nThis competition has definitely created\r\nan awareness in their minds.\"\r\n- Brian Hunt, Health Manager,\r\nNu Skin Enterprises</i></p>\r\n</p>\r\n\r\n<h2>Survey Creation</h2>\r\n<p>Looking for ways to receive real time data from your employees?  eHealthCompete gives you the ability to survey your employee population based on whatever criteria you want.  Our survey engine will distribute, collect and display the results of your survey - eliminating the paper based methods you have used in the past.</p>\r\n\r\n<h2>Now What?</h2>\r\n<a href=\"?pg=contact\">Contact us</a> for more information on how your company can benefit from eHealthCompete!'),(3714,172,0.19,'smarty','1','Page created.',1117260772,16,'128.187.0.164','<h1 class=\"withBG\">Company</h1>\r\n\r\n<p>eHealthCompete is committed to help improve the wellness of your employees.  We have developed a wellness system that bring significant cost saving to your company while bringing fun and motivation to your employees.</p>\r\n\r\n\r\n<p>To learn more visit our <a href=\"?pg=problem\">Problem </a>page</p>\r\n<p>Or <a href=\"?pg=contact\">Contact Us </a>to discover what eHealthCompete can do for your company.</p>'),(3715,173,0.24,'smarty','0','added $skinFolder path, and fixed filename.',1117260922,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\"><br />\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\"><br />\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\"><br />\r\n'),(3716,173,0.25,'smarty','0','added $skinFolder path, and fixed filename.',1117261029,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n'),(3717,173,0.26,'smarty','0','added $skinFolder path, and fixed filename.',1117261300,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<p>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.</p>\r\n\r\n\r\n'),(3718,173,0.27,'smarty','0','added $skinFolder path, and fixed filename.',1117261877,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.</p>\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3719,173,0.28,'smarty','0','added $skinFolder path, and fixed filename.',1117262088,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.</p>\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3720,173,0.29,'smarty','0','added $skinFolder path, and fixed filename.',1117262237,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<p>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.</p>\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3721,173,0.30,'smarty','0','added $skinFolder path, and fixed filename.',1117262313,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"right\">\r\n<p>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.</p>\r\n</div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3722,173,0.31,'smarty','0','added $skinFolder path, and fixed filename.',1117262364,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\">\r\n<p>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.</p>\r\n</div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3723,173,0.32,'smarty','0','added $skinFolder path, and fixed filename.',1117262425,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\"></div>\r\n<div>Golds Gym of Utah\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3724,173,0.33,'smarty','0','added $skinFolder path, and fixed filename.',1117262484,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\"></div>\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p></div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3725,173,0.34,'smarty','0','added $skinFolder path, and fixed filename.',1117262507,16,'128.187.243.194','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\"></div>\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p></div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3726,173,0.35,'smarty','0','added $skinFolder path, and fixed filename.',1117262574,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\"></div>\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p></div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3727,173,0.36,'smarty','0','added $skinFolder path, and fixed filename.',1117262683,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\"><br />\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n<div>\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\" align=\"left\"></div>\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p></div>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\" align=\"left\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3728,173,0.37,'smarty','0','added $skinFolder path, and fixed filename.',1117262798,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 stepsa-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3729,173,0.38,'smarty','0','added $skinFolder path, and fixed filename.',1117292379,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3730,173,0.39,'smarty','0','added $skinFolder path, and fixed filename.',1117292493,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(3881,202,0.81,'smarty','0','added small gif as heart rate monitor',1118363749,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n{if $smarty.request.showNewMenu eq \"true\"}\r\n<div class=\"rightSideMenu\">\r\n	<div class=\"rightMenuBox\">\r\n	<h3>EHC News</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<span class=\"floatLeft iconNew\"></span>\r\n		<small><a href=\"#\">Portion Control Article in the nutrition corner. Click here to read</a></small>\r\n		</div>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Learn more about carbohydrates and how they affect your body.</a></small>\r\n		</div>	\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>Product Highlight</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<img src=\"{$skinFolder}images/rypHeartMonitor_small.jpg\" align=\"right\" class=\"img1\" alt=\"\" height=\"115\" width=\"87\" /><br />\r\n		<small><a href=\"#\">Heart Rate Monitors can help improve your exercise, click here to learn more.</a></small>\r\n		</div>\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>To Do List:</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Update your progress</a><br />\r\n		<a href=\"#\">Earn more incentive points</a><br />\r\n		<a href=\"#\">Check out the competition</a><br />\r\n		<a href=\"#\">Read New Articles</a></small>\r\n		</div>\r\n	</div>\r\n</div>\r\n{/if}\r\n\r\n{if $user->isLoggedIn()}\r\n	<img src=\"{$skinFolder}images/ehc/corporateBuilding_sm.jpg\" width=\"100\" height=\"131\" style=\"margin-right:10px; float:left; border:#CCC 1px solid;\" />\r\n\r\n	{include_php file=\"shared_handle:company/announcements\"}\r\n	<h2 class=\"uline\">Company Announcements:</h2>\r\n\r\n	<blockquote>\r\n		<dl>\r\n		{foreach from=$announcements item=\"current\"}\r\n			<dt><div style=\"float:right;\"><small><i>{$current.postedDate|date_format2:\"D, M j\"}</i></small></div>\r\n			    {$current.title}</dt>\r\n			<dd>{$current.description}</dd>\r\n		{foreachelse}\r\n			<dt>No announcements at this time</dt>\r\n		{/foreach}\r\n		</dl>\r\n	</blockquote>\r\n\r\n	{include_php file=\"shared_handle:company/companySurveyList\"}\r\n	<h2 class=\"uline\">Company Surveys:</h2>\r\n	<blockquote>\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>Available Surveys:</h3></td>\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n	<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">\r\n		None found.</td></tr>\r\n	{/foreach}\r\n	</table>\r\n	</blockquote>\r\n\r\n	<h2 class=\"uline\">eHealthCompete Highlights:</h2>\r\n	\r\n	<table>\r\n	<tr><td valign=\"middle\">\r\n	<blockquote>\r\n	<dl>	\r\n		<dt>Pedometer Deal</dt>\r\n		<dd>eHealthCompete has just negotiated a great deal on RYP Pedometers.  If you have been looking to purchase a pedometer the eHealthCompete price and quality could be your best bet.  This deal is only available to members of EHC.</dd>\r\n		\r\n	</dl>\r\n	</blockquote></td>\r\n	<td valign=\"top\" align=\"center\">\r\n		<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\">\r\n		<img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br />\r\n		Buy one now</a>\r\n	</td></tr></table>\r\n{else}\r\n	{assign var=\"hideLogin\" value=\"true\"}\r\n		<script language=\"JavaScript\">{literal}\r\n			function doForgotPassword(boxId, formName) {\r\n				if (!formName) formName = \'loginForm\';\r\n				if (!boxId) boxId = \'usernameBox\';\r\n\r\n				var df = document.forms[formName];\r\n				var obj = document.getElementById(boxId);\r\n		\r\n				if (obj.value == \'\') {\r\n					obj.value = prompt(\'Enter your username:\', \'\');\r\n				}\r\n				\r\n\r\n				df.forgotPassword.value = \'true\';\r\n				df.submit();	\r\n			}\r\n\r\n		{/literal}</script>\r\n	<table align=\"center\" width=\"305\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"center\">\r\n		<h2>{$smarty.session.company.companyName}</h2>\r\n	</td></tr>\r\n	<tr><td>\r\n		<div align=\"center\" class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"my_login\" />\r\n			<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.return|default:\"home\"}\" />\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n			<input type=\"hidden\" name=\"forgotPassword\" value=\"\" />\r\n		\r\n			<h2 class=\"withBG\">Log In:</h2>\r\n				Username: <input id=\"usernameBox2\" type=\"text\" name=\"username\" value=\"{$smarty.request.username}\" class=\"textInput\" size=\"12\" /><br />\r\n				Password: <input type=\"password\" name=\"password\" class=\"textInput\" size=\"12\" /><br />\r\n				<div class=\"underline\">&nbsp;</div>\r\n				<a href=\"javascript:document.forms[\'loginForm2\'].submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n				<input type=\"submit\" name=\"loginSubmit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n	</td></tr>\r\n	<tr><td align=\"right\">\r\n		<br />\r\n		{if $smarty.session.company.companyName}\r\n			<small>Not registered yet?</small> <a href=\"?pg=signup/begin\">Sign Up Now!</a> &nbsp;\r\n		{else}\r\n			<!-- Place holder for sign up info content. -->\r\n		{/if}\r\n	</td></tr>\r\n	</table>\r\n{/if}'),(3883,202,0.83,'smarty','0','added small gif as heart rate monitor',1118364145,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n{if $smarty.request.showNewMenu eq \"true\"}\r\n<div class=\"rightSideMenu\">\r\n	<div class=\"rightMenuBox\">\r\n	<h3>EHC News</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<span class=\"floatLeft iconNew\"></span>\r\n		<small><a href=\"#\">Portion Control Article in the nutrition corner. Click here to read</a></small>\r\n		</div>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Learn more about carbohydrates and how they affect your body.</a></small>\r\n		</div>	\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>Product Highlight</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<img src=\"{$skinFolder}images/rypHeartMonitor_small.jpg\" align=\"right\" class=\"img1\" alt=\"\" height=\"120\" width=\"91\" /><br />\r\n		<small><a href=\"#\">Heart Rate Monitors can help improve your exercise, click here to learn more.</a></small>\r\n		</div>\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>To Do List:</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Update your progress</a><br />\r\n		<a href=\"#\">Earn more incentive points</a><br />\r\n		<a href=\"#\">Check out the competition</a><br />\r\n		<a href=\"#\">Read New Articles</a></small>\r\n		</div>\r\n	</div>\r\n</div>\r\n{/if}\r\n\r\n{if $user->isLoggedIn()}\r\n	<img src=\"{$skinFolder}images/ehc/corporateBuilding_sm.jpg\" width=\"100\" height=\"131\" style=\"margin-right:10px; float:left; border:#CCC 1px solid;\" />\r\n\r\n	{include_php file=\"shared_handle:company/announcements\"}\r\n	<h2 class=\"uline\">Company Announcements:</h2>\r\n\r\n	<blockquote>\r\n		<dl>\r\n		{foreach from=$announcements item=\"current\"}\r\n			<dt><div style=\"float:right;\"><small><i>{$current.postedDate|date_format2:\"D, M j\"}</i></small></div>\r\n			    {$current.title}</dt>\r\n			<dd>{$current.description}</dd>\r\n		{foreachelse}\r\n			<dt>No announcements at this time</dt>\r\n		{/foreach}\r\n		</dl>\r\n	</blockquote>\r\n\r\n	{include_php file=\"shared_handle:company/companySurveyList\"}\r\n	<h2 class=\"uline\">Company Surveys:</h2>\r\n	<blockquote>\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>Available Surveys:</h3></td>\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n	<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">\r\n		None found.</td></tr>\r\n	{/foreach}\r\n	</table>\r\n	</blockquote>\r\n\r\n	<h2 class=\"uline\">eHealthCompete Highlights:</h2>\r\n	\r\n	<table>\r\n	<tr><td valign=\"middle\">\r\n	<blockquote>\r\n	<dl>	\r\n		<dt>Pedometer Deal</dt>\r\n		<dd>eHealthCompete has just negotiated a great deal on RYP Pedometers.  If you have been looking to purchase a pedometer the eHealthCompete price and quality could be your best bet.  This deal is only available to members of EHC.</dd>\r\n		\r\n	</dl>\r\n	</blockquote></td>\r\n	<td valign=\"top\" align=\"center\">\r\n		<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\">\r\n		<img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br />\r\n		Buy one now</a>\r\n	</td></tr></table>\r\n{else}\r\n	{assign var=\"hideLogin\" value=\"true\"}\r\n		<script language=\"JavaScript\">{literal}\r\n			function doForgotPassword(boxId, formName) {\r\n				if (!formName) formName = \'loginForm\';\r\n				if (!boxId) boxId = \'usernameBox\';\r\n\r\n				var df = document.forms[formName];\r\n				var obj = document.getElementById(boxId);\r\n		\r\n				if (obj.value == \'\') {\r\n					obj.value = prompt(\'Enter your username:\', \'\');\r\n				}\r\n				\r\n\r\n				df.forgotPassword.value = \'true\';\r\n				df.submit();	\r\n			}\r\n\r\n		{/literal}</script>\r\n	<table align=\"center\" width=\"305\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"center\">\r\n		<h2>{$smarty.session.company.companyName}</h2>\r\n	</td></tr>\r\n	<tr><td>\r\n		<div align=\"center\" class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"my_login\" />\r\n			<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.return|default:\"home\"}\" />\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n			<input type=\"hidden\" name=\"forgotPassword\" value=\"\" />\r\n		\r\n			<h2 class=\"withBG\">Log In:</h2>\r\n				Username: <input id=\"usernameBox2\" type=\"text\" name=\"username\" value=\"{$smarty.request.username}\" class=\"textInput\" size=\"12\" /><br />\r\n				Password: <input type=\"password\" name=\"password\" class=\"textInput\" size=\"12\" /><br />\r\n				<div class=\"underline\">&nbsp;</div>\r\n				<a href=\"javascript:document.forms[\'loginForm2\'].submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n				<input type=\"submit\" name=\"loginSubmit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n	</td></tr>\r\n	<tr><td align=\"right\">\r\n		<br />\r\n		{if $smarty.session.company.companyName}\r\n			<small>Not registered yet?</small> <a href=\"?pg=signup/begin\">Sign Up Now!</a> &nbsp;\r\n		{else}\r\n			<!-- Place holder for sign up info content. -->\r\n		{/if}\r\n	</td></tr>\r\n	</table>\r\n{/if}'),(4396,264,0.17,'smarty','0','Page created.',1127417748,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\nsignup object:\r\n{display var=$signup}\r\n\r\n<h1 class=\"underline\">Create My Profile</h1>\r\n{* include_php file=\"shared_handle:signup.details\" *}\r\n\r\n<div>\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$next.pageName}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td>\r\n\r\n<div class=\"chunk300\" style=\"width:310px;\">\r\n<h2 class=\"withBG\">Personal Profile</h2>\r\n*Choose an Alias:\r\n<input type=\"text\" name=\"signup[alias]\" value=\"\" /><br />\r\n<br />\r\n*Date of Birth:\r\n{get_month name=\"signup[dob][month]\"}\r\n{get_day   name=\"signup[dob][day]\"}\r\n{math assign=\"end_year\" equation=\"x - 18\" x=$smarty.now|date_format2:\"Y\"}  {* Minimum age is 18 years for now *}\r\n{get_year  name=\"signup[dob][year]\" start=\"1915\" end=$end_year}<br />\r\n<br />\r\n*Gender: \r\n<input type=\"radio\" name=\"signup[gender]\" value=\"not specified\" checked style=\"display:none;\"/><input type=\"radio\" name=\"signup[gender]\" value=\"male\" />Male &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"female\" />Female &nbsp;<br />\r\n</div>\r\n</td></tr></table>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n\r\n</form>\r\n</div>'),(4397,264,0.18,'smarty','0','Page created.',1127418123,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n\r\nsignup object:\r\n{display var=$signup}\r\n\r\n<h1 class=\"underline\">Create My Profile</h1>\r\n{* include_php file=\"shared_handle:signup.details\" *}\r\n\r\n<div>\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$next.pageName}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td>\r\n\r\n<div class=\"chunk300\" style=\"width:310px;\">\r\n<h2 class=\"withBG\">Personal Profile</h2>\r\n*Choose an Alias:\r\n<input type=\"text\" name=\"signup[alias]\" value=\"\" /><br />\r\n<br />\r\n*Date of Birth:\r\n{get_month name=\"signup[dob][month]\"}\r\n{get_day   name=\"signup[dob][day]\"}\r\n{math assign=\"end_year\" equation=\"x - 18\" x=$smarty.now|date_format2:\"Y\"}  {* Minimum age is 18 years for now *}\r\n{get_year  name=\"signup[dob][year]\" start=\"1915\" end=$end_year}<br />\r\n<br />\r\n*Gender: \r\n<input type=\"radio\" name=\"signup[gender]\" value=\"not specified\" checked style=\"display:none;\"/><input type=\"radio\" name=\"signup[gender]\" value=\"male\" />Male &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"female\" />Female &nbsp;<br />\r\n</div>\r\n</td></tr></table>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n\r\n</form>\r\n</div>'),(3888,169,0.22,'smarty','0','added em tags',1118636339,16,'128.187.221.74','<h1 class=\"withBG\">Problem</h1>\r\n<img src=\"{$skinFolder}images/icon_problem.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p><i>This is a very difficult time for\r\n[employers] to cope with double digit\r\nmedical premium increases.\r\nIn the current business environment,\r\nmost simply cannot afford to\r\npass these costs along. There is\r\nno ‘silver bullet’ solution to contain\r\nmedical costs, so companies\r\nmust use multiple strategies.\r\n- Michael Carter VP Hay Group’s Benefit Practice.</i></p>\r\n\r\n<p>Your employees’ lifestyle is costing you big\r\nbucks! Poor nutrition and sedentary lifestyles are\r\nattributed to disease, sick days and dollars!\r\nHealth Care costs continue to post painful increases\r\neach year and according to the Washington\r\nBusiness Group, obesity-related costs to\r\nbusinesses exceed $12 billion annually.</p>\r\n\r\n<p>What’s the good news? Much\r\nof these costs are preventable.\r\nEven small changes in your employees’\r\nlifestyle behaviors can\r\nresult in significant savings.</p>\r\n\r\n\r\n<p> What can you do?  <a href=\"?pg=solution\"> Solution </a></p>'),(3889,170,0.21,'smarty','1','added content',1118636450,16,'128.187.0.164','<h1 class=\"withBG\">Solution</h1>\r\n<img src=\"{$skinFolder}images/icon_solution.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n\r\n\r\n<p>Jeff Rebleski, benefits expert and sales\r\nteam leader at Blue Cross Blue Shield of\r\nMichigan said <i>What I do see on the horizon\r\nis a massive push among employers to\r\nshift more costs to employees. When this\r\ncost shifting occurs on a large scale,\r\nhealth promotion and wellness will be\r\nuniquely poised to play a major role in a\r\nnew type of system. (Beating Healthcare Costs is\r\nit really possible, wellness councils of America, interview\r\n2004.)</i></p>\r\n\r\n<p>Your company needs a unique strategy that\r\nwill change behavior and cut healthrelated\r\nexpenses. The health care industry\r\nis on a move toward consumerism; encouraging\r\nemployees to make more costeffective\r\nchoices for routine health care\r\nservices.\r\neHealthCompete has\r\nbeen built to effectively\r\npromote, educate, and\r\nenlist your employees\r\ninto the health care\r\ncost equation.</p>\r\n\r\n<p>eHealthCompete has designed a new approach to wellness that gets results.  \r\nThrough the products and services that we have created more of your employees \r\nwill participate in wellness.  We specialize in creating wellness campaigns that \r\ndraw the interest of your employees and therefore boost participation rates.  \r\nThe greater participation  you have, the greater your R.O.I.</p>\r\n\r\n<p>Our engaging wellness campaigns\r\nfocus on each area of wellness: Physical\r\nActivity, Nutrition and Lifestyle. These\r\ncampaigns are both educational and motivational.\r\nAs a result, we have seen some of\r\nthe highest participation rates in the industry\r\n(69%). We have also seen significant\r\nbehavioral change from participants who\r\nwouldn’t participate in typical wellness\r\nprograms.</p>\r\n\r\n<p>Our wellness campaigns will create a buzz\r\naround your office that will\r\nmake your work environment\r\nexciting and give you\r\na more professional image.\r\nWe are confident that our\r\nservices will increase employee\r\nproductivity and\r\nmorale, while decreasing\r\nhealth care costs, absenteeism, and sick\r\ndays. Let us provide you with a total\r\nwellness solution that will result in happy\r\nemployees and a better bottom line.</p>\r\n\r\n<p>eHealthCompete is your solution!\r\nFinally, you’ll have the\r\nfun and unique approach\r\nto wellness that will save\r\nyour company money.</p>\r\n\r\n\r\n<p>Learn more about our <a href=\"?pg=products\">products</a>  \r\n</p>'),(4112,202,0.89,'smarty','0','Trying to make smarter... better at submitting to correct target page.',1120766394,2,'66.182.95.52','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n{if $smarty.request.showNewMenu eq \"true\"}\r\n<div class=\"rightSideMenu\">\r\n	<div class=\"rightMenuBox\">\r\n	<h3>EHC News</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<span class=\"floatLeft iconNew\"></span>\r\n		<small><a href=\"#\">Portion Control Article in the nutrition corner. Click here to read</a></small>\r\n		</div>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Learn more about carbohydrates and how they affect your body.</a></small>\r\n		</div>	\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>Product Highlight</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<img src=\"{$skinFolder}images/rypHeartMonitor_small.jpg\" align=\"right\" class=\"img1\" alt=\"\" height=\"120\" width=\"91\" /><br />\r\n		<small><a href=\"#\">Reebok\'s Heart Rate Monitor.  Click here.</a></small>\r\n		</div>\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>To Do List:</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Update your progress</a><br />\r\n		<a href=\"#\">Earn more incentive points</a><br />\r\n		<a href=\"#\">Check out the competition</a><br />\r\n		<a href=\"#\">Read New Articles</a></small>\r\n		</div>\r\n	</div>\r\n</div>\r\n{/if}\r\n\r\n{if $user->isLoggedIn()}\r\n	<img src=\"{$skinFolder}images/ehc/corporateBuilding_sm.jpg\" width=\"100\" height=\"131\" style=\"margin-right:10px; float:left; border:#CCC 1px solid;\" />\r\n\r\n	{include_php file=\"shared_handle:company/announcements\"}\r\n	<h2 class=\"uline\">Company Announcements:</h2>\r\n\r\n	<blockquote>\r\n		<dl>\r\n		{foreach from=$announcements item=\"current\"}\r\n			<dt><div style=\"float:right;\"><small><i>{$current.postedDate|date_format2:\"D, M j\"}</i></small></div>\r\n			    {$current.title}</dt>\r\n			<dd>{$current.description}</dd>\r\n		{foreachelse}\r\n			<dt>No announcements at this time</dt>\r\n		{/foreach}\r\n		</dl>\r\n	</blockquote>\r\n\r\n	{include_php file=\"shared_handle:company/companySurveyList\"}\r\n	<h2 class=\"uline\">Company Surveys:</h2>\r\n	<blockquote>\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>Available Surveys:</h3></td>\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n	<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">\r\n		None found.</td></tr>\r\n	{/foreach}\r\n	</table>\r\n	</blockquote>\r\n\r\n	<h2 class=\"uline\">eHealthCompete Highlights:</h2>\r\n	\r\n	<table>\r\n	<tr><td valign=\"middle\">\r\n	<blockquote>\r\n	<dl>	\r\n		<dt>Pedometer Deal</dt>\r\n		<dd>eHealthCompete has just negotiated a great deal on RYP Pedometers.  If you have been looking to purchase a pedometer the eHealthCompete price and quality could be your best bet.  This deal is only available to members of EHC.</dd>\r\n		\r\n	</dl>\r\n	</blockquote></td>\r\n	<td valign=\"top\" align=\"center\">\r\n		<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\">\r\n		<img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br />\r\n		Buy one now</a>\r\n	</td></tr></table>\r\n{else}\r\n	{assign var=\"hideLogin\" value=\"true\"}\r\n		<script language=\"JavaScript\">{literal}\r\n			function doForgotPassword(boxId, formName) {\r\n				if (!formName) formName = \'loginForm\';\r\n				if (!boxId) boxId = \'usernameBox\';\r\n\r\n				var df = document.forms[formName];\r\n				var obj = document.getElementById(boxId);\r\n		\r\n				if (obj.value == \'\') {\r\n					obj.value = prompt(\'Enter your username:\', \'\');\r\n				}\r\n				\r\n\r\n				df.forgotPassword.value = \'true\';\r\n				df.submit();	\r\n			}\r\n\r\n		{/literal}</script>\r\n	<table align=\"center\" width=\"305\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"center\">\r\n		<h2>{$smarty.session.company.companyName}</h2>\r\n	</td></tr>\r\n	<tr><td>\r\n		<div align=\"center\" class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$smarty.request.return|default:$signup.return|default:\"my_login\"}\" />\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$smarty.request.cid}\" />\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"pg cid\" />\r\n			<input type=\"hidden\" name=\"forgotPassword\" value=\"\" />\r\n		\r\n			<h2 class=\"withBG\">Log In:</h2>\r\n				Username: <input id=\"usernameBox2\" type=\"text\" name=\"username\" value=\"{$smarty.request.username}\" class=\"textInput\" size=\"12\" /><br />\r\n				Password: <input type=\"password\" name=\"password\" class=\"textInput\" size=\"12\" /><br />\r\n				<div class=\"underline\">&nbsp;</div>\r\n				<a href=\"javascript:document.forms[\'loginForm2\'].submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n				<input type=\"submit\" name=\"loginSubmit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n	</td></tr>\r\n	<tr><td align=\"right\">\r\n		<br />\r\n		{if $smarty.session.company.companyName}\r\n			<small>Not registered yet?</small> <a href=\"?pg=signup/begin\">Sign Up Now!</a> &nbsp;\r\n		{else}\r\n			<!-- Place holder for sign up info content. -->\r\n		{/if}\r\n	</td></tr>\r\n	</table>\r\n{/if}'),(4126,210,0.13,'smarty','0','Page created.',1121704171,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n{include_php file=\"shared_handle:availableCompetitions\"}\r\n\r\n<form name=\"joinCompetitions\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n\r\n{style_table folder=\"img/st/floatbox\"}\r\n  <table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\">\r\n	<tr>\r\n		<td bgcolor=\"#CCCCCC\">&nbsp;</td>\r\n		<td bgcolor=\"#CCCCCC\"><b>ID #</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Title</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Start Date</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>End Date</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Style</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Scoring Method</b></td>\r\n	</tr>\r\n	{foreach from=$availableCompetitions item=\"comp\"}\r\n	<tr>\r\n		{if not $user->inGroupName($comp.code)}\r\n		{assign var=\"isJoinable\" value=\"true\"}\r\n		<td><input type=\"checkbox\" name=\"joinComp[]\" value=\"{$comp.id}\" /></td>\r\n		<td>{$comp.id}</td>\r\n		<td>{$comp.title}</td>\r\n		<td>{$comp.startDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.endDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.style}</td>\r\n		<td>{$comp.scoringMethod}</td>\r\n		{else}\r\n		{assign var=\"isInComps\" value=\"true\"}\r\n		<td bgcolor=\"#FFCCCC\">&times;</td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.id}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.title}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.startDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.endDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.style}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.scoringMethod}</i></td>\r\n		{/if}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"7\" align=\"center\">Sorry. There are currently no active competitions available.</td>\r\n	</tr>	\r\n	{/foreach}\r\n  </table>\r\n{/style_table}\r\n\r\n<br />\r\n<div align=\"center\">{if $isJoinable}<input type=\"submit\" name=\"submitBtn\" value=\"Join Selected Competitions\" />{else}<b>No Competitions To Join</b>{/if}</div>\r\n{if $isInComps}\r\n<br />\r\n<div style=\"background-color:#FCC; margin-left:20px; width:250px;\">&times; - You are already a member</div>\r\n{/if}\r\n\r\n</form>\r\n\r\n<div>\r\nDoes this work?\r\n</div>'),(4338,138,0.64,'smarty','0','starting flashgraph v2 update',1127153163,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"#{$graphTimeBack}\"><small>go back more</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"#{$graphTimeNext}\"><small>go forward more</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4231,210,0.18,'smarty','0','Page created.',1126304522,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n{include_php file=\"shared_handle:availableCompetitions\"}\r\n\r\n{* if !$isJoinable}{redirect href=\"?pg=my_login\"}{/if *}\r\n\r\n<form name=\"joinCompetitions\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n\r\n{* style_table folder=\"img/st/floatbox\" *}\r\n  <table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\">\r\n	<tr>\r\n		<td bgcolor=\"#CCCCCC\">&nbsp;</td>\r\n		<td bgcolor=\"#CCCCCC\"><b>ID #</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Title</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Start Date</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>End Date</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Style</b></td>\r\n		<td bgcolor=\"#CCCCCC\"><b>Scoring Method</b></td>\r\n	</tr>\r\n	{foreach from=$availableCompetitions item=\"comp\"}\r\n	<tr>\r\n		{if not $user->inGroupName($comp.code)}\r\n		{assign var=\"isJoinable\" value=\"true\"}\r\n		<td><input type=\"checkbox\" name=\"joinComp[]\" value=\"{$comp.id}\" /></td>\r\n		<td>{$comp.id}</td>\r\n		<td>{$comp.title}</td>\r\n		<td>{$comp.startDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.endDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.style}</td>\r\n		<td>{$comp.scoringMethod}</td>\r\n		{else}\r\n		{assign var=\"isInComps\" value=\"true\"}\r\n		<td bgcolor=\"#FFCCCC\">&times;</td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.id}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.title}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.startDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.endDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.style}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.scoringMethod}</i></td>\r\n		{/if}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"7\" align=\"center\">Sorry. There are currently no active competitions available.</td>\r\n	</tr>	\r\n	{/foreach}\r\n  </table>\r\n{* /style_table *}\r\n\r\n<br />\r\n<div align=\"center\">{if $isJoinable}<input type=\"submit\" name=\"submitBtn\" value=\"Join Selected Competitions\" /> <input type=\"submit\" name=\"submitBtn\" value=\"Join Later\" />{else}<b>No Competitions To Join</b>{/if}</div>\r\n{if $isInComps}\r\n<br />\r\n<div style=\"background-color:#FCC; margin-left:20px; width:250px;\">&times; - You are already a member</div>\r\n{/if}\r\n\r\n</form>\r\n\r\n{if $company.vanity eq \"myfamily\"}\r\n<div>\r\nClick <a href=\"?pg=5to9Rules\">here</a> for the 5 to 9 a-day instructions and rules\r\n</div>\r\n{/if}'),(4232,210,0.19,'smarty','0','Page created.',1126304593,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n{include_php file=\"shared_handle:availableCompetitions\"}\r\n\r\n<form name=\"joinCompetitions\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n\r\n{* style_table folder=\"img/st/floatbox\" *}\r\n  <table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\">\r\n	<tr>\r\n		<td bgcolor=\"#EEEEEE\">&nbsp;</td>\r\n		<td bgcolor=\"#EEEEEE\"><b>ID #</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Title</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Start Date</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>End Date</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Style</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Scoring Method</b></td>\r\n	</tr>\r\n	{foreach from=$availableCompetitions item=\"comp\"}\r\n	<tr>\r\n		{if not $user->inGroupName($comp.code)}\r\n		{assign var=\"isJoinable\" value=\"true\"}\r\n		<td><input type=\"checkbox\" name=\"joinComp[]\" value=\"{$comp.id}\" /></td>\r\n		<td>{$comp.id}</td>\r\n		<td>{$comp.title}</td>\r\n		<td>{$comp.startDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.endDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.style}</td>\r\n		<td>{$comp.scoringMethod}</td>\r\n		{else}\r\n		{assign var=\"isInComps\" value=\"true\"}\r\n		<td bgcolor=\"#FFCCCC\">&times;</td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.id}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.title}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.startDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.endDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.style}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.scoringMethod}</i></td>\r\n		{/if}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"7\" align=\"center\">Sorry. There are currently no active competitions available.</td>\r\n	</tr>	\r\n	{/foreach}\r\n  </table>\r\n{* /style_table *}\r\n\r\n{if !$isJoinable}{redirect href=\"?pg=my_login\"}{/if}\r\n\r\n<br />\r\n<div align=\"center\">{if $isJoinable}<input type=\"submit\" name=\"submitBtn\" value=\"Join Selected Competitions\" /> <input type=\"submit\" name=\"submitBtn\" value=\"Join Later\" />{else}<b>No Competitions To Join</b>{/if}</div>\r\n{if $isInComps}\r\n<br />\r\n<div style=\"background-color:#FCC; margin-left:20px; width:250px;\">&times; - You are already a member</div>\r\n{/if}\r\n\r\n</form>\r\n\r\n{if $company.vanity eq \"myfamily\"}\r\n<div>\r\nClick <a href=\"?pg=5to9Rules\">here</a> for the 5 to 9 a-day instructions and rules\r\n</div>\r\n{/if}'),(4423,238,0.13,'smarty','0','Page created.',1127440744,3,'216.194.127.150','{include_php file=\"shared_handle:company_management/reports/surveys\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Select Survey and Date Range</h3>\r\n\r\n<div id=\"configure\" style=\"display:block; margin-left:20px;\">\r\n	<form method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Survey Name:</td>\r\n		<td colspan=\"3\"><select name=\"surveyId\">\r\n			{foreach from=$surveyList key=\"surveyId\" item=\"surveyName\"}\r\n			<option value=\"{$surveyId}\">{$surveyName}</option>\r\n			{/foreach}</select>\r\n	</tr>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n'),(4424,238,0.14,'smarty','0','Page created.',1127440816,3,'216.194.127.150','{include_php file=\"shared_handle:company_management/reports/surveys\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Select Survey and Date Range</h3>\r\n\r\n<div id=\"configure\" style=\"display:block; margin-left:20px;\">\r\n	<form method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Survey Name:</td>\r\n		<td colspan=\"3\"><select name=\"surveyId\">\r\n			{foreach from=$surveyList key=\"surveyId\" item=\"row\"}\r\n			<option value=\"{$surveyId}\">{$row.surveyName}</option>\r\n			{/foreach}</select>\r\n	</tr>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n'),(4425,238,0.15,'smarty','0','Page created.',1127441451,3,'216.194.127.150','{include_php file=\"shared_handle:company_management/reports/surveys\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Select Survey and Date Range</h3>\r\n\r\n<div id=\"configure\" style=\"display:block; margin-left:20px;\">\r\n	<form method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Survey Name:</td>\r\n		<td colspan=\"3\"><select name=\"surveyId\">\r\n			{foreach from=$surveyList key=\"surveyId\" item=\"row\"}\r\n			<option value=\"{$surveyId}\">{$row.surveyName}</option>\r\n			{/foreach}</select>\r\n	</tr>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\r\n	<hr />\r\n	<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n	<hr />\r\n\r\n	<h2>{$report.surveyName}</h2>\r\n\r\n	<b>{$report.totalSubmissions|default:0}</b> Taken<br /><br />\r\n\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n	<b>{$smarty.qLoop.iteration}.</b>) {$q.question}\r\n	{/foreach}\r\n{/if}'),(4426,238,0.16,'smarty','0','Page created.',1127442040,3,'216.194.127.150','{include_php file=\"shared_handle:company_management/reports/surveys\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Select Survey and Date Range</h3>\r\n\r\n<div id=\"configure\" style=\"display:block; margin-left:20px;\">\r\n	<form method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Survey Name:</td>\r\n		<td colspan=\"3\"><select name=\"surveyId\">\r\n			{foreach from=$surveyList key=\"surveyId\" item=\"row\"}\r\n			<option value=\"{$surveyId}\">{$row.surveyName}</option>\r\n			{/foreach}</select>\r\n	</tr>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\r\n	<hr />\r\n	<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n	<hr />\r\n\r\n	<h2>{$report.surveyName}</h2>\r\n\r\n	<b>{$report.totalSubmissions|default:0}</b> Taken<br /><br />\r\n\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n	<b>{$smarty.foreach.qLoop.iteration}.</b>) {$q.question}\r\n	{/foreach}\r\n{/if}'),(3845,138,0.41,'smarty','0','Added a quick debug link.',1118244007,3,'24.10.217.227','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $type}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{else}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{/if}\r\n\r\n{if $acm->isDomainAdmin()}\r\n	{$smarty.request.gParams}\r\n	{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n	Debug this graph: <a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n{/if}\r\n\r\n</body></html>'),(3808,138,0.39,'smarty','0','Added a quick debug link.',1118218525,3,'24.10.217.227','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $type}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{else}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{/if}\r\n\r\n{if $acm->isDomainAdmin()}\r\n	{$userIds}\r\n	{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n	Debug this graph: <a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n{/if}\r\n\r\n</body></html>'),(4960,299,0.21,'php','0','Page created.',1141977370,2,'24.2.76.126','<form method=\"get\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"<?php echo $_REQUEST[\'pg\']; ?>\" />\r\nDate: <input type=\"text\" name=\"date\" value=\"<?php echo $_REQUEST[\'date\']; ?>\" />\r\n<input type=\"submit\" value=\"Go\" />\r\n</form>\r\n\r\n<?php\r\n\r\n$targetDate = ($_REQUEST[\'date\']) ? strtotime($_REQUEST[\'date\']) : 0;\r\n\r\nif (0 >= $targetDate) {\r\n	return;\r\n}\r\n\r\n$targetDate = date(\'Ymd\', $targetDate);\r\n\r\n$fp = fopen(\"/www/logs/\" . $targetDate . \"_request_log.php\", \'r\');\r\n\r\n$data = array();\r\n$totalCount = 0;\r\n$totalTime = 0.0;\r\n$totalQueries = 0;\r\n\r\nwhile (!feof($fp)) {\r\n	$line = fgets($fp, 4096);\r\n	$lineItems = split(\',\', $line);\r\n\r\n	$totalCount++;\r\n	$data[\'vanities\'][$lineItems[0]]++;\r\n	$data[\'domains\'][$lineItems[1]]++;\r\n	$totalTime += (float) $lineItems[2];\r\n	$data[\'pages\'][$lineItems[3]]++;\r\n	$totalQueries += (int) $lineItems[4];\r\n	$data[\'users\'][$lineItems[7]]++;\r\n	$data[\'ips\'][$lineItems[8]]++;\r\n}\r\n\r\nfclose($fp);\r\n\r\n$totalIps = count($data[\'ips\']);\r\n$totalUsers = count($data[\'users\']);\r\n\r\necho \"<h1>Report for: \" . $_REQUEST[\'date\'] . \"</h1>\";\r\n\r\necho \"Total hits: <b>$totalCount</b><br />\";\r\necho \"Total time processing: <b>$totalTime seconds</b> (<b>\" . ($totalTime / 60) . \" minutes</b>)<br />\";\r\necho \"Average time processing: <b>\" . ($totalTime / $totalCount) . \"</b><br />\";\r\necho \"Queries processed: <b>$totalQueries</b><br />\";\r\necho \"Average queries processed: <b>\" . ($totalQueries / $totalCount) . \"</b><br />\";\r\necho \"Unique IP Addresses: <b>$totalIps</b><br />\";\r\necho \"Unique users: <b>$totalUsers</b><br />\";\r\n\r\n$keys = array_keys($data);\r\n\r\nforeach ($keys as $key) {\r\n	arsort($data[$key]);\r\n	\r\n	echo <<<EOL\r\n<br />\r\n<h2>{$key}</h2>\r\n<table>\r\nEOL;\r\n\r\n	foreach ($data[$key] as $item=>$count) {\r\n		echo <<<EOL\r\n<tr>\r\n	<td>$item</td>\r\n	<td align=\"right\">$count</td>\r\n</tr>\r\nEOL;\r\n	}\r\n\r\n	echo <<<EOL\r\n</table>\r\nEOL;\r\n\r\n}\r\n?>'),(4962,299,0.23,'php','0','Page created.',1141977601,2,'24.2.76.126','<form method=\"get\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"<?php echo $_REQUEST[\'pg\']; ?>\" />\r\nDate: <input type=\"text\" name=\"date\" value=\"<?php echo $_REQUEST[\'date\']; ?>\" />\r\n<input type=\"submit\" value=\"Go\" />\r\n</form>\r\n\r\n<?php\r\n\r\n$targetDate = ($_REQUEST[\'date\']) ? strtotime($_REQUEST[\'date\']) : 0;\r\n\r\nif (0 >= $targetDate) {\r\n	return;\r\n}\r\n\r\n$targetFile = \"/www/logs/\" . date(\'Ymd\', $targetDate) . \"_request_log.php\";\r\n\r\n$fp = @fopen($targetFile, \'r\');\r\n\r\nif (!$fp) {\r\n	echo \"No report for \" . $_REQUEST[\'date\'] . \"<br />\";\r\n	return;\r\n}\r\n\r\n$data = array();\r\n$totalCount = 0;\r\n$totalTime = 0.0;\r\n$totalQueries = 0;\r\n\r\nwhile (!feof($fp)) {\r\n	$line = fgets($fp, 4096);\r\n	$lineItems = split(\',\', $line);\r\n\r\n	$totalCount++;\r\n	$data[\'vanities\'][$lineItems[0]]++;\r\n	$data[\'domains\'][$lineItems[1]]++;\r\n	$totalTime += (float) $lineItems[2];\r\n	$data[\'pages\'][$lineItems[3]]++;\r\n	$totalQueries += (int) $lineItems[4];\r\n	$data[\'users\'][$lineItems[7]]++;\r\n	$data[\'ips\'][$lineItems[8]]++;\r\n}\r\n\r\nfclose($fp);\r\n\r\n$totalIps = count($data[\'ips\']);\r\n$totalUsers = count($data[\'users\']);\r\n\r\necho \"<h1>Report for: \" . date(\"l, F d, Y\", $targetDate) . \"</h1>\";\r\n\r\necho \"Total hits: <b>$totalCount</b><br />\";\r\necho \"Total time processing: <b>$totalTime seconds</b> (<b>\" . ($totalTime / 60) . \" minutes</b>)<br />\";\r\necho \"Average time processing: <b>\" . ($totalTime / $totalCount) . \"</b><br />\";\r\necho \"Queries processed: <b>$totalQueries</b><br />\";\r\necho \"Average queries processed: <b>\" . ($totalQueries / $totalCount) . \"</b><br />\";\r\necho \"Unique IP Addresses: <b>$totalIps</b><br />\";\r\necho \"Unique users: <b>$totalUsers</b><br />\";\r\n\r\n$keys = array_keys($data);\r\n\r\nforeach ($keys as $key) {\r\n	arsort($data[$key]);\r\n	\r\n	echo <<<EOL\r\n<br />\r\n<h2>{$key}</h2>\r\n<table>\r\nEOL;\r\n\r\n	foreach ($data[$key] as $item=>$count) {\r\n		echo <<<EOL\r\n<tr>\r\n	<td>$item</td>\r\n	<td align=\"right\">$count</td>\r\n</tr>\r\nEOL;\r\n	}\r\n\r\n	echo <<<EOL\r\n</table>\r\nEOL;\r\n\r\n}\r\n?>'),(4964,299,0.25,'php','0','Page created.',1141977716,2,'24.2.76.126','<h1>Site Usage Report</h1>\r\n<form method=\"get\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"<?php echo $_REQUEST[\'pg\']; ?>\" />\r\nDate: <input type=\"text\" name=\"date\" value=\"<?php echo $_REQUEST[\'date\']; ?>\" />\r\n<input type=\"submit\" value=\"Go\" />\r\n</form>\r\n\r\n<?php\r\n\r\n$targetDate = ($_REQUEST[\'date\']) ? strtotime($_REQUEST[\'date\']) : 0;\r\n\r\nif (0 >= $targetDate) {\r\n	return;\r\n}\r\n\r\n$targetFile = \"/www/logs/\" . date(\'Ymd\', $targetDate) . \"_request_log.php\";\r\n\r\n$fp = @fopen($targetFile, \'r\');\r\n\r\nif (!$fp) {\r\n	echo \"No report for \" . $_REQUEST[\'date\'] . \"<br />\";\r\n	return;\r\n}\r\n\r\n$data = array();\r\n$totalCount = 0;\r\n$totalTime = 0.0;\r\n$totalQueries = 0;\r\n\r\nwhile (!feof($fp)) {\r\n	$line = fgets($fp, 4096);\r\n	$lineItems = split(\',\', $line);\r\n\r\n	$totalCount++;\r\n	$data[\'vanities\'][$lineItems[0]]++;\r\n	$data[\'domains\'][$lineItems[1]]++;\r\n	$totalTime += (float) $lineItems[2];\r\n	$data[\'pages\'][$lineItems[3]]++;\r\n	$totalQueries += (int) $lineItems[4];\r\n	$data[\'users\'][$lineItems[7]]++;\r\n	$data[\'ips\'][$lineItems[8]]++;\r\n}\r\n\r\nfclose($fp);\r\n\r\n$totalIps = count($data[\'ips\']);\r\n$totalUsers = count($data[\'users\']);\r\n\r\necho \"<h1>Report for: \" . date(\"l, F j, Y\", $targetDate) . \"</h1>\";\r\n\r\necho \"Total hits: <b>$totalCount</b><br />\";\r\necho \"Total time processing: <b>$totalTime seconds</b> (<b>\" . ($totalTime / 60) . \" minutes</b>)<br />\";\r\necho \"Average time processing: <b>\" . ($totalTime / $totalCount) . \"</b><br />\";\r\necho \"Queries processed: <b>$totalQueries</b><br />\";\r\necho \"Average queries processed: <b>\" . ($totalQueries / $totalCount) . \"</b><br />\";\r\necho \"Unique IP Addresses: <b>$totalIps</b><br />\";\r\necho \"Unique users: <b>$totalUsers</b><br />\";\r\n\r\n$keys = array_keys($data);\r\n\r\nforeach ($keys as $key) {\r\n	arsort($data[$key]);\r\n	\r\n	echo <<<EOL\r\n<br />\r\n<h2>{$key}</h2>\r\n<table>\r\nEOL;\r\n\r\n	foreach ($data[$key] as $item=>$count) {\r\n		echo <<<EOL\r\n<tr>\r\n	<td>$item</td>\r\n	<td align=\"right\">$count</td>\r\n</tr>\r\nEOL;\r\n	}\r\n\r\n	echo <<<EOL\r\n</table>\r\nEOL;\r\n\r\n}\r\n?>'),(4966,299,0.27,'php','1','Page created.',1141977905,2,'24.2.76.126','<h1>Site Usage Report</h1>\r\n<form method=\"get\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"<?php echo $_REQUEST[\'pg\']; ?>\" />\r\nDate: <input type=\"text\" name=\"date\" value=\"<?php echo $_REQUEST[\'date\']; ?>\" />\r\n<input type=\"submit\" value=\"Go\" />\r\n</form>\r\n\r\n<?php\r\n\r\n$targetDate = ($_REQUEST[\'date\']) ? strtotime($_REQUEST[\'date\']) : 0;\r\n\r\nif (0 >= $targetDate) {\r\n	return;\r\n}\r\n\r\n$targetFile = \"/www/logs/\" . date(\'Ymd\', $targetDate) . \"_request_log.php\";\r\n\r\n$fp = @fopen($targetFile, \'r\');\r\n\r\nif (!$fp) {\r\n	echo \"No report for \" . $_REQUEST[\'date\'] . \"<br />\";\r\n	return;\r\n}\r\n\r\n$data = array();\r\n$totalCount = 0;\r\n$totalTime = 0.0;\r\n$totalQueries = 0;\r\n\r\nwhile (!feof($fp)) {\r\n	$line = fgets($fp, 4096);\r\n	$lineItems = split(\',\', $line);\r\n\r\n	$totalCount++;\r\n	$data[\'vanities\'][$lineItems[0]]++;\r\n	$data[\'domains\'][$lineItems[1]]++;\r\n	$totalTime += (float) $lineItems[2];\r\n	$data[\'pages\'][$lineItems[3]]++;\r\n	$totalQueries += (int) $lineItems[4];\r\n	$data[\'users\'][$lineItems[7]]++;\r\n	$data[\'ips\'][$lineItems[8]]++;\r\n}\r\n\r\nfclose($fp);\r\n\r\n$totalIps = count($data[\'ips\']);\r\n$totalUsers = count($data[\'users\']);\r\n\r\necho \"<h1>Report for: \" . date(\"l, F j, Y\", $targetDate) . \"</h1>\";\r\n\r\necho \"Total hits: <b>$totalCount</b><br />\";\r\necho \"Total time processing: <b>$totalTime seconds</b> (<b>\" . ($totalTime / 60) . \" minutes</b>)<br />\";\r\necho \"Average time processing: <b>\" . ($totalTime / $totalCount) . \"</b><br />\";\r\necho \"Queries processed: <b>$totalQueries</b><br />\";\r\necho \"Average queries processed: <b>\" . ($totalQueries / $totalCount) . \"</b><br />\";\r\necho \"Unique IP Addresses: <b>$totalIps</b><br />\";\r\necho \"Unique users: <b>$totalUsers</b><br />\";\r\n\r\n$keys = array_keys($data);\r\n\r\necho \"<table>\\n\";\r\n\r\nforeach ($keys as $key) {\r\n	arsort($data[$key]);\r\n	\r\n	echo <<<EOL\r\n<tr>\r\n	<td colspan=\"2\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"2\"><h2>{$key}</h2></td>\r\n</tr>\r\nEOL;\r\n\r\n	foreach ($data[$key] as $item=>$count) {\r\n		echo <<<EOL\r\n<tr>\r\n	<td>$item</td>\r\n	<td align=\"right\">$count</td>\r\n</tr>\r\nEOL;\r\n	}\r\n\r\n	echo <<<EOL\r\nEOL;\r\n\r\n}\r\n\r\necho \"</table>\\n\";\r\n\r\n?>'),(4967,272,0.63,'smarty','0','David JS Working...',1142034881,2271,'216.194.127.150','{include file=\"shared:layouts/comp_create_navbar.tpl\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<table width=\"100%\" border=0>\r\n <tr>\r\n  <td nowrap><h2> A. Competing for...</h2></td>\r\n  <td nowrap><h2>B. The competition name is...</h2></td>\r\n  <td nowrap><h2>C. How\'s competing...</h2></td>\r\n </tr>\r\n <tr>\r\n  <td valign=\"top\" width=\"30%\">\r\n    <small>\r\n      <input type=\"radio\" name=\"comp[type]\" value=\"p2p\" checked> <a href=\"javascript:setCompType(\'p2p\');\">Pound for pound <i>(Weight lost)</i></a><br />\r\n      <input type=\"radio\" name=\"comp[type]\" value=\"pctWt\"> <a href=\"javascript:setCompType(\'pctWt\');\">Percent of body weight lost</a><br />\r\n      <input type=\"radio\" name=\"comp[type]\" value=\"minEx\"> <a href=\"javascript:setCompType(\'minEx\');\">Total minutes excercised</a><br />\r\n      <input type=\"radio\" name=\"comp[type]\" value=\"disEx\"> <a href=\"javascript:setCompType(\'disEx\');\">Total distance excercised</a><br />\r\n      <input type=\"radio\" name=\"comp[type]\" value=\"veg\"> <a href=\"javascript:setCompType(\'veg\');\">Vegitable challenge</a><br />\r\n      <input type=\"radio\" name=\"comp[type]\" value=\"gain\"> <a href=\"javascript:setCompType(\'gain\');\">Weight gained</a><br />\r\n    </small>\r\n  </td>\r\n  <td valign=\"top\">\r\n    <table border=0 cellspacing=0>\r\n    <tr>\r\n      <td><h3>Name:</h3></td>\r\n      <td><input type=\"text\" name=\"comp[title]\" /></td>\r\n    </tr>\r\n    <tr>\r\n      <td valign=\"top\"><small><b>Examples:</b></small></td>\r\n      <td><small>&quot;The chubby family reunion&quot;<br />&quot;Company shape-up marathon&quot;<br />&quot;Super Summer Slimdown&quot;</small></td>\r\n    </tr>\r\n    <tr>\r\n      <td colspan=\"2\">\r\n	<br/>\r\n        <div style=\"border:solid 1px black;width:98%;height:60px;\">\r\n	  test\r\n	</div>\r\n      </td>\r\n    </tr>\r\n    </table>\r\n  </td>\r\n  <td valign=\"top\">\r\n     <table border=0 cellpaddin=0 cellspacing=0>\r\n      <tr>\r\n	<td colspan=\"2\">\r\n	  <div id=\'enterFriendNameDiv\' style=\'display:block;position:relative\'>\r\n	   <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n	     <tr>\r\n	       <td colspan=2><li>Invate your friends</li></td>\r\n             </tr>\r\n             <tr>\r\n	       <td align=\"right\">\r\n	         <small>\r\n		   My friend\'s Name:\r\n                 </small>\r\n	       </td>\r\n	       <td>\r\n	         <input type=\"text id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" />\r\n	       </td>\r\n             </tr>\r\n             <tr>\r\n	       <td align=\"right\">\r\n	         <small>\r\n		   My friend\'s Email:\r\n	         </small>\r\n	       </td>\r\n	       <td>\r\n		  <input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" />\r\n	       </td>\r\n             </tr>\r\n             <tr>\r\n	       <td colspan=\"2\" align=\"right\">\r\n	         <small>\r\n		   <span onclick=\"extraCompetitors(\'open\');\" style=\"cursor:pointer;\">\r\n                     Add more\r\n                   </span>\r\n                 </small>\r\n	        </td>\r\n             </tr>\r\n	   </table>\r\n	  <div>\r\n	  <div id=\"myEnteredFriends\" style=\"display:none;position:relative\">\r\n	  </div>\r\n	</td>\r\n      </tr>\r\n      <tr><td colspan=\"2\"><li>Send them an email</li></td></tr>\r\n      <tr>\r\n        <td valign=\"top\" colspan=2>\r\n	  <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n	      <tr>\r\n		 <td valign=\"top\">\r\n		    <small>\r\n			<table border=0 cellpadding=0 cellspacing=0 width=\"100%\">\r\n			  <tr><td id=\'kind\'><input type=\"radio\" value=\"kind\" name=\"comp[invite_type]\" onclick=\"setInviteStyle(\'kind\');\"/> <a href=\"javascript:setInviteStyle(\'kind\');\">Kind</a></td></tr>\r\n			  <tr><td id=\'smack\'><input type=\"radio\" value=\"smack\" name=\"comp[invite_type]\" onclick=\"setInviteStyle(\'smack\');\"/> <a href=\"javascript:setInviteStyle(\'smack\');\">Smack</a></td></tr>\r\n			  <tr><td id=\'challenge\'><input type=\"radio\" value=\"challenge\" name=\"comp[invite_type]\" onclick=\"setInviteStyle(\'challenge\');\" /> <a href=\"javascript:setInviteStyle(\'challenge\');\">Challenge</a></td></tr>\r\n			  <tr><td id=\'custom\'><input type=\"radio\" value=\"custom\" name=\"comp[invite_type]\" onclick=\"setInviteStyle(\'custom\');\"/> <a href=\"javascript:setInviteStyle(\'custom\');\">Make Your Own</a></td></tr>\r\n                        </table>\r\n		    </small>\r\n		 </td>\r\n		 <td valign=\"top\">\r\n		    <div id=\"InvateW\" style=\"border-bottom:solid 1px #CCC;border-left:solid 1px #CCC;padding-right:5px;visibility:hidden;\">\r\n			<small>\r\n			   <input type=\"radio\" value=\"heavy\" name=\"comp[invite_subtype]\" /> <a href=\"javascript:setInviteWeight(\'heavy\');\">Heavy</a><br />\r\n			   <input type=\"radio\" value=\"medium\" name=\"comp[invite_subtype]\" /> <a href=\"javascript:setInviteWeight(\'medium\');\">Medium</a><br />\r\n			   <input type=\"radio\" value=\"light\" name=\"comp[invite_subtype]\" /> <a href=\"javascript:setInviteWeight(\'light\');\">Light</a><br />\r\n			</small>\r\n		    </div>\r\n		</td>\r\n	     </tr>\r\n	  </table>\r\n        </td>\r\n     </tr>\r\n     </table>\r\n  </td>\r\n</tr>\r\n</table>\r\n<br />\r\n<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n <tr>\r\n   <td align=\"right\">tab</td>\r\n </tr>\r\n <tr>\r\n   <td>\r\n      <div id=\"letterHolder\" name=\"letterHolder\" style=\"border:solid 1px black;height:410px;width:100%\">\r\n      </div>\r\n   </td>\r\n </tr>\r\n</table>\r\n{* <iframe src=\"?pg=compCreate/inviteFrame\" style=\"width:100%;height:410px;\" scrollbars=\"no\" frameborder=\"0\"></iframe> *}\r\n\r\n<div id=\"invite-div\"></div>\r\n<br />\r\n\r\n<div align=\"right\">\r\n  <a href=\"?pg=compCreate/step2\"><img src=\"{$skinFolder}images/btn_next.gif\" alt=\"Next\" border=\"0\" /></a>\r\n</div>\r\n\r\n<div id=\"myCompetitors\" style=\"width:300px;background-color:white;zIndex:100;position:absolute;display:none;top:-70px;left:300px;border:solid 1px #CCC;filter: alpha(opacity=90)\">\r\n  <center>\r\n   <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"95%\">\r\n      <tr><td align=\"right\" valign=\"top\" style=\"height:5px\"><small><span style=\"cursor:pointer;\" onclick=\"extraCompetitors(\'close\');\">close window</span><small></td></tr>\r\n      <tr><td style=\"border-bottom:solid 1px #CCC;\"><h2>More Competitors...</td></tr>\r\n      <tr>\r\n         <td align=\"center\">\r\n	    <table id=\"competitorsTable\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"90%\">\r\n                <tr>\r\n		  <td></td>\r\n		  <td align=\"center\" valign=\"bottom\">Name</td>\r\n                  <td align=\"center\" valign=\"bottom\">Email</td>\r\n                </tr>\r\n	        <tr>\r\n		  <td>2.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>3.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>4.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>5.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>6.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>7.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>8.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>9.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>10.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n	        <tr>\r\n		  <td>11.</td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_name]\" name=\"comp[competitor_name]\" style=\"width:110px;\" /></td>\r\n		  <td><input type=\"text\" id=\"comp[competitor_email]\" name=\"comp[competitor_email]\" style=\"width:110px;\" /></td>\r\n		</tr>\r\n		<tr>\r\n		  <td colspan=\"3\" align=\"right\"><small><span style=\"cursor:pointer;\" onclick=\'addMoreCompetitors();\'>Add More Lines</span></small></td>\r\n		</tr>\r\n            </table>\r\n         </td>\r\n      </tr>\r\n      <tr>\r\n	<td align=\"right\" style=\"border-top:solid 1px #CCC;\"><img style=\"cursor:pointer;\" onclick=\"addingCompetitors();\" src=\"{$skinFolder}images/btn_next.gif\" alt=\"Add\" border=\"0\" /></td>\r\n      </tr>\r\n   </table>\r\n  </center>\r\n</div>\r\n\r\n</form>\r\n\r\n<script language=\"javascript\" type=\"text/javascript\" src=\"/js/js-get-data.js\"></script>\r\n<script language=\"javascript\" type=\"text/javascript\" src=\"/js/AJAX.js\"></script>\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n        //jsGetData(\'?pg=jsGetData\',\'invite-div\', \'madlib.form\', \'&compType=friends&inviteType=smack\');\r\n\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	function setCompType(type) {\r\n		checkValue(type, \'comp[type]\');\r\n	}\r\n\r\n	function setInviteStyle(type) {\r\n		checkValue(type, \'comp[invite_type]\');\r\n		var oInvateW = document.getElementById(\'InvateW\');\r\n		\r\n		if(type == \'custom\')\r\n		  oInvateW.style.visibility = \"hidden\";\r\n		else\r\n 		  oInvateW.style.visibility = \"visible\";\r\n\r\n	        setTypeUnderLine(type);\r\n 	}\r\n\r\n	function setInviteWeight(type) {\r\n		checkValue(type, \'comp[invite_subtype]\');\r\n	}\r\n\r\n	function checkValue(type, eName) {\r\n		var aInput=document.getElementsByName(eName);\r\n		for (i = 0; i < aInput.length; i++)\r\n		{\r\n			aInput[i].checked = (aInput[i].value == type) ? true : false;\r\n		}\r\n	}\r\n\r\n	/*  This functions should go inside of JS file  *******/\r\n\r\n	var prevType = \"\";\r\n	function setTypeUnderLine(type)\r\n	{\r\n	    if(prevType != \"\")\r\n	    {\r\n		var oldTypeLine = eval(\"document.getElementById(\'\"+prevType+\"\')\");\r\n		oldTypeLine.style.borderBottom = \"\";\r\n            }\r\n	    var oTypeLine = eval(\"document.getElementById(\'\"+type+\"\')\");\r\n	    oTypeLine.style.borderBottom = \"solid 1px #CCC\";\r\n	    prevType = type;\r\n	    return;\r\n	}\r\n\r\n	// This function adds a new row in the CompetitorsTable to add more competitors\r\n        // the current limit of competitors is 10\r\n	function addMoreCompetitors()\r\n	{\r\n	  var oTable = document.getElementById(\"competitorsTable\");\r\n	  var rowNum = oTable.rows.length - 1;\r\n          if(rowNum >= 15){\r\n		alert(\'message: No more than 15\');\r\n		return;\r\n	  }\r\n	  var w = oTable.insertRow(rowNum);\r\n	  var x = w.insertCell(0);\r\n	  var y = w.insertCell(1);\r\n	  var z = w.insertCell(2);\r\n	\r\n	  rowNum++;\r\n	  x.innerHTML = rowNum + \".\";\r\n	  y.innerHTML = \"<input type=\'text\' id=\'comp[competitor_name]\' name=\'comp[competitor_name]\' style=\'width:110px;\' />\";\r\n	  z.innerHTML = \"<input type=\'text\' id=\'comp[competitor_email]\' name=\'comp[competitor_email]\' style=\'width:110px;\' />\";\r\n	  \r\n	  return;\r\n	}\r\n\r\n	function extraCompetitors(type){\r\n	  var oDiv = document.getElementById(\"myCompetitors\");\r\n\r\n	  if(type == \"close\"){\r\n	     oDiv.style.display = \"none\";\r\n	  }else{\r\n	      var nameValidator = document.getElementsByName(\"comp[competitor_name]\");\r\n	      var emailValidator = document.getElementsByName(\"comp[competitor_email]\");\r\n	\r\n		/*alert(nameValidator[0].value);\r\n		alert(emailValidator[0].value);*/\r\n	        if(nameValidator[0].value != \"\" && emailValidator[0].value != \"\")\r\n		{\r\n		   var goOn = validateEmail(emailValidator[0].value,0);\r\n		   if(!goOn)\r\n		     return;\r\n     \r\n		   oDiv.style.display = \"block\";\r\n	        }\r\n		else\r\n		{\r\n		   if(nameValidator[0].value == \"\" && emailValidator[0].value == \"\"){\r\n			alert(\"Please enter the information of your first competitor before adding more competitors\");\r\n			return;\r\n		   }\r\n		   if(nameValidator[0].value == \"\"){\r\n		   	alert(\"Please enter the name of your first competitor before adding more competitors\");\r\n			return;\r\n		   }\r\n		   if(emailValidator[0].value == \"\"){\r\n			alert(\"Please enter the email of your first competitor before adding more competitors\");\r\n			return;\r\n		   }\r\n\r\n	        }\r\n	  }\r\n	  return;\r\n	}\r\n\r\n	function validateEmail(email,comp){\r\n	  var validated = false;\r\n	  var at = false;\r\n	  var dot = false;\r\n	  comp = comp + 1;\r\n\r\n	  if(email.indexOf(\"@\") > -1)\r\n		at = true;\r\n\r\n	  if(email.indexOf(\".\") > -1)\r\n		dot = true;\r\n\r\n\r\n	  if(dot && at)\r\n		validated = true;\r\n\r\n	  if(!dot && at)\r\n	     alert(\'Please correct the email address for competitor \'+comp+\', (.) character missing\');\r\n\r\n	  if(!at && dot)\r\n	     alert(\'Please correct the email address for competitor \'+comp+\', (@) character missing\');\r\n\r\n	  if(!validated && !at && !dot)\r\n	     alert(\'Please enter a valid email address for competitor \'+comp);\r\n	\r\n	  return validated;        \r\n	}\r\n\r\n	function addingCompetitors()\r\n        {\r\n	   var nameValidator = document.getElementsByName(\"comp[competitor_name]\");\r\n	   var emailValidator = document.getElementsByName(\"comp[competitor_email]\");\r\n	   var validator;\r\n\r\n	   for(i=1;i<nameValidator.length;i++)\r\n	   {\r\n	      if(nameValidator[i].value != \"\"){\r\n	         validator = validateEmail(emailValidator[i].value,i);\r\n		 highLigh(\'competitorsTable\',i,2,validator);\r\n		 if(!validator){\r\n		   return false;\r\n	         }\r\n	      }\r\n	   }	\r\n	}\r\n\r\n	function highLigh(tableName,row,cell,validator){\r\n	   var oTable = eval(\"document.getElementById(\'\"+tableName+\"\')\");\r\n	   var highLightRow = oTable.rows[row].cells[cell];\r\n	   highLightRow.style.backgroundColor = !validator ? \"darkred\" : \"\";\r\n           return;\r\n	}\r\n\r\n	{/literal}\r\n</script>'),(4957,299,0.18,'php','0','Page created.',1141976871,2,'24.2.76.126','<?php\r\n\r\n$fp = fopen(\"/www/logs/20060227_request_log.php\", \'r\');\r\n\r\n$data = array();\r\n$totalCount = 0;\r\n$totalTime = 0.0;\r\n$totalQueries = 0;\r\n\r\nwhile (!feof($fp)) {\r\n	$line = fgets($fp, 4096);\r\n	$lineItems = split(\',\', $line);\r\n\r\n	$totalCount++;\r\n	$data[\'vanities\'][$lineItems[0]]++;\r\n	$data[\'domains\'][$lineItems[1]]++;\r\n	$totalTime += (float) $lineItems[2];\r\n	$data[\'pages\'][$lineItems[3]]++;\r\n	$totalQueries += (int) $lineItems[4];\r\n	$data[\'users\'][$lineItems[7]]++;\r\n	$data[\'ips\'][$lineItems[8]]++;\r\n}\r\n\r\nfclose($fp);\r\n\r\n$totalIps = count($data[\'ips\']);\r\n$totalUsers = count($data[\'users\']);\r\n\r\n\r\necho \"Total hits: <b>$totalCount</b><br />\";\r\necho \"Total time processing: <b>$totalTime seconds</b> (<b>\" . ($totalTime / 60) . \" minutes</b>)<br />\";\r\necho \"Average time processing: <b>\" . ($totalTime / $totalCount) . \"</b><br />\";\r\necho \"Queries processed: <b>$totalQueries</b><br />\";\r\necho \"Average queries processed: <b>\" . ($totalQueries / $totalCount) . \"</b><br />\";\r\necho \"Unique IP Addresses: <b>$totalIps</b><br />\";\r\necho \"Unique users: <b>$totalUsers</b><br />\";\r\n\r\n$keys = array_keys($data);\r\n\r\nforeach ($keys as $key) {\r\n	arsort($data[$key]);\r\n	\r\n	echo <<<EOL\r\n<h2>{$key}</h2>\r\n<table>\r\nEOL;\r\n\r\n	foreach ($data[$key] as $item=>$count) {\r\n		echo <<<EOL\r\n<tr>\r\n	<td>$item</td>\r\n	<td align=\"right\">$count</td>\r\n</tr>\r\nEOL;\r\n	}\r\n\r\n	echo <<<EOL\r\n</table>\r\nEOL;\r\n\r\n}\r\n?>'),(3770,234,0.13,'smarty','0','Page created.',1118204493,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/solutions.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n'),(3771,234,0.14,'smarty','0','Page created.',1118204603,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/solutions.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at jbmommers@gmail.com\r\n'),(3772,234,0.15,'smarty','0','Page created.',1118204749,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at jbmommers@gmail.com\r\n'),(3773,234,0.16,'smarty','0','Page created.',1118204804,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"300\" width=\"200\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at jbmommers@gmail.com\r\n'),(3774,234,0.17,'smarty','0','Page created.',1118204831,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"350\" width=\"200\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at jbmommers@gmail.com\r\n'),(3775,234,0.18,'smarty','0','Page created.',1118204847,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"350\" width=\"250\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at jbmommers@gmail.com\r\n'),(3776,234,0.19,'smarty','0','Page created.',1118204941,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"350\" width=\"250\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at <A href=\"mailto:jbmommers@gmail.com\">jbmommers@gmail.com\r\n'),(3777,234,0.20,'smarty','0','Page created.',1118204965,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"350\" width=\"250\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the Easter candy! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email the Mommers with your comments and thoughts at <A href=\"mailto:jbmommers@gmail.com\"><u>jbmommers@gmail.com</u>\r\n'),(3778,234,0.21,'smarty','0','Page created.',1118207701,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"350\" width=\"250\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and altough\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the chocolate chips! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email me with your comments and thoughts at <A href=\"mailto:jbmommers@gmail.com\"><u>jbmommers@gmail.com</u>\r\n'),(3779,234,0.22,'smarty','0','Page created.',1118208085,16,'128.187.0.164','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<img src=\"{$skinFolder}images/jeans.jpg\" align=\"right\" alt=\"\" class=\"img1\" height=\"350\" width=\"250\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Hey all you health freaks out there!</p>\r\n <p> Ok, so if that doesn\'t apply to you I must admit that it doesn\'t apply to\r\nme either.  I have, however, been weight conscious since I was about 15 and\r\nso I have tried a lot of ways to get and keep in shape.  What motivates you?\r\n I can tell you that one of the big motivators for me is not having my\r\npants too tight!  There is nothing worse than pulling a pair of pants out of\r\nyour closet, (or off of your floor), putting them on and then having them\r\nuncomfortably too tight.  Many a time  I have worn these pants about 10\r\nminutes and then changed to something bigger or something with an elastic\r\nwaist.  On the other hand there is something so satisfying to pull on a pair\r\nof pants and have them button with ease and it gets even better if they are\r\na little loose!  Heaven!  So how do we get that satisfaction?  It is\r\nprobably different for each of us.  If you\'d like to share your secret\r\nmotivators email me and I will share them in my next article.</p>\r\n\r\n  <p>Here\'s something that has helped me.  I once read an article and although\r\nI can\'t remember its exact title it had something to do with \"cold turkey\".\r\nThe main idea the author shared was how she lost weight by going \"cold\r\nturkey\".  She gave up every fatting food she craved and loved, \"cold\r\nturkey\".  She once flushed the leftovers of an ice cream cake down the\r\ntoilet after the party because she knew if she left it in the house she\r\nwould eat it.  That was inspiring!  I was never able to totally go cold\r\nturkey but I could pick an unhealthy habit to give up.  If you pick just one\r\nthing this week to change it might be as satisfying as those loose pants!  I\r\nthink I\'ll quit sneaking into the chocolate chips! </p>\r\n\r\n<p> Good Luck everyone.<br /> Jill</p>\r\n\r\n<p>Email me with your comments and thoughts at <A href=\"mailto:jbmommers@gmail.com\"><u>jbmommers@gmail.com</u>\r\n'),(4467,210,0.28,'smarty','0','Made it still show the page even if there are no joinable comps.',1129690357,2,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title}</h1>\r\n<br />\r\n<h2 class=\"withBG\">{$smarty.session.company.companyName}</h2>\r\n\r\n{include_php file=\"shared_handle:availableCompetitions\"}\r\n\r\n<form name=\"joinCompetitions\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n\r\n{* style_table folder=\"img/st/floatbox\" *}\r\n  <table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\">\r\n	<tr>\r\n		<td bgcolor=\"#EEEEEE\">&nbsp;</td>\r\n		<td bgcolor=\"#EEEEEE\"><b>ID #</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Title</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Start Date</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>End Date</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Style</b></td>\r\n		<td bgcolor=\"#EEEEEE\"><b>Scoring Method</b></td>\r\n	</tr>\r\n	{foreach from=$availableCompetitions item=\"comp\"}\r\n	<tr>\r\n		{if not $user->inGroupName($comp.code)}\r\n		{assign var=\"isJoinable\" value=\"true\"}\r\n		<td><input type=\"checkbox\" name=\"joinComp[]\" value=\"{$comp.id}\" /></td>\r\n		<td>{$comp.id}</td>\r\n		<td>{$comp.title}</td>\r\n		<td>{$comp.startDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.endDate|date_format2:\"D n/j/y\"}</td>\r\n		<td>{$comp.style}</td>\r\n		<td>{$comp.scoringMethod}</td>\r\n		{else}\r\n		{assign var=\"isInComps\" value=\"true\"}\r\n		<td bgcolor=\"#FFCCCC\">&times;</td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.id}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.title}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.startDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.endDate|date_format2:\"D n/j/y\"}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.style}</i></td>\r\n		<td bgcolor=\"#FFCCCC\"><i>{$comp.scoringMethod}</i></td>\r\n		{/if}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"7\" align=\"center\">There are currently no active competitions available.</td>\r\n	</tr>	\r\n	{/foreach}\r\n  </table>\r\n{* /style_table *}\r\n\r\n{* if !$isJoinable}{* log_error message=\'There are no competitions to join\' db_log=0 is_critical=0 * }{store_messages}{redirect href=\"?pg=my_login\"}{/if *}\r\n\r\n<br />\r\n<div align=\"center\">{if $isJoinable}<input type=\"submit\" name=\"submitBtn\" value=\"Join Selected Competitions\" /> <input type=\"submit\" name=\"submitBtn\" value=\"Join Later\" />{else}<b>No Competitions To Join</b> <input type=\"submit\" name=\"submitBtn\" value=\"Go to My Home\" />{/if}</div>\r\n{if $isInComps}\r\n<br />\r\n<div style=\"background-color:#FCC; margin-left:20px; width:250px;\">&times; - You are already a member</div>\r\n{/if}\r\n\r\n</form>\r\n\r\n{if $company.vanity eq \"myfamily\"}\r\n<div>\r\nClick <a href=\"?pg=5to9Rules\">here</a> for the 5 to 9 a-day instructions and rules\r\n</div>\r\n{/if}'),(5320,233,1.67,'smarty','0','Trying to get team captains showing.',1256619566,2,'71.195.230.181','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{assign var=\"GUIDs\" value=\"\"}\r\n\r\n{select_query assign=\"managerId\" return=\"val\"}\r\n	userId FROM competitions c WHERE c.id = {$smarty.request.cid}\r\n{/select_query}\r\n\r\n{if $managerId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	<!-- ismanager -->\r\n{/if}\r\n\r\n{if $isManager or \'yes\' == $smarty.session.company.preferences.anyone_joins_teams}\r\n	{assign var=\"canCreateTeams\" value=\"true\"}\r\n	{assign var=\"canAssignToTeams\" value=\"true\"}\r\n	{include_php file=\"shared_handle:competition/management\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition/load\"}\r\n\r\n<script type=\"text/javascript\">{literal}\r\n	var GUIDs = \'0\';\r\n\r\n	function updateGUIDs() {\r\n		var checkBoxes = document.forms[\'leaderBoardForm\'][\"graphCheckbox[]\"];\r\n		if (!checkBoxes.length) {\r\n			checkBoxes[0] = checkBoxes;\r\n			checkBoxes.length = 1;\r\n		}\r\n		GUIDs = \'\';\r\n		for (var x = 0; x < checkBoxes.length; x++) {\r\n			if (checkBoxes[x].checked == true && checkBoxes[x].value) {\r\n				GUIDs += checkBoxes[x].value+\',\'; \r\n			}\r\n			\r\n		}\r\n		rewriteGraphLinks();\r\n	}\r\n\r\n\r\n	function loadGraphWindow(graphParams) {\r\n		uri = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}; //&\'+graphParams+\'&userIds=\'+GUIDs;\r\n		var gFrame = window.frames[\'graphwindow\'];\r\n		// gFrame.location.replace(uri);\r\n		var gForm = document.getElementById(\'form_leaderBoard\');\r\n		gForm.gParams.value = graphParams;\r\n		gForm.userIds.value = GUIDs;\r\n		gForm.submit();\r\n		return false;\r\n	}\r\n{/literal}</script>\r\n\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\r\n\r\n{capture name=\"scoringMethod\"}\r\n	<b>{$competition.current_parameter.name|capitalize}</b> ({$competition.current_parameter.units}) - {$competition.current_parameter.basedOn|capitalize}{* - {$competition.current_parameter.polarity|capitalize} *}\r\n{/capture}\r\n\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" width=\"275\">\r\n\r\n		{if $competition.prizes|@count}\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'winners\', \'\', \'showHide\');\"><img id=\"winners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Winners\r\n		</h2>\r\n\r\n		<div id=\"winners\" style=\"display:block;\">\r\n		{foreach from=$competition.prizes item=\"prize\" key=\"prizeId\"}\r\n			<a href=\"javascript://\" onclick=\"window.open(\'?pg=competition/winners&cid={$competition.id}&prizeId={$prizeId}\', \'\', \'height=425,width=300,menubar=no,status=no,scrollbars=yes,titlebar=no,resizable=yes\');\">{$prize.title}</a><br />\r\n		{/foreach}\r\n		</div>\r\n		{/if}\r\n		\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'leaderBoard\', \'\', \'showHide\');\"><img id=\"leaderBoard_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Leaders\r\n		</h2>\r\n		\r\n		{if $competition.dateOfObject}<div align=\"right\"><small><i>as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}</i></small></div>{/if}\r\n\r\n		<div id=\"leaderBoard\" style=\"display:block;\">\r\n		<small>{$smarty.capture.scoringMethod}</small><br />\r\n		{if $competition.style eq \"Group-vs-Group\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Team Average)</div>\r\n		{elseif $competition.style eq \"Company-vs-Company\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Company Average)</div>\r\n		{/if}\r\n		{if $competition.parameters|@count gt 1}\r\n			<select name=\"scoringMethod\" onchange=\"if(this.value)location.replace(\'?pg={$page.name}&cid={$competition.id}&cpid=\'+this.value);\" style=\"width:200px;\">\r\n				<option value=\"\">(Choose Leaderboard)</option>\r\n			{foreach from=$competition.parameters key=\"paramId\" item=\"param\"}\r\n				{if $paramId neq $competition.current_parameter.id}\r\n				<option value=\"{$paramId}\">{$param.name|capitalize} - {$param.basedOn|capitalize}{* - {$param.polarity} *}</option>\r\n				{/if}\r\n			{/foreach}\r\n			</select>\r\n		{/if}\r\n		<form id=\"form_leaderBoard\" name=\"leaderBoardForm\" method=\"POST\" action=\"index.php?pg=flashgraph-frame&compId={$competition.id}\" target=\"graphwindow\">\r\n		<input type=\"hidden\" name=\"gParams\" value=\"\" />\r\n		<input type=\"hidden\" name=\"userIds\" value=\"\" />\r\n		<table cellpadding=\"0\" cellspacing=\"0\">\r\n		{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\">Team</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></span>\r\n			<td class=\"thinCell\">#Pl</td>\r\n			{* <td class=\"cellHeadTiny\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show In Graphs\" /></td> *}\r\n			</tr>\r\n			{foreach name=\"rankLoop\" from=$competition.team_data item=\"teamScore\" key=\"teamName\"}\r\n				{if $teamName ne \"Waiting to Join\"}\r\n					<tr>\r\n						<td class=\"thinCell\"><small>{$smarty.foreach.rankLoop.iteration}</small></td>\r\n						<td class=\"thinCell\"><small class=\"mini\">{$teamName|default:\"&nbsp;\"}</small></td>\r\n						<td class=\"thinCell\"><small>{$teamScore|number_format:2}</small></td>\r\n						<td class=\"thinCell\"><small>{$competition.teams.$teamName|@count|default:\"0\"}</small></td>\r\n						{* <td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{foreach from=$teams.users item=teamUser}{$teamUser.id},{if $smarty.foreach.rankLoop.iteration lt 11}{append var=\"GUIDs\" value=\"`$teamUser.id`,\"}{/if}{/foreach}{$GUIDs}\"{if $smarty.foreach.rankLoop.iteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td> *}\r\n					</tr>\r\n				{/if}\r\n			{/foreach}\r\n		{else} \r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\" align=\"center\">Name</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"{$smarty.capture.scoringMethod|strip_tags}\" /></td>\r\n			<td class=\"thinCell\">Update</td>\r\n			<td class=\"thinCell\" align=\"center\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show in Graphs\" /></td>\r\n			</tr>\r\n			{foreach from=$competition.data item=\"userData\" key=\"userId\" name=\"compData\"}\r\n			{assign var=\"curIteration\" value=$smarty.foreach.compData.iteration}\r\n			{if $curIteration eq 21}\r\n			</table>\r\n			</div>\r\n			<br />\r\n			<h2 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'runnerUps\', \'\', \'showHide\');\"><img id=\"runnerUps_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n				Runner Ups\r\n			</h2>\r\n			<div id=\"runnerUps\" style=\"display:none;\">\r\n			<table cellpadding=\"0\" cellspacing=\"0\">\r\n			{/if}\r\n			<tr>\r\n			<td class=\"thinCell\"><small>{$curIteration}</small></td>\r\n			<td class=\"thinCell\"><small class=\"mini\">{$competition.users[$userId]}</small></td>\r\n			<td class=\"thinCell\"><small>{$userData.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n			<td class=\"thinCell\"><small>{if $userData.doe}{$userData.doe|date_format2:\"n/j/y\"}{else}-Never-{/if}</small></td>\r\n			<td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{$userId}{if $curIteration lt 11}{append var=\"GUIDs\" value=\"`$userId`,\"}{/if}\"{if $curIteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td>\r\n			</tr>\r\n			{/foreach}\r\n		{/if}\r\n		</form>\r\n		<script type=\"text/javascript\">GUIDs = \'{$GUIDs}\';</script>\r\n		</table>\r\n		</div> \r\n		<div align=\"right\"><small><i><a href=\"?pg=faq#comp\">How is the competition scored?</a></i></small></div>\r\n		<img src=\"./img/blank.gif\" width=\"168\" height=\"1\" alt=\"\" />\r\n		{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'managePlayers\', \'\', \'showHide\');\"><img id=\"managePlayers_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div> \r\n			Manage\r\n		</h2>\r\n		<div id=\"managePlayers\" style=\"display:none;\">\r\n					<form name=\"managePlayers[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n					<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n					<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n					<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n					<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n					<input type=\"hidden\" name=\"style\" value=\"{$competition.style}\">\r\n					<span class=\"cellHeadTiny\" style=\"clear:left;\">Del</span>\r\n					<span class=\"cellHead\">View Stats</span>\r\n					{* <span class=\"cellHeadSmall\">-</span> *}\r\n					<br />\r\n					{foreach from=$competition.users item=\"username\" key=\"userId\" name=\"dateUpdated\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"managePlayers[delete][]\" value=\"{$username}\" style=\"width:14px;height:14px;margin:0px 2px;\"></small></span>\r\n						<span class=\"cell\"><small><a href=\"?pg=my_home&cid={$competition.id}&userId={$userId}&hideComps=1\">{$username}</a></small></span>\r\n						{* <span class=\"cellSmall\"><small><a href=\"mailto:{$compUser.email}\">email</a></small></span> *}\r\n						<br />\r\n					{/foreach}\r\n					<div style=\"text-align:center;\">\r\n                                                <br />\r\n						<input type=\"submit\" class=\"button\" value=\"Remove Selected\">\r\n					</div>\r\n					</form>\r\n		</div><br/>\r\n		{/if}\r\n		{* End new section for Player management. *}\r\n		\r\n		{* Begin new section for Team management.  This can be moved where ever. *}\r\n		{* ******************************** TEAM MANAGEMENT ***************************************** *}\r\n		{if $canCreateTeams and $competition.style eq \'Group-vs-Group\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'teamManagement\', \'\', \'showHide\');\"><img id=\"teamManagement_img\" src=\"./img/blank.gif\" class=\"showHide_{if $smarty.request.showTeamManagement}on{else}off{/if}\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div>\r\n			Teams</h2>\r\n		<div id=\"teamManagement\" style=\"display:{if $smarty.request.showTeamManagement}block{else}none{/if};\">\r\n			<form name=\"manageTeam[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n			<div id=\"playersList{counter}\">\r\n				{if $isManager}<span class=\"cellHeadTiny\">Del</span>{/if}\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"team\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						{if $isManager}<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>{/if}\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small>\r\n							{if $isManager or $team|@in_array:$user->id}<input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\">\r\n							{else}<span>{$teamName}</span>\r\n							{/if}\r\n						</small></span><br />\r\n					{/if}\r\n				{/foreach}\r\n			</div>\r\n                        <br />\r\n			<div style=\"text-align:center;\">New Team: <input id=\"addTeam\" type=\"text\" name=\"manageTeam[addTeam]\" size=\"10\"><br />\r\n			<br />\r\n                        <input type=\"submit\" class=\"button\" value=\"Submit Changes\"></div>\r\n			</form>\r\n		</div><br />\r\n		{/if}\r\n		{* End new section for Team management. *}\r\n\r\n		\r\n		{* if !$isManager AND $competition.users|@count lt 45}{include file=\"layouts/ads.tpl\"}{assign var=\"adsShown\" value=\"1\"}{/if *}\r\n\r\n		{*\r\n			<h2 class=\"withBG\">Competition Stats</h2>\r\n			<span class=\"cellHeadLarge\">Category</span><span class=\"cellHeadSmall\">Result</span><br />\r\n			<span class=\"cellLarge\"><small>start weight</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupStartWeight|default:0} lbs</small></span><br />\r\n			<span class=\"cellLarge\"><small>weight lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupWeightLost|default:0} lbs</small></span><br />\r\n			{if $competition.groupPercentageWeightLost gt 0}<span class=\"cellLarge\"><small>% lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupPercentageWeightLost|default:0|number_format:\"2\"}</small></span><br />{/if}\r\n			<span class=\"cellLarge\"><small>fat intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupFat|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>calorie intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupCalories|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>minutes exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupExercise|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>distance exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupDistanceExercised|default:0}</small></span><br />\r\n			<img src=\"./img/blank.gif\" width=\"165\" height=\"1\" alt=\"\" />\r\n		*}\r\n		</td>\r\n		<td width=\"100%\" valign=\"top\">\r\n			<div id=\"contentBox\" class=\"centerBox\" style=\"margin-left:10px;\"><div class=\"topRightTreasure\">\r\n<div id=\"jackpot\">{if $competition.potAmount gt 0}${$competition.potAmount|number_format:2}{/if}</div>\r\n<h1 class=\"underline\">{$competition.title|default:\"Competition Title\"}</h1>\r\n\r\n{* ******************************** COMPETITION END *********************************** *}\r\n{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}\r\n	{if $competition.results.winners|@count eq 1}\r\n		{* There was one winner, either by scoringMethod or tieBreakerMethod *}\r\n\r\n		{math assign=\"daysOfCompetition\" equation=\"(x - y) / z\" x=$competition.endDate|default:\"0\" y=$competition.startDate|default:\"0\" z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat|default:\"0\" y=$competition.results.secondPlaceStat|default:\"0\"}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerName\"}    {*key=\"winnerName\"*}\r\n			{assign var=\"winnerData\" value=$competitions.users.$winnerName}\r\n			\r\n			{if $competition.style eq \"Group-vs-Group\"}\r\n				{assign var=\"description\" value=\"Winning Team\"}\r\n				{assign var=\"avg\" value=\"average\"}\r\n			{else}\r\n				{assign var=\"description\" value=\"Winner\"}\r\n			{/if}\r\n\r\n			<h2><br /><b>{$winnerName}</b> is the {$description}{if $competition.potAmount}, taking home <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{strip}\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of \r\n				fierce competition, <b>{$winnerName}</b> is the \r\n				{$description}!	Based on \r\n				<b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2} \r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n			{else}                                {* A Tie! *}\r\n				{assign var=\"weightLost\" value=\"Weight Lost\"}\r\n				{assign var=\"percentLost\" value=\"Percentage Weight Lost\"}\r\n\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> \r\n				days of fierce competition, there was a tie in the judging \r\n				method, <b>{$competition.scoringMethod}</b>. To break this \r\n				tie, the selected tie breaking method, \r\n				<b>{$competition.tieBreakerMethod}</b>, was used to determine \r\n				<b>{$winnerName}</b> as the {$description}. <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2}\r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n				<!--\r\n				<b>{$winnerData.$weightLost|number_format:0} pounds</b>, which \r\n				was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n				-->\r\n			{/if}\r\n			{/strip}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:3}</b> margin over <b>{$competition.results.secondPlaceUser}</b>.\r\n			\r\n			<h2><br />Congratulations to you all!</h2>\r\n			<br />\r\n			<div class=\"underline\"></div>\r\n		{/foreach}\r\n\r\n	{elseif $competition.results.winners|@count gt 1}\r\n		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}\r\n	\r\n		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>\r\n		<ul>\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			<li>{$winnerName}</li>\r\n		{/foreach}\r\n		</ul>\r\n		\r\n	{else}\r\n		{* For some reason, there were no winners *}\r\n\r\n		<h2><br />\r\n		Winner information is being calculated. <br />\r\n		Please check back soon.\r\n		<br /><br /></h2>\r\n	{/if}\r\n	This competition has ended and is no longer active.<br />\r\n{/if}\r\n{* ************************************************************************************ *}\r\n\r\n<div id=\"prizeDesc\">{$competition.potDescription}<br />\r\n{if $competition.potAmount}<small style=\"color:#FFF;\">(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>\r\n\r\n{if $competition.startDate lt $smarty.now}\r\n	Time remaining: <b>{$competition.timeLeft}</b><br />\r\n{else}\r\n	This competition has not yet started!<br />\r\n{/if}\r\n\r\nStart{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:\"n/j/Y\"}</b> &nbsp; \r\nEnd{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:\"n/j/Y\"}</b><br />\r\n{if $competition.calculationMode neq \"Real-Time\"}Competition stats/scoring updated as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}{if $isManager} (<a href=\"?pg=competition&cid={$smarty.request.cid}&nocache=1\">Update Now!</a>){/if}<br />{/if}\r\n<div style=\"font-size:5px;clear:left;\">&nbsp;</div>\r\n{assign var=\"scoringMethod\" value=$competition.scoringMethod}\r\n{assign var=\"tieBreakerMethod\" value=$competition.tieBreakerMethod}\r\n{assign var=\"weeklyWinnersMethod1\" value=$competition.weeklyWinnersMethod1}\r\n{assign var=\"weeklyWinnersMethod2\" value=$competition.weeklyWinnersMethod2}\r\n\r\n{* ******************** WEEKLY WINNERS ********************* *}\r\n{if $competition.weeklyWinners}\r\n	{if $weeklyWinnersMethod1}             {* DON\'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n			<a href=\"javascript:toggle(\'weeklyWinners\', \'\', \'showHide\');\"><img id=\"weeklyWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n			Last Week\'s Winners<i>!</i> <small style=\"color:#000; font-size:11px;\">(<i><b>{$competition.weeklyWinners.startDate|date_format2:\"D n/j\"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:\"D n/j\"}</b></i>)</small></h2> \r\n		<div id=\"weeklyWinners\">\r\n		<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod1}</div>\r\n		<img src=\"{$skinFolder}images/winner_1.gif\" style=\"float:left;\" />\r\n		{strip}\r\n		{foreach name=\"method1\" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}\r\n			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method1.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method1.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> led the way last week by \r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b> {elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}\r\n			{else}\r\n				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod2} \r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod2}</div>\r\n		<img src=\"{$skinFolder}images/winner_2.gif\" style=\"float:left;\" />\r\n		{* display var=$competition.weeklyWinners.users *}\r\n		{strip}\r\n		{foreach name=\"method2\" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}\r\n			\r\n			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method2.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method2.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> won by \r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{/if}\r\n			{else}\r\n				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod1}\r\n	</tr></table></div>{/if}\r\n{/if}\r\n{* ********************************************************* *}\r\n\r\n{if $acm->isDomainAdmin() and $smarty.request.debug}\r\n	{display var=$competition}\r\n{/if} \r\n\r\n{* ******************************** COMPARISON GRAPHS ***************************************** *}\r\n{if $competition.graphParameters|@count}\r\n<script type=\"text/javascript\">{literal}\r\n	function rewriteGraphLinks() {\r\n		var gLinksDiv = document.getElementById(\'graphLinksDiv\');\r\n		gLinksDiv.innerHTML = \'\';\r\n		{/literal}{foreach name=\"graphTypes\" from=$competition.graphParameters item=\"cgp\"}\r\n		gLinksDiv.innerHTML += \'<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type={$cgp.name|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&basedOn={$cgp.basedOn|replace:\" \":\"+\"}&fillPrevious={if $cgp.assumeConstantValues eq \"yes\"}1{else}0{/if}&precision={$cgp.decimalPlaces}&format=wide&userIds=\'+GUIDs+\'\" target=\"graphwindow\"><small>{$cgp.name|niceText|replace:\" \":\"&nbsp;\"}&nbsp;-&nbsp;{$cgp.basedOn|niceText|replace:\" \":\"&nbsp;\"}</small></a>{if !$smarty.foreach.graphTypes.last} | {/if}\';\r\n		{/foreach}\r\n	{literal}\r\n	}\r\n{/literal}</script>\r\n<h2 class=\"withBG\"><a name=\"graph\"></a>\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'graphs\', \'\', \'showHide\');\"><img id=\"graphs_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Comparison Graphs &nbsp; <small><i>No graph? <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">click here</a> to download the free Flash Player plug-in.</i></small></h2>\r\n<div id=\"graphs\" style=\"display:block;\">\r\n	<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&format=wide\"}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe \"iframe_graphwindow\" name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"230\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<div id=\"graphLinksDiv\">\r\n		<small>\r\n		{foreach name=\"graphTypes\" from=$competition.availableGraphs key=\"graphType\" item=\"graphParams\"}\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&{$graphParams}\');\" target=\"graphwindow\">{$graphType}</a>{if $smarty.foreach.graphTypes.iteration neq $competition.availableGraphs|@count} | {/if}\r\n		{/foreach}\r\n		</small></div></td>\r\n	</tr>\r\n	</table>\r\n	<script type=\"text/javascript\">\r\n		rewriteGraphLinks();\r\n	</script>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'teams\', \'\', \'showHide\');\"><img id=\"teams_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>\r\n<div id=\"teams\" style=\"display:block;\">\r\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td>\r\n	<div align=\"right\" style=\"border-bottom:1px solid black; margin:2px; padding:2px;\">All stats based on: {$smarty.capture.scoringMethod}</div>\r\n	{if $canAssignToTeams}\r\n		<form name=\"changeTeam\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n	{/if}\r\n		{assign var=\"minEx\" value=\"Minutes Exercise\"}\r\n		{assign var=\"distEx\" value=\"Distance Exercised\"}\r\n		{assign var=\"pctLst\" value=\"Percentage Weight Lost\"}\r\n		{assign var=\"wtLst\" value=\"Percentage Weight Lost\"}\r\n		{foreach from=$competition.team_data name=\"teamsLoop\" item=\"teamScore\" key=\"teamName\"}\r\n			<div id=\"playersList{$smarty.foreach.teamsLoop.iteration}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			{if $teamName eq \"Waiting to Join\"}<h2>Not assigned to a team</h2>{else}<h4><span style=\"font-weight:normal;\">#{$smarty.foreach.teamsLoop.iteration}) </span>{$teamName|default:\"&nbsp;\"}{/if}</h4>\r\n			<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:250px; background-color:#FFC;\">\r\n			<tr>\r\n				<td class=\"thinCell\" width=\"55%\">Name</td>\r\n				<td class=\"thinCell\" width=\"25%\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></td>\r\n				<td class=\"thinCell\" width=\"20%\">Update</span>\r\n			</tr>\r\n			{foreach from=$competition.teams.$teamName item=\"userId\"}\r\n			<tr>\r\n				<td class=\"thinCell\" style=\"text-align:left;\"><small>{if $competition.team_captains.$teamName eq $userId OR $userId|@in_array:$competition.teams.$teamName}CAPTAIN{/if}{if $isManager or $userId eq $user->id}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small></td>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span> *}\r\n				<td class=\"thinCell\"><small>{$competition.data.$userId.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n				<td class=\"thinCell\"><small>{if $competition.data.$userId.doe}{$competition.data.$userId.doe|date_format2:\"n/j/y\"}{else}Never{/if}</small></td>\r\n			</tr>\r\n			{foreachelse}\r\n			{* No players assigned to this team. *}\r\n			<tr>\r\n				<td class=\"thinCell\">No players yet.</td>\r\n			</tr>\r\n			{/foreach}\r\n\r\n			</table>\r\n			</div>\r\n		{/foreach}\r\n	{if $canAssignToTeams and $competition.style neq \'Company-vs-Company\'}\r\n		<br />\r\n		<select name=\"changeTeam[team]\">\r\n			<option value=\"\">Move selected players to...</option>\r\n			{foreach from=$competition.teams item=\"newTeams\" key=\"newTeamName\"}\r\n				{*if $newTeamName ne $teamName and $newTeamName ne \"Waiting to Join\"*}\r\n				{if $newTeamName ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeamName}\">{$newTeamName}</option>\r\n				{/if}\r\n			{/foreach}\r\n		</select><br />\r\n		<input type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\r\n	{/if}\r\n</td></tr></table>\r\n</div>\r\n{/if}\r\n</div>\r\n	{* ******************************** DISCUSSION BOARD ***************************************** *}\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'discuss\', \'\', \'showHide\');\"><img id=\"discuss_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Discussion Board</h2>\r\n<div id=\"discuss\" style=\"display:block;\">\r\n	<table cellpadding=\"0\" width=\"100%\" border=\"0\"><tr><td><iframe src=\"?pg=competition/forum\" id=\"discussionBoard\" frameborder=\"0\" scrolling=\"yes\" style=\"width:100%;\"></iframe></td></tr></table>\r\n</div>\r\n\r\n</div></td>\r\n</tr></table>\r\n\r\n{*\r\n<script type=\"text/javascript\">{literal}\r\n	if ( window.frames != null ) {\r\n	    for ( i = 0; i< window.frames.length; i++ )\r\n	        window.alert (\"Child window \" +i+ \" is named \"+window.frames(i).name);\r\n	}\r\n{/literal}</script>\r\n*}'),(5016,202,1.01,'smarty','0','Hacked the message for hide-login to include a link to ... hardcoded appleprogram.com',1143734977,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n{if $smarty.request.showNewMenu eq \"true\"}\r\n<div class=\"rightSideMenu\">\r\n	<div class=\"rightMenuBox\">\r\n	<h3>EHC News</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<span class=\"floatLeft iconNew\"></span>\r\n		<small><a href=\"#\">Portion Control Article in the nutrition corner. Click here to read</a></small>\r\n		</div>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Learn more about carbohydrates and how they affect your body.</a></small>\r\n		</div>	\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>Product Highlight</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<img src=\"{$skinFolder}images/rypHeartMonitor_small.jpg\" align=\"right\" class=\"img1\" alt=\"\" height=\"120\" width=\"91\" /><br />\r\n		<small><a href=\"#\">Reebok\'s Heart Rate Monitor.  Click here.</a></small>\r\n		</div>\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>To Do List:</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Update your progress</a><br />\r\n		<a href=\"#\">Earn more incentive points</a><br />\r\n		<a href=\"#\">Check out the competition</a><br />\r\n		<a href=\"#\">Read New Articles</a></small>\r\n		</div>\r\n	</div>\r\n</div>\r\n{/if}\r\n\r\n{if $user->isLoggedIn()}\r\n	<img src=\"{if $smarty.session.company.preferences.landing_logo_url}{$smarty.session.company.preferences.landing_logo_url}{else}{$skinFolder}images/ehc/corporateBuilding_sm.jpg{/if}\" style=\"margin-right:10px; float:left; border:#CCC 1px solid;\" />\r\n\r\n	{include_php file=\"shared_handle:company/announcements\"}\r\n	<h2 class=\"uline\">Company Announcements:</h2>\r\n\r\n	<blockquote>\r\n		<dl>\r\n		{foreach from=$announcements item=\"current\"}\r\n			<dt><div style=\"float:right;\"><small><i>{$current.postedDate|date_format2:\"D, M j\"}</i></small></div>\r\n			    {$current.title}</dt>\r\n			<dd>{$current.description}</dd>\r\n		{foreachelse}\r\n			<dt>No announcements at this time</dt>\r\n		{/foreach}\r\n		</dl>\r\n	</blockquote>\r\n\r\n	{include_php file=\"shared_handle:company/companySurveyList\"}\r\n	{if $landingSurveyText OR $surveys|@count gt 0}\r\n		<h2 class=\"uline\">Company Surveys:</h2>\r\n		<blockquote>\r\n		{$landingSurveyText}\r\n		{if $surveys|@count gt 0}\r\n			<table>\r\n			<tr><td colspan=\"2\">\r\n				<h3>Available Surveys:</h3></td>\r\n			    <td valign=\"middle\"></td></tr>\r\n			{foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n			<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n				{if $item.dateAvailable gt 0}\r\n					<img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td>\r\n				   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n					{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n					<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n					<br /></td>\r\n				   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n				{else}\r\n					<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></a></td>\r\n				   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n					{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n					<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n					<br /></td>\r\n				   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n				{/if}\r\n			{foreachelse}\r\n			<tr><td valign=\"top\" colspan=\"3\">\r\n				None found.</td></tr>\r\n			{/foreach}\r\n			</table>\r\n		{/if}\r\n		</blockquote>\r\n	{/if}\r\n	{if $smarty.session.company.preferences.hide_shop neq \"yes\"}\r\n		<h2 class=\"uline\">eHealthCompete Highlights:</h2>\r\n		\r\n		<table>\r\n		<tr><td valign=\"middle\">\r\n		<blockquote>\r\n		<dl>	\r\n			<dt>Pedometer Deal</dt>\r\n			<dd>eHealthCompete has just negotiated a great deal on RYP Pedometers.  If you have been looking to purchase a pedometer the eHealthCompete price and quality could be your best bet.  This deal is only available to members of EHC.</dd>\r\n			\r\n		</dl>\r\n		</blockquote></td>\r\n		<td valign=\"top\" align=\"center\">\r\n			<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\">\r\n			<img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br />\r\n			Buy one now</a>\r\n		</td></tr></table>\r\n	{/if}\r\n{else}\r\n	{assign var=\"hideLogin\" value=\"true\"}\r\n		<script language=\"JavaScript\">{literal}\r\n			function doForgotPassword(boxId, formName) {\r\n				if (!formName) formName = \'loginForm\';\r\n				if (!boxId) boxId = \'usernameBox\';\r\n\r\n				var df = document.forms[formName];\r\n				var obj = document.getElementById(boxId);\r\n		\r\n				if (obj.value == \'\') {\r\n					obj.value = prompt(\'Enter your username:\', \'\');\r\n				}\r\n				\r\n\r\n				df.forgotPassword.value = \'true\';\r\n				df.submit();	\r\n			}\r\n\r\n		{/literal}</script>\r\n	<table align=\"center\" width=\"305\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"center\">\r\n		<h2>{$smarty.session.company.companyName}</h2>\r\n	</td></tr>\r\n	<tr><td>\r\n		{if $smarty.session.company.preferences.hide_login eq \"yes\"}\r\n			<p><b>You are not logged in or your session has expired.</b><br /><br />\r\n			If you would like to log in now, please follow this link <br /><br /><a href=\"http://www.appleprogram.com/\"><b><u>The Apple Program website</u></b></a>.<br /><br />\r\n			If you have any questions please contact our support department.</p>\r\n		{else}\r\n		<div align=\"center\" class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$smarty.request.return|default:$signup.return|default:\"my_login\"}\" />\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$smarty.request.cid}\" />\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"pg cid\" />\r\n			<input type=\"hidden\" name=\"forgotPassword\" value=\"\" />\r\n		\r\n			<h2 class=\"withBG\">Log In:</h2>\r\n				Username: <input id=\"usernameBox2\" type=\"text\" name=\"username\" value=\"{$smarty.request.username}\" class=\"textInput\" size=\"12\" /><br />\r\n				Password: <input type=\"password\" name=\"password\" class=\"textInput\" size=\"12\" /><br />\r\n				<div class=\"underline\">&nbsp;</div>\r\n				<a href=\"javascript:document.forms[\'loginForm2\'].submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n				<input type=\"submit\" name=\"loginSubmit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n		{/if}		\r\n	</td></tr>\r\n	<tr><td align=\"right\">\r\n		<br />\r\n		{if $smarty.session.company.companyName && $smarty.session.company.preferences.hide_login neq \"yes\"}\r\n			<small>Not registered yet?</small> <a href=\"?pg=signup/begin\">Sign Up Now!</a> &nbsp;\r\n		{else}\r\n			<!-- Place holder for sign up info content. -->\r\n		{/if}\r\n	</td></tr>\r\n	</table>\r\n{/if}'),(5020,305,0.10,'smarty','0','Page created.',1143742100,1124,'216.194.127.150',''),(5021,305,0.11,'smarty','0','Page created.',1143742212,1124,'216.194.127.150','<hl><b>Can Stress Harm Your Sleep?</b></hl>\r\n\r\n<p>\"I\'ve got to get some sleep.\" It\'s likely that we\'ve all felt this way when under major stress. Sleep disturbances are one of the most common symptoms of stress and can be difficult to control. The most common of these disturbances is stress-induced insomnia.</p>\r\n\r\n<p>Insomnia is the perception of inadequate or poor-quality sleep. It can be due to problems falling asleep, early wakening, and waking frequently during the night, sleep that is not refreshing, or a combination of these. Contrary to some popular beliefs, insomnia cannot be defined by the total amount of sleep one gets or how long it takes a person to fall asleep. Individuals can vary in their need for sleep and in the time required to fall asleep - what constitutes a refreshing night\'s sleep for one might be called insomnia for another.</p> \r\n\r\n<p>Insomnia can be particularly devastating because it often leads to a \"vicious cycle\" of daytime behaviors that worsen the condition. Persons without adequate sleep experience tiredness, lack of energy, and concentration problems, which they may attempt to combat by excessive caffeine intake or nicotine use. Insomniacs may be \"too tired\" to exercise and take afternoon naps, both of which reduce the ability to fall asleep the following night. </p>\r\n\r\n<p>Transient insomnia lasts from one night to a few weeks. Having episodes of transient insomnia that come and go is known as intermittent insomnia. Chronic, or long-term, insomnia lasts a month or more and occurs most nights. While insomnia is more likely to occur in females, persons over 60 years of age, and persons who have a history of, depression anyone can be affected. Transient and intermittent insomnia are particularly related to lifestyle factors such as increased or unmanageable stress, noise, and environmental changes. Short-term insomnia may also occur as a side effect of certain medications. Chronic insomnia is more serious and may be caused by or related to a variety of mental and physical problems including depression, substance abuse, heart or kidney disease, arthritis, chronic pain, and many others. </p>\r\n\r\n<p>If you experience short-term, stress-related insomnia, there are some measures you can take to help improve the quality of your sleep. </p>\r\n\r\n<p>1. Make your bedroom an inviting place to be. Clear the clutter and invest in some quality sheets or comforter in a soothing color. Create a welcoming environment with flowers, photos, pictures, candles - whatever makes you feel content and relaxed. Open a window during the day, if possible, to expose the room to fresh air. </p>\r\n\r\n<p>2. Use the bed for sleeping and sex - only. Therapists often use \"reconditioning\" as part of a treatment plan for insomnia. With this method, people are \"reconditioned\" to associate the bed with sleep. Avoid use of the bed for watching TV, eating, working, or any other activities. </p>\r\n\r\n<p>3. If you do wish to use the bed for a bit of nighttime reading, read only pleasure books in bed. </p>\r\n\r\n<p>4. Establish a regular sleep-wake cycle. Your body will learn to set its internal clock to your schedule and will eventually respond to internal cues to become sleepy at a given time and to awaken at a given time. A good way to begin this is by getting up at the same time every morning - yes, even on weekends. </p>\r\n\r\n<p>5. Don\'t nap. No matter how tempting it may be that afternoon nap can wreck your body\'s internal sleep-wake clock and make falling asleep that night even harder. \"Extra\" sleep on weekends can also throw off your sleep schedule and worsen midweek insomnia. </p>\r\n\r\n<p>6. Don\'t consume caffeinated beverages in the evening. Remember that eating chocolates and drinking cocoa also are sources of caffeine. Ideally, no caffeine after 4 or 5 p.m. is a good rule to follow. </p>\r\n\r\n<p>7. Don\'t drink alcohol 2-3 hours before going to bed. Excessive amounts of alcohol at any time can also disrupt sleep patterns and lead to sleep that is not refreshing. Many experts advise those suffering from chronic sleep disorders to abstain from alcohol entirely. </p>\r\n\r\n<p>8. Fit in some exercise during the day. Exercise not only improves mood, but also heightens our ability to fall asleep and sleep well. But don\'t exercise strenuously right before bedtime. </p>\r\n\r\n<p>9. Eat light meals in the evening. Eating heavily in the evening or just prior to bed can also disrupt your sleep cycle. </p>\r\n\r\n<p>10. Don\'t smoke in the evening. Nicotine can also keep you from falling asleep and cause insomnia. </p>\r\n\r\n<p>11. Be sure you have the right bed and mattress for your needs. The wrong mattress can sometimes lead to sleep disturbances and musculoskeletal problems. If you\'ve been using an \"antique\" mattress, an upgrade might be the solution to your sleep problems. </p>\r\n\r\n<p>For more information on stress and sleep visit www. They have many articles about different aspects of stress related sleep disorders.</p>\r\n'),(5022,305,0.12,'smarty','1','Page created.',1143742273,1124,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl><b>Can Stress Harm Your Sleep?</b></hl>\r\n\r\n<p>\"I\'ve got to get some sleep.\" It\'s likely that we\'ve all felt this way when under major stress. Sleep disturbances are one of the most common symptoms of stress and can be difficult to control. The most common of these disturbances is stress-induced insomnia.</p>\r\n\r\n<p>Insomnia is the perception of inadequate or poor-quality sleep. It can be due to problems falling asleep, early wakening, and waking frequently during the night, sleep that is not refreshing, or a combination of these. Contrary to some popular beliefs, insomnia cannot be defined by the total amount of sleep one gets or how long it takes a person to fall asleep. Individuals can vary in their need for sleep and in the time required to fall asleep - what constitutes a refreshing night\'s sleep for one might be called insomnia for another.</p> \r\n\r\n<p>Insomnia can be particularly devastating because it often leads to a \"vicious cycle\" of daytime behaviors that worsen the condition. Persons without adequate sleep experience tiredness, lack of energy, and concentration problems, which they may attempt to combat by excessive caffeine intake or nicotine use. Insomniacs may be \"too tired\" to exercise and take afternoon naps, both of which reduce the ability to fall asleep the following night. </p>\r\n\r\n<p>Transient insomnia lasts from one night to a few weeks. Having episodes of transient insomnia that come and go is known as intermittent insomnia. Chronic, or long-term, insomnia lasts a month or more and occurs most nights. While insomnia is more likely to occur in females, persons over 60 years of age, and persons who have a history of, depression anyone can be affected. Transient and intermittent insomnia are particularly related to lifestyle factors such as increased or unmanageable stress, noise, and environmental changes. Short-term insomnia may also occur as a side effect of certain medications. Chronic insomnia is more serious and may be caused by or related to a variety of mental and physical problems including depression, substance abuse, heart or kidney disease, arthritis, chronic pain, and many others. </p>\r\n\r\n<p>If you experience short-term, stress-related insomnia, there are some measures you can take to help improve the quality of your sleep. </p>\r\n\r\n<p>1. Make your bedroom an inviting place to be. Clear the clutter and invest in some quality sheets or comforter in a soothing color. Create a welcoming environment with flowers, photos, pictures, candles - whatever makes you feel content and relaxed. Open a window during the day, if possible, to expose the room to fresh air. </p>\r\n\r\n<p>2. Use the bed for sleeping and sex - only. Therapists often use \"reconditioning\" as part of a treatment plan for insomnia. With this method, people are \"reconditioned\" to associate the bed with sleep. Avoid use of the bed for watching TV, eating, working, or any other activities. </p>\r\n\r\n<p>3. If you do wish to use the bed for a bit of nighttime reading, read only pleasure books in bed. </p>\r\n\r\n<p>4. Establish a regular sleep-wake cycle. Your body will learn to set its internal clock to your schedule and will eventually respond to internal cues to become sleepy at a given time and to awaken at a given time. A good way to begin this is by getting up at the same time every morning - yes, even on weekends. </p>\r\n\r\n<p>5. Don\'t nap. No matter how tempting it may be that afternoon nap can wreck your body\'s internal sleep-wake clock and make falling asleep that night even harder. \"Extra\" sleep on weekends can also throw off your sleep schedule and worsen midweek insomnia. </p>\r\n\r\n<p>6. Don\'t consume caffeinated beverages in the evening. Remember that eating chocolates and drinking cocoa also are sources of caffeine. Ideally, no caffeine after 4 or 5 p.m. is a good rule to follow. </p>\r\n\r\n<p>7. Don\'t drink alcohol 2-3 hours before going to bed. Excessive amounts of alcohol at any time can also disrupt sleep patterns and lead to sleep that is not refreshing. Many experts advise those suffering from chronic sleep disorders to abstain from alcohol entirely. </p>\r\n\r\n<p>8. Fit in some exercise during the day. Exercise not only improves mood, but also heightens our ability to fall asleep and sleep well. But don\'t exercise strenuously right before bedtime. </p>\r\n\r\n<p>9. Eat light meals in the evening. Eating heavily in the evening or just prior to bed can also disrupt your sleep cycle. </p>\r\n\r\n<p>10. Don\'t smoke in the evening. Nicotine can also keep you from falling asleep and cause insomnia. </p>\r\n\r\n<p>11. Be sure you have the right bed and mattress for your needs. The wrong mattress can sometimes lead to sleep disturbances and musculoskeletal problems. If you\'ve been using an \"antique\" mattress, an upgrade might be the solution to your sleep problems. </p>\r\n\r\n<p>For more information on stress and sleep visit www. They have many articles about different aspects of stress related sleep disorders.</p>\r\n'),(5215,196,1.70,'smarty','0','Fixing healthy for life link stuff',1169744361,16,'216.194.127.150','{if $smarty.session.company.preferences.hide_incentives eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n\r\n{* HANDLERS *}\r\n{include_php file=\"shared_handle:company/participationPoints_v2\"}\r\n{include_php file=\"shared_handle:company/surveyList\"}\r\n{include_php file=\"shared_handle:company/incentivePointAdjustments\"}\r\n\r\n\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{if $smarty.session.company.preferences.title_my_incentives}{$smarty.session.company.preferences.title_my_incentives}</h1>{else}\r\n<h1>{$page.title}</h1>{/if}\r\n\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n	<img class=\"iconPrize\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n</td><td valign=\"top\" width=\"100%\">\r\n	{$incentiveText|default:\"<em>Yearly Incentive</em><br /><br />Not Yet Determined.\"}	\r\n</td></tr>\r\n</table>\r\n<br />\r\n{assign var=\"surveyPointsEarned\" value=$surveyPointsEarned|default:\"0\"}\r\n{assign var=\"totalIncentivePointAdjustments\" value=$totalIncentivePointAdjustments|default:\"0\"}\r\n<h2 class=\"boxed\"><i>Total Points Earned</i>: <em>{$totalParticipationPoints|math:\"x+$surveyPointsEarned+$totalIncentivePointAdjustments\"}</em></h2>\r\n\r\n<blockquote>\r\n<table width=\"700\">\r\n<tr><td valign=\"top\">\r\n	\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>Available {if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}{else} Surveys:</h3></td>{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}\r\n	{assign var=\"hideCheck\" value=\"hide_survey_`$item.id`\"}\r\n	{if $smarty.session.company.preferences[$hideCheck] neq \"yes\"}\r\n		<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">>\r\n		None found.</td></tr>\r\n	{/foreach}\r\n\r\n	<tr><td>&nbsp;</td>\r\n	    <td align=\"right\"><em>{if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}points earned{else}Survey points earned:{/if}</em></td>\r\n	    <td align=\"center\"><span class=\"boxed\">{$surveyPointsEarned|default:0}</span></td></tr>\r\n\r\n	{if $smarty.session.company.preferences.healthyForLifeLink}\r\n	<tr><td colspan=\"2\">\r\n		<ul><li><a href=\"?pg=healthyForLife\" style=\"color:#003366;\"><b>{$smarty.session.company.preferences.healthyForLifeLink}</b></a></li></ul></td>\r\n	    <td valign=\"middle\"></td></tr>\r\n	{/if}\r\n\r\n	{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		{select_query return=\"row\" assign=\"aHRA\"}\r\n			dateTaken, pointsEarned FROM surveys_taken\r\n			WHERE userId = {$user->id}\r\n			AND surveyId = 8\r\n			ORDER BY dateTaken DESC\r\n			LIMIT 1\r\n		{/select_query}\r\n		<tr><td><img class=\"icoStethescope\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>HRA Score</u>:</b>\r\n		    {if ($aHRA.dateTaken eq \"\") OR ($aHRA.dateTaken < $smarty.now|math:\"x - 31536000\")}<br /><a href=\"javascript://\" onclick=\"openSurvey(8);\">Available Now</a>{/if}</td>\r\n		    <td align=\"center\"><em>{$aHRA.pointsEarned}</em></td></tr>\r\n	{/if}\r\n\r\n	{if $vanity eq \"onai\" or $vanity eq \"mycompany\" or $vanity eq \"zions\" or $vanity eq \"zions2\"}\r\n	<tr><td><img class=\"icoWeights\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>Consumer Tools</u>:</b><br /><em>NEW<i>!</i></em></td>\r\n		    <td align=\"center\"><a href=\"?pg=consumer_tools\">Click Here</a></td></tr>\r\n	{/if}\r\n\r\n	{if 0 neq $totalIncentivePointAdjustments}\r\n	<br style=\"clear:left;\" />\r\n	<tr><td colspan=\"3\"><h3>Adjustments/Redemptions:</h3></td></tr>\r\n        {foreach from=$incentivePointAdjustments item=\"adjustment\" name=\"loopAdjustments\"}<tr><td nowrap>\r\n	<tr><td colspan=\"2\"><small><i>{$adjustment.dateAssigned|date_format2:\"m/d/Y\"}</i> - {$adjustment.comment}</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$adjustment.points}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Total:</em></td>\r\n		<td align=\"center\" nowrap=\"nowrap\"><span class=\"boxed\"><nobr>{$totalIncentivePointAdjustments|default:0}</nobr></span></td></tr>\r\n	{/if}\r\n\r\n	</table>\r\n\r\n</td><td valign=\"top\">\r\n	<h3>Feedback:</h3>\r\n	<table>\r\n	<tr><td>\r\n	<img class=\"icoNurse\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</td><td>\r\n	<ul>\r\n		<li><a href=\"javascript:viewSurveys();\">Review My History</a></li>\r\n		{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		<li><a href=\"?pg=HRAScoreInfo\">HRA Score Info</a></li>\r\n		{/if}\r\n	<ul>\r\n	</td></tr>\r\n	</table>\r\n	<br />\r\n\r\n	{if $aScales|@count gt 0} {* PARTICIPATION POINTS -- IF APPLICABLE *}\r\n	<table align=\"right\">\r\n	<tr><td colspan=\"3\"><h3>Participation Points:</h3></td></tr>\r\n        {foreach from=$aScales item=\"scale\" name=\"loopScales\"}<tr><td nowrap>\r\n	<tr><td>{$scale.name|niceText}</td>\r\n	    <td><small>({$scale.dateStart|date_format2:\"m/d/y\"} - {$scale.dateEnd|date_format2:\"m/d/y\"})</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$aScores[$scale.id]|number_format:\"1\"}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Participation points earned:</em></td>\r\n		<td align=\"right\"><span class=\"boxed\">{$totalParticipationPoints|default:0}</span></td></tr>\r\n	</table>\r\n	{/if}\r\n\r\n	</td></tr>\r\n</table>\r\n</blockquote>'),(5286,328,0.10,'smarty','0','Page created.',1251098337,2,'71.195.230.181',''),(5287,328,0.11,'smarty','0','Page created.',1251098450,2,'71.195.230.181','<h1>Forgot Password</h1>\r\n\r\n{if $smarty.request.temporaryId}\r\n\r\n\r\n{else}\r\n	A temporary URI will be e-mailed to you. Click the link inside the e-mail\r\n	to reset your password.\r\n{/if}'),(5288,328,0.12,'smarty','0','Page created.',1251098607,2,'71.195.230.181','{include_php file=\"shared_handle:forgotPassword\"}\r\n\r\n<h1>Forgot Password</h1>\r\n\r\n{if $smarty.request.temporaryId}\r\n\r\n\r\n{else}\r\n	A temporary URI will be e-mailed to you. Click the link inside the e-mail\r\n	to reset your password.\r\n{/if}'),(5289,202,1.09,'smarty','0','added company forums to this page',1251098740,2,'71.195.230.181','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n{if $smarty.request.showNewMenu eq \"true\"}\r\n<div class=\"rightSideMenu\">\r\n	<div class=\"rightMenuBox\">\r\n	<h3>EHC News</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<span class=\"floatLeft iconNew\"></span>\r\n		<small><a href=\"#\">Portion Control Article in the nutrition corner. Click here to read</a></small>\r\n		</div>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Learn more about carbohydrates and how they affect your body.</a></small>\r\n		</div>	\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>Product Highlight</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<img src=\"{$skinFolder}images/rypHeartMonitor_small.jpg\" align=\"right\" class=\"img1\" alt=\"\" height=\"120\" width=\"91\" /><br />\r\n		<small><a href=\"#\">Reebok\'s Heart Rate Monitor.  Click here.</a></small>\r\n		</div>\r\n	</div>\r\n	<div class=\"rightMenuBox\">\r\n	<h3>To Do List:</h3>\r\n		<div class=\"rightMenuItem\">\r\n		<small><a href=\"#\">Update your progress</a><br />\r\n		<a href=\"#\">Earn more incentive points</a><br />\r\n		<a href=\"#\">Check out the competition</a><br />\r\n		<a href=\"#\">Read New Articles</a></small>\r\n		</div>\r\n	</div>\r\n</div>\r\n{/if}\r\n\r\n{if $user->isLoggedIn()}\r\n	<img src=\"{if $smarty.session.company.preferences.landing_logo_url}{$smarty.session.company.preferences.landing_logo_url}{else}{$skinFolder}images/ehc/corporateBuilding_sm.jpg{/if}\" style=\"margin-right:10px; float:left; border:#CCC 1px solid;\" />\r\n\r\n	{include_php file=\"shared_handle:company/announcements\"}\r\n	<h2 class=\"uline\">Company Announcements:</h2>\r\n\r\n	<blockquote>\r\n		<dl>\r\n		{foreach from=$announcements item=\"current\"}\r\n			<dt><div style=\"float:right;\"><small><i>{$current.postedDate|date_format2:\"D, M j\"}</i></small></div>\r\n			    {$current.title}</dt>\r\n			<dd>{$current.description}</dd>\r\n		{foreachelse}\r\n			<dt>No announcements at this time</dt>\r\n		{/foreach}\r\n		</dl>\r\n	</blockquote>\r\n       {if $smarty.session.company.preferences.hide_company_forums eq \"no\"}\r\n       <blockquote>\r\n               {include_php file=\"shared_handle:company/forumsList\"}\r\n\r\n                   <h3>Company Forums:</h3>\r\n                   Share your tips and get advice in the forums below!\r\n                   <ul>\r\n                   {foreach from=$companyForums item=\"cForum\"}\r\n                   <li><a href=\"?pg=company_forum&fId={$cForum.id}\">{$cForum.name}</a></li>\r\n                   {/foreach}\r\n                   </ul>\r\n       </blockquote>\r\n       {/if}\r\n	{include_php file=\"shared_handle:company/companySurveyList\"}\r\n	{if $landingSurveyText OR $surveys|@count gt 0}\r\n		<h2 class=\"uline\">Company Surveys:</h2>\r\n		<blockquote>\r\n		{$landingSurveyText}\r\n		{if $surveys|@count gt 0}\r\n			<table>\r\n			<tr><td colspan=\"2\">\r\n				<h3>Available Surveys:</h3></td>\r\n			    <td valign=\"middle\"></td></tr>\r\n			{foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n			<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n				{if $item.dateAvailable gt 0}\r\n					<img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></td>\r\n				   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n					{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n					<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n					<br /></td>\r\n				   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n				{else}\r\n					<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"icoSurvey\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /></a></td>\r\n				   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n					{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n					<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n					<br /></td>\r\n				   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n				{/if}\r\n			{foreachelse}\r\n			<tr><td valign=\"top\" colspan=\"3\">\r\n				None found.</td></tr>\r\n			{/foreach}\r\n			</table>\r\n		{/if}\r\n		</blockquote>\r\n	{/if}\r\n	{if $smarty.session.company.preferences.hide_shop neq \"yes\"}\r\n		<h2 class=\"uline\">eHealthCompete Highlights:</h2>\r\n		\r\n		<table>\r\n		<tr><td valign=\"middle\">\r\n		<blockquote>\r\n		<dl>	\r\n			<dt>Pedometer Deal</dt>\r\n			<dd>eHealthCompete has just negotiated a great deal on RYP Pedometers.  If you have been looking to purchase a pedometer the eHealthCompete price and quality could be your best bet.  This deal is only available to members of EHC.</dd>\r\n			\r\n		</dl>\r\n		</blockquote></td>\r\n		<td valign=\"top\" align=\"center\">\r\n			<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\">\r\n			<img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br />\r\n			Buy one now</a>\r\n		</td></tr></table>\r\n	{/if}\r\n{else}\r\n	{assign var=\"hideLogin\" value=\"true\"}\r\n		<script language=\"JavaScript\">{literal}\r\n			function doForgotPassword(boxId, formName) {\r\n				if (!formName) formName = \'loginForm\';\r\n				if (!boxId) boxId = \'usernameBox\';\r\n\r\n				var df = document.forms[formName];\r\n				var obj = document.getElementById(boxId);\r\n				df.pg.value = \'forgot_password\';\r\n		\r\n				if (obj.value == \'\') {\r\n					obj.value = prompt(\'Enter your username:\', \'\');\r\n				}\r\n				\r\n\r\n				//df.forgotPassword.value = \'true\';\r\n				df.submit();	\r\n			}\r\n\r\n		{/literal}</script>\r\n	<table align=\"center\" width=\"305\" cellpadding=\"0\" cellspacing=\"0\">\r\n	<tr><td align=\"center\">\r\n		<h2>{$smarty.session.company.companyName}</h2>\r\n	</td></tr>\r\n	<tr><td>\r\n		{if $smarty.session.company.preferences.hide_login eq \"yes\"}\r\n			<p><b>You are not logged in or your session has expired.</b><br /><br />\r\n			If you would like to log in, please follow this link <br /><br /><a href=\"http://www.appleprogram.com/\"><b><u>The Apple Program website</u></b></a>.<br /><br />\r\n			</p>\r\n		{else}\r\n		<div align=\"center\" class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$smarty.request.return|default:$signup.return|default:\"my_login\"}\" />\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$smarty.request.cid}\" />\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"pg cid\" />\r\n			<input type=\"hidden\" name=\"forgotPassword\" value=\"\" />\r\n		\r\n			<h2 class=\"withBG\">Log In:</h2>\r\n				Username: <input id=\"usernameBox2\" type=\"text\" name=\"username\" value=\"{$smarty.request.username}\" class=\"textInput\" size=\"12\" /><br />\r\n				Password: <input type=\"password\" name=\"password\" class=\"textInput\" size=\"12\" /><br />\r\n				<div class=\"underline\">&nbsp;</div>\r\n				<a href=\"javascript:document.forms[\'loginForm2\'].submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n				<input type=\"submit\" name=\"loginSubmit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n		{/if}		\r\n	</td></tr>\r\n	<tr><td align=\"right\">\r\n		<br />\r\n		{if $smarty.session.company.companyName and $smarty.session.company.preferences.hide_login neq \"yes\" and $smarty.session.company.preferences.hide_signup_now neq \"yes\"}\r\n			<small>Not registered yet?</small> <a href=\"?pg=signup/begin\">Sign Up Now!</a> &nbsp;\r\n		{else}\r\n			<!-- Place holder for sign up info content. -->\r\n		{/if}\r\n	</td></tr>\r\n	</table>\r\n{/if}'),(3844,138,0.40,'smarty','0','Added a quick debug link.',1118243109,3,'24.10.217.227','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $type}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{else}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{/if}\r\n\r\n{if $acm->isDomainAdmin()}\r\n	{$smarty.request.gParams}\r\n	{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n	Debug this graph: <a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n{/if}\r\n\r\n</body></html>'),(4458,262,0.19,'smarty','0','Page created.',1127846467,16,'216.194.127.150','{include_php file=\"handle:integration/authenticate\"}\r\n\r\n<h1>Welcome to Apple Compete!</h1>\r\n\r\n<img src=\"{$skinFolder}images/icon_products.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Apple Compete allows you to participate in Company Sponsored Health Competitions.\r\nAs you record and track your goals, you can see how you are doing against others in your company.  \r\nYour identity will remain completely private.\r\nTake charge of your progress and enjoy the motivating spirit of competition that <b>Apple Compete</b> provides!</p>\r\n\r\n<h2> Competitions</h2>\r\n\r\n<p>By clicking on the \"Get Started Now\" button below, you can participate in enjoyable competitions\r\nfor prizes.  These competitions change every quarter throughout the year\r\nand bring excitment into the getting healthy.  You will be able to see a \"real-time\" <b>leaderboard</b> and know exactly how \r\nyou stand against your co-workers.  To keep your identity hidden from your co-workers\r\nyou will choose a username, or \"Alias\" during the sign up process.  Join today and begin enjoying\r\nthe fun and motivation that competitions can bring.</p>\r\n\r\n<p>To begin - click the button below.</p>\r\n\r\n<div class=\"hBox\" align=\"right\"><br />\r\n	<input type=\"button\" onclick=\"location.replace(\'?pg=integration/signup\');\" value=\"Get Started Now!\">\r\n</div>'),(4459,258,0.23,'php','0','Added some descriptions next to the steps in the menu',1128056847,2,'24.2.76.126','<h1><a href=\"?pg=<?php echo $SPADE[\'page\'][\'name\']; ?>\">Version 2 (V2) Conversion: Overall Step 4</a></h1>\r\n<br />\r\n\r\n<?php\r\n\r\nif (FALSE == isset($_REQUEST[\'confirm\'])) {\r\n\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=1\">Click here to proceed with the PHP conversion (step 1: User eStats).</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=2\">Execute step 2: eStat Entries.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=3\">Execute step 3: Company / Groups (EHC ONLY).</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=4\">Execute step 4: Competitions.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=5\">Execute step 5: Fix eStat Entries for Non-Standard Units.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=6\">Execute step 6: Rebuild eStats From Surveys Taken (EHC ONLY).</a><br />\';\r\n	echo \'<br />\';\r\n	echo \'Make sure that you have executed steps 1 through 3 of the conversion process on a FRESH copy of of the old V1 EHC database.<br />\';\r\n\r\n	return;\r\n}\r\n\r\ndefine (\'LAST_STEP_NUMBER\', 6);\r\n\r\n/**\r\n * NOTES:\r\n \r\n*** Current eStats\r\n*\r\n\r\n1  weight  Your current weight  1  lifestyle  yes  2  1119738180  \r\n2  water  amount of water consumed  4  nutrition  yes  16  1119740160  \r\n3  time exercised  amount of time exercised  7  fitness  yes  16  1119740340  \r\n4  distance exercised  amount of distance exercised  9  fitness  yes  16  1119740400  \r\n5  fruits and vegetables  fruit and vegetables eaten  12  nutrition  yes  16  1119740460  \r\n6  sleep  amount of time slept at night  8  lifestyle  yes  16  1119740640  \r\n7  calorie intake  Calories eaten  18  nutrition  yes  2  1122444781  \r\n8  fat intake  Fat in all food eaten  17  nutrition  yes  2  1122444781  \r\n9  carb intake  Carbohydrates in all food eaten  17  nutrition  yes  2  1122444781  \r\n\r\n*** Current units\r\n*\r\n\r\n1  pounds  1  2  1119738422  \r\n2  kilograms  1  2  1119738444  \r\n4  glasses  1  16  1119742425  \r\n5  ounces  0  16  1119742425  \r\n7  minutes  0  16  1119742490  \r\n8  hours  2  16  1119742490  \r\n9  miles  2  16  1119742515  \r\n10  kilometers  2  16  1119742515  \r\n11  laps  1  16  1119742546  \r\n12  cups  1  16  1119742939  \r\n13  pieces  1  16  1119742953  \r\n16  steps  0  16  1119743102  \r\n17  grams  1  2  1122444589  \r\n18  calories  0  2  1122444589  \r\n\r\n */\r\n\r\necho \'<h2>PHP Conversion Step \' . (int)$_REQUEST[\'confirm\'] . \'</h2>\';\r\n\r\nswitch ((int)$_REQUEST[\'confirm\']) {\r\n// -------------------------------- USER ESTATS ---------------------------------------------\r\ncase \'1\':\r\n\r\n	echo \"Creating User eStats (determining which eStats to track) for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Clear out table first (just in case)\r\n	$Q = \"DELETE FROM user_estats\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up all users to track weight with \'pounds\' as units\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT u.id AS \'userId\', 1 as \'estatId\', 1 AS \'unitId\', \'daily\' as \'frequency\'\r\n		FROM _users u\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up all users to track time exercised with \'minutes\' as units\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT u.id AS \'userId\', 3 as \'estatId\', 7 AS \'unitId\', \'daily\' as \'frequency\'\r\n		FROM _users u\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'distance exercised\' for users who had entries (estat 4, \'steps\' unit 16, \'miles\' unit 9)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 4 AS \'estatId\', IF(avg(distanceExercised)>100,16,9) AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.distanceExercised > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'water\' for users who had entries (estat 2, \'ounces\' unit 5, \'glasses\' unit 4)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 2 AS \'estatId\', IF(avg(water)>7,5,4) AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.water > 0\r\n		GROUP BY us.userId\";\r\n		\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'calories\' for users who had entries (estat 7, \'calories\' unit 18)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 7 AS \'estatId\', 18 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.calories > 0\r\n		GROUP BY us.userId\";\r\n	\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'fat\' for users who had entries (estat 8, \'grams\' unit 17)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)		\r\n		SELECT us.userId AS \'userId\', 8 AS \'estatId\', 17 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.fat > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'carbs\' for users who had entries (estat 9, \'grams\' unit 17)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)		\r\n		SELECT us.userId AS \'userId\', 9 AS \'estatId\', 17 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.carbs > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- ESTAT ENTRIES ---------------------------------------------\r\ncase \'2\':\r\n\r\n	echo \"Creating eStat Entries for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Clear out table first (just in case)\r\n	$Q = \"DELETE FROM estat_entries\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'weight\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 1 AS \'estatId\', us.weight AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.weight > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'water\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 2 AS \'estatId\', us.water AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.water > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'time exercised\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 3 AS \'estatId\', us.minutesExercise AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.minutesExercise > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'distance exercised\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 4 AS \'estatId\', us.distanceExercised AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.distanceExercised > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'calories\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 7 AS \'estatId\', us.calories AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.calories > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'fat\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 8 AS \'estatId\', us.fat AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.fat > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'carb\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 9 AS \'estatId\', us.carbs AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.carbs > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- COMPANY / GROUPS ---------------------------------------------\r\ncase \'3\':\r\n\r\n	echo \"Creating groups for all companies and group memberships for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Create groups for companies\r\n	$Q = \"SELECT id, companyName, companyVanity, userId\r\n		FROM companies\";\r\n\r\n	$companies = $SPADE[\'db\']->query($Q);\r\n\r\n	foreach ($companies as $company) {\r\n		$Q = \"INSERT INTO _groups (name, description, about, ownerId)\r\n			VALUES (\'\" . $company[\'companyVanity\'] . \"\', \r\n				\'\" . $company[\'companyName\'] . \"\', \r\n				\'Company Group Account\', \r\n				\" . (int)$company[\'userId\'] . \")\";\r\n\r\n		$companyGroupId = $SPADE[\'db\']->query($Q);\r\n\r\n		if (FALSE == $companyGroupId) {\r\n			logError (\'An error occurred while attempting to create a group for company \"\' . $company[\'companyName\'] . \'\".\');\r\n			continue;\r\n		}\r\n\r\n		// Update companies with group IDs\r\n		$Q = \"UPDATE companies \r\n			SET groupId = \" . (int)$companyGroupId . \"\r\n			WHERE id = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to update the company \"\' . $company[\'companyName\'] . \'\" with its new group id (\' . $companyGroupId . \').\');\r\n			continue;\r\n		}\r\n\r\n		// Create group memberships for all users\r\n		$Q = \"INSERT INTO _group_users (groupId, userId, title)\r\n			SELECT \" . (int)$companyGroupId . \" AS \'groupId\', u.id AS \'userId\', \'Employee: \" . addslashes($company[\'companyName\']) . \"\' AS \'title\'\r\n			FROM _users u\r\n			WHERE u.companyId = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to create group memberships for employees of \"\' . $company[\'companyName\'] . \'\". It is possible this company has no registered employees.\');\r\n			//continue;\r\n		}\r\n\r\n		// Update group_forums table with now corresponding group ID\r\n		$Q = \"UPDATE group_forums\r\n			SET groupId = \" . (int)$companyGroupId . \"\r\n			WHERE groupId = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to update the company forums for \"\' . $company[\'companyName\'] . \'\". It is possible this company had no registered forums.\');\r\n			//continue;\r\n		}\r\n	\r\n		echo \'SUCCESS: \' . $company[\'id\'] . \'.) \' . $company[\'companyName\'] . \' -- \' . $company[\'companyVanity\'] . \'.ehealthcompete.com<br />\';\r\n	}\r\n\r\n\r\n	break;\r\n\r\n// -------------------------------- COMPETITIONS ---------------------------------------------\r\ncase \'4\':\r\n\r\n	echo \"Converting competition data.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	$scoringMethods = array(\r\n		\'Weight Lost\' => array( \'estatId\' => 1, \'basedOn\' => \'actual change\', \'polarity\' => \'negative\' ),\r\n		\'Percentage Weight Lost\' => array( \'estatId\' => 1, \'basedOn\' => \'percent change\', \'polarity\' => \'negative\' ),\r\n		\'Minutes Exercise\' => array( \'estatId\' => 3, \'basedOn\' => \'total\', \'polarity\' => \'positive\' ),\r\n		\'Distance Exercised\' => array( \'estatId\' => 4, \'basedOn\' => \'total\', \'polarity\' => \'positive\' ),\r\n		\'Weight Gained\' => array( \'estatId\' => 1, \'basedOn\' => \'actual change\', \'polarity\' => \'positive\')\r\n	);\r\n\r\n	/**		\r\n	1  weight  Your current weight  1  lifestyle  yes  2  1119738180  \r\n	2  water  amount of water consumed  4  nutrition  yes  16  1119740160  \r\n	3  time exercised  amount of time exercised  7  fitness  yes  16  1119740340  \r\n	4  distance exercised  amount of distance exercised  9  fitness  yes  16  1119740400  \r\n	5  fruits and vegetables  fruit and vegetables eaten  12  nutrition  yes  16  1119740460  \r\n	6  sleep  amount of time slept at night  8  lifestyle  yes  16  1119740640  \r\n	7  calorie intake  Calories eaten  18  nutrition  yes  2  1122444781  \r\n	8  fat intake  Fat in all food eaten  17  nutrition  yes  2  1122444781  \r\n	9  carb intake  Carbohydrates in all food eaten  17  nutrition  yes  2  1122444781  \r\n	**/\r\n\r\n\r\n	$Q = \"SELECT * FROM competitions_old\";\r\n\r\n	$competitions = $SPADE[\'db\']->query($Q);\r\n\r\n	// Copy main competition data over...\r\n	// Done in SQL step 1.\r\n\r\n	foreach ($competitions as $comp) {\r\n		// ----- CREATE COMPETITION PARAMETERS ----- //\r\n		$currentParameters = array();\r\n		$currentParameters[] = $comp[\'scoringMethod\'];		\r\n\r\n		// Create competition parameters\r\n		$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n			VALUES (\" . (int)$comp[\'id\'] . \",\r\n				\" . (int)$scoringMethods[$comp[\'scoringMethod\']][\'estatId\'] . \",\r\n				\'\" . $scoringMethods[$comp[\'scoringMethod\']][\'basedOn\'] . \"\',\r\n				\'\" . $scoringMethods[$comp[\'scoringMethod\']][\'polarity\'] . \"\',\r\n				0)\";\r\n\r\n		if (FALSE == ($parameterId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		// Add parameter \r\n		if ($comp[\'tieBreakerMethod\'] && !in_array($comp[\'tieBreakerMethod\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'tieBreakerMethod\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'tieBreakerMethod\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'tieBreakerMethod\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'tieBreakerMethod\']][\'polarity\'] . \"\',\r\n					1)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n		if ($comp[\'weeklyWinnersMethod1\'] && !in_array($comp[\'weeklyWinnersMethod1\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'weeklyWinnersMethod1\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'polarity\'] . \"\',\r\n					2)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n		if ($comp[\'weeklyWinnersMethod2\'] && !in_array($comp[\'weeklyWinnersMethod2\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'weeklyWinnersMethod2\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'polarity\'] . \"\',\r\n					3)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n\r\n		// ----- CREATE COMPETITION PRIZES ----- //\r\n		$Q = \"INSERT INTO competition_prizes (\r\n				competitionId, title, description, maxWinners, \r\n				frequency, andOr, dateStart, dateEnd )\r\n			VALUES (\" . (int)$comp[\'id\'] . \",\r\n				\'Competition Prize\',\r\n				\'\" . addslashes($comp[\'potDescription\']) . \"\',\r\n				1,\r\n				\'once\',\r\n				\'and\',\r\n				\" . (int)$comp[\'startDate\'] . \",\r\n				\" . (int)$comp[\'endDate\'] . \")\";\r\n\r\n		if (FALSE == ($prizeId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Unable to create a competition prize for competition ID \' . (int)$comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		\r\n		// ----- CREATE COMPETITION PRIZE PARAMETERS ----- //\r\n		$Q = \"INSERT INTO competition_prize_parameters (\r\n				competitionPrizeId, competitionParameterId)\r\n			VALUES (\" . (int)$prizeId . \",\r\n				\" . (int)$parameterId . \")\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Unable to create a competition prize parameter for competition ID \' . (int)$comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n	}\r\n\r\n	// ----- CREATE INVOICES ----- //\r\n	$Q = \"SELECT cp.userId, u.firstName, u.lastName, c.companyName, u.address1, u.address2,\r\n			u.city, u.state, u.country, u.zip, u.phone1, u.email,\r\n			cp.amount, cp.dateDonated, cp.paymentMethod, cp.entryFee,\r\n			cp.compId, comp.title\r\n		FROM competition_pot cp\r\n		INNER JOIN _users u ON (cp.userId = u.id)\r\n		LEFT JOIN competitions comp ON (cp.compId = comp.id)\r\n		LEFT JOIN companies c ON (u.companyId = c.id)\";\r\n\r\n	$paymentDetails = $SPADE[\'db\']->query($Q);\r\n\r\n	// Continue if no entry fees were paid\r\n	if (FALSE == is_array($paymentDetails) || 0 == sizeof($paymentDetails)) {\r\n		continue;\r\n	}\r\n\r\n	foreach ($paymentDetails as $payment) {\r\n		$Q = \"INSERT INTO invoices (\r\n				userId, firstName, lastName, company,\r\n				address1, address2, city, state, country, zip, phone, email,\r\n				dateDue, amountDue)\r\n			VALUES (\r\n				\" . (int)$payment[\'userId\'] . \",\r\n				\'\" . addslashes($payment[\'firstName\']) . \"\',\r\n				\'\" . addslashes($payment[\'lastName\']) . \"\',\r\n				\'\" . addslashes($payment[\'companyName\']) . \"\',\r\n				\'\" . addslashes($payment[\'address1\']) . \"\',\r\n				\'\" . addslashes($payment[\'address2\']) . \"\',\r\n				\'\" . addslashes($payment[\'city\']) . \"\',\r\n				\'\" . addslashes($payment[\'state\']) . \"\',\r\n				\'\" . addslashes($payment[\'country\']) . \"\', \r\n				\'\" . $payment[\'zip\'] . \"\',\r\n				\'\" . $payment[\'phone1\'] . \"\',\r\n				\'\" . addslashes($payment[\'email\']) . \"\',\r\n				\" . (int)$payment[\'dateDonated\'] . \",\r\n				\'\" . $payment[\'entryFee\'] . \"\')\";\r\n\r\n		if (FALSE == ($invoiceId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Could not create an invoice for competition payment for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		$Q = \"INSERT INTO competition_entry_fees (\r\n				competitionId, userId, amount, invoiceId)\r\n			VALUES (\r\n				\'\" . $payment[\'compId\'] . \"\',\r\n				\" . (int)$payment[\'userId\'] . \",\r\n				\'\" . $payment[\'amount\'] . \"\',\r\n				\" . (int)$invoiceId . \")\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Unable to save the competition entry fee for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		$Q = \"INSERT INTO invoice_line_items (\r\n				invoiceNumber, description, price, quantity)\r\n			VALUES (\r\n				\" . (int)$invoiceId . \",\r\n				\'Competition entry fee, competition #\" . $payment[\'compId\'] . \"\',\r\n				\'\" . $payment[\'entryFee\'] . \"\', \r\n				1)\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Could not create an invoice line item for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n		}\r\n\r\n		$Q = \"INSERT INTO invoice_payments (\r\n				invoiceNumber, dateOfPayment, amountPaid, paymentMethod)\r\n			VALUES (\r\n				\" . (int)$invoiceId . \",\r\n				\" . (int)$payment[\'dateDonated\'] . \",\r\n				\'\" . $payment[\'amount\'] . \"\',\r\n				\'\" . $payment[\'paymentMethod\'] . \"\')\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Could not create an invoice payment for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\' ] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- FIX ESTAT ENTRIES FOR NON-STANDARD UNITS ---------------------------------------------\r\ncase \'5\':\r\n\r\n	echo \"Converting eStats for non-standard units.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Get userId\'s of users who have non-standard units (ounces = unitId 5) for water entries.\r\n	$Q = \"SELECT u.id\r\n		FROM user_estats ue\r\n		INNER JOIN _users u ON (ue.userId = u.id)\r\n		WHERE ue.estatId = 2\r\n		AND ue.unitId = 5\";\r\n\r\n	$userIds = $SPADE[\'db\']->query($Q, DB_LIST);\r\n	$userIds = implode(\',\', $userIds);\r\n\r\n	$Q = \"UPDATE estat_entries \r\n		SET value = (value * 0.125)\r\n		WHERE estatId = 2\r\n		AND userId IN (\" . $userIds . \")\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError (\'An error occurred while attempting to update and convert water entries from ounces to glasses.\');\r\n		break;\r\n	}\r\n\r\n	// Get userId\'s of users who have non-standard units (steps = unitId 16) for distance exercised entries.\r\n	$Q = \"SELECT u.id\r\n		FROM user_estats ue\r\n		INNER JOIN _users u ON (ue.userId = u.id)\r\n		WHERE ue.estatId = 4\r\n		AND ue.unitId = 16\";\r\n\r\n	$userIds = $SPADE[\'db\']->query($Q, DB_LIST);\r\n	$userIds = implode(\',\', $userIds);\r\n\r\n	$Q = \"UPDATE estat_entries \r\n		SET value = (value * 0.0005)\r\n		WHERE estatId = 4\r\n		AND userId IN (\" . $userIds . \")\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError (\'An error occurred while attempting to update and convert distance exercised entries from steps to miles.\');\r\n		break;\r\n	}\r\n\r\n\r\n	break;\r\n\r\n// -------------------------------- CORRECT / REBUILD estat_entries FROM company_survey_estats ---------------------------------------------\r\ncase \'6\':\r\n\r\n	echo \"Rebuilding estat_entries from company_survey_estats<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	$Q = \"SELECT *\r\n		FROM company_survey_estats\";\r\n\r\n	// Temp...\r\n	//$Q .= \" WHERE surveyId = 34\";\r\n\r\n	$companySurveyEstats = $SPADE[\'db\']->query($Q);\r\n\r\n	foreach ($companySurveyEstats as $cse) {\r\n\r\n		$whereAddition = \'\';\r\n\r\n		if ($cse[\'dateStart\']) {\r\n			$whereAddition .= \' AND st.dateTaken > \' . $cse[\'dateStart\'];\r\n		}\r\n\r\n		if ($cse[\'dateEnd\']) {\r\n			$whereAddition .= \' AND st.dateTaken < \' . $cse[\'dateEnd\'];\r\n		}\r\n\r\n		$Q = \"SELECT ee.id\r\n			FROM surveys_taken st\r\n			INNER JOIN surveys s ON (st.surveyId = s.id)\r\n			INNER JOIN estat_entries ee ON (ee.userId = st.userId AND ee.estatId = \" . $cse[\'estatId\'] . \" AND ee.dateOfEntry = st.dateTaken)\r\n			WHERE s.id = \" . $cse[\'surveyId\'] . \"\r\n			AND (s.companyId = \" . $cse[\'companyId\'] . \" OR s.companyId = 0)\" . $whereAddition;\r\n		\r\n		display($Q);\r\n\r\n		$entryIds = trim(implode(\',\', $SPADE[\'db\']->query($Q, DB_LIST)));\r\n\r\n		if ($entryIds) {\r\n			$Q = \"DELETE FROM estat_entries WHERE id IN (\" . $entryIds . \")\";\r\n	\r\n			display($Q);\r\n	\r\n			$SPADE[\'db\']->query($Q);\r\n		}\r\n\r\n		$Q = \"SELECT st.*\r\n			FROM surveys_taken st\r\n			LEFT JOIN surveys s ON (st.surveyId = s.id)\r\n			WHERE s.id = \" . $cse[\'surveyId\'] . \"\r\n			AND (s.companyId = \" . $cse[\'companyId\'] . \" OR s.companyId = 0)\" . $whereAddition;\r\n\r\n		display($Q);\r\n\r\n		$surveysTaken = $SPADE[\'db\']->query($Q);\r\n\r\n		if (is_array($surveysTaken) AND 0 < sizeof($surveysTaken)) {\r\n			foreach ($surveysTaken as $st) {\r\n				$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n					VALUES (\r\n						\" . $st[\'userId\'] . \",\r\n						\" . $cse[\'estatId\'] . \",\r\n						\" . $st[\'pointsEarned\'] . \",\r\n						\" . $st[\'dateTaken\'] . \",\r\n						\" . $SPADE[\'user\']->id . \",\r\n						\" . time() . \")\";\r\n\r\n				display($Q);\r\n\r\n				$SPADE[\'db\']->query($Q);\r\n			}\r\n		}\r\n	}\r\n\r\n\r\n\r\n	break;\r\n\r\ndefault:\r\n	logError( \'Unknown confirm step number: \' . $_REQUEST[\'confirm\'] );\r\n	return;\r\n}\r\n\r\n\r\nif ($_REQUEST[\'confirm\'] <= LAST_STEP_NUMBER) {\r\n	echo \'<br /><br /><a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=\' . ((int)$_REQUEST[\'confirm\'] + 1) . \'\">Execute the next step of the PHP conversion process.</a>\';\r\n}\r\n\r\n\r\n?>'),(4294,195,0.62,'smarty','0','Imported from V2 conversion',1126891141,3,'216.194.127.150','{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{include_php file=\"shared_handle:myHome\"}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title} - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n\r\n{select_query return=\"row\" assign=\"aHRA\"}\r\n	dateTaken, pointsEarned FROM surveys_taken\r\n		WHERE userId = {$user->id}\r\n		AND surveyId = 8\r\n		ORDER BY dateTaken DESC\r\n		LIMIT 1\r\n{/select_query}\r\n\r\n<table width=\"700\">\r\n<tr>\r\n	<td>\r\n	<div id=\"statsContainer\" style=\"overflow:hidden;\">\r\n		<a name=\"updateStats\"></a>\r\n		<iframe name=\"profileUpdateFrame\" id=\"profileUpdateIFrame\" src=\"?pg=my_statistics/update&userId={$smarty.request.userId|default:$userProfile.id}\" frameborder=\"0\" width=\"700\" height=\"440\" scrolling=\"no\"></iframe>\r\n	</div>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<table width=\"700\">\r\n<tr><td>\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'profileGraphTable\', \'\', \'showHide\');\"><img id=\"profileGraphTable_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>User Profile &amp; Graphs</h2>\r\n</td></tr></table>\r\n\r\n<table id=\"profileGraphTable\" width=\"700\">\r\n<tr><td width=\"205\" valign=\"top\">\r\n	<div id=\"UserProfileColumn\" class=\"contentColumn\">\r\n	<h2 class=\"withBG\">Your Profile</h2>\r\n		<span class=\"cellHeadLarge\">Age:</span><span class=\"cellSmall\">{$userProfile.age|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet|default:\"-\"}\'{$userProfile.heightInches|default:\"-\"}&quot;</span><br />\r\n		<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight|default:\"-\"}</span><br /><span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Current Weight:</span><span class=\"cellSmall\">{$userProfile.currentWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">HRA Score:</span><span class=\"cellSmall\">{$aHRA.pointsEarned|default:\"-\"}</span><br />\r\n\r\n		<a href=\"?pg=my_profile\" class=\"link\"><img src=\"{$skinFolder}images/btn_profile.gif\" border=\"0\" alt=\"Update Profile\" vspace=\"10\" /></a><br />\r\n		<a href=\"?pg=my_settings\" class=\"link\"><img src=\"{$skinFolder}images/btn_settings.gif\" border=\"0\" alt=\"Account Settings\" vspace=\"0\" /></a>\r\n	</div>\r\n</td><td valign=\"top\" align=\"center\">	\r\n	<div id=\"graphContainer\">\r\n	<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small{* &type=weight&fillPrevious=1&precision=1&totalChange=0&userIds={$userProfile.id} *}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\r\n	{if $user->username eq \"chad\"}{include_php file=\"shared_handle:estats/getEstatsInfo\"}\r\n	{* display var=$aEstats *}\r\n	<small>\r\n		{foreach from=$aEstats item=\"es\" name=\"loopEstats\"}\r\n			<a href=\"?pg=flashgraph-frame&format=small&userIds={$userProfile.id}&esId={$es.id}&type={$es.name|niceText|htmlspecialchars}&precision={$es.units.decimalPlaces|default:1}\" target=\"graphwindow\">{$es.name|niceText|replace:\" \":\"&nbsp;\"}</a> {if !$smarty.foreach.loopEstats.last}|{/if}\r\n		{foreachelse}\r\n			<b>No Available eStat Graphs</b>\r\n		{/foreach}\r\n	</small>\r\n	{else}\r\n	<small>\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1&totalChange=1\" target=\"graphwindow\">Change in Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1\" target=\"graphwindow\">Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</a><br />\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=water&fillPrevious=0&precision=1\" target=\"graphwindow\">Water Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise Min</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</a>\r\n	</small>\r\n	{/if}\r\n</td></tr>\r\n</table>\r\n<br />\r\n<table width=\"700\">\r\n<tr><td colspan=\"2\">\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'goalsMottosBlock\', \'\', \'showHide\');\"><img id=\"goalsMottosBlock_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>\r\n	Goals &amp; Mottos</h2>\r\n<blockquote id=\"goalsMottosBlock\" style=\"display:block;\">\r\n<dl>\r\n	<dt>Motto:</dt>\r\n	<dd>{$userProfile.personalSaying|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Nutrition Goal:</dt>\r\n	<dd>{$userProfile.nutritionGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Fitness Goal:</dt>\r\n	<dd>{$userProfile.fitnessGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Lifestyle Goal:</dt>\r\n	<dd>{$userProfile.lifestyleGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n</dl>\r\n</blockquote>\r\n</td></tr>\r\n</table>'),(4297,195,0.64,'smarty','0','Imported from V2 conversion',1126891799,3,'216.194.127.150','{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{include_php file=\"shared_handle:myHome\"}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title} - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n\r\n{select_query return=\"row\" assign=\"aHRA\"}\r\n	dateTaken, pointsEarned FROM surveys_taken\r\n		WHERE userId = {$user->id}\r\n		AND surveyId = 8\r\n		ORDER BY dateTaken DESC\r\n		LIMIT 1\r\n{/select_query}\r\n\r\n<table width=\"700\">\r\n<tr>\r\n	<td>\r\n	<div id=\"statsContainer\" style=\"overflow:hidden;\">\r\n		<a name=\"updateStats\"></a>\r\n		<iframe name=\"profileUpdateFrame\" id=\"profileUpdateIFrame\" src=\"?pg=my_statistics/update&userId={$smarty.request.userId|default:$userProfile.id}\" frameborder=\"0\" width=\"700\" height=\"440\" scrolling=\"no\"></iframe>\r\n	</div>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<table width=\"700\">\r\n<tr><td>\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'profileGraphTable\', \'\', \'showHide\');\"><img id=\"profileGraphTable_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>User Profile &amp; Graphs</h2>\r\n</td></tr></table>\r\n\r\n<table id=\"profileGraphTable\" width=\"700\">\r\n<tr><td width=\"205\" valign=\"top\">\r\n	<div id=\"UserProfileColumn\" class=\"contentColumn\">\r\n	<h2 class=\"withBG\">Your Profile</h2>\r\n		<span class=\"cellHeadLarge\">Age:</span><span class=\"cellSmall\">{$userProfile.age|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet|default:\"-\"}\'{$userProfile.heightInches|default:\"-\"}&quot;</span><br />\r\n		<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight|default:\"-\"}</span><br /><span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Current Weight:</span><span class=\"cellSmall\">{$userProfile.currentWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">HRA Score:</span><span class=\"cellSmall\">{$aHRA.pointsEarned|default:\"-\"}</span><br />\r\n\r\n		<a href=\"?pg=my_profile\" class=\"link\"><img src=\"{$skinFolder}images/btn_profile.gif\" border=\"0\" alt=\"Update Profile\" vspace=\"10\" /></a><br />\r\n		<a href=\"?pg=my_settings\" class=\"link\"><img src=\"{$skinFolder}images/btn_settings.gif\" border=\"0\" alt=\"Account Settings\" vspace=\"0\" /></a>\r\n	</div>\r\n</td><td valign=\"top\" align=\"center\">	\r\n	<div id=\"graphContainer\">\r\n	<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small{* &type=weight&fillPrevious=1&precision=1&totalChange=0&userIds={$userProfile.id} *}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\r\n	{if $user->username eq \"chad\" OR $user->username eq \"trave\"}{include_php file=\"shared_handle:estats/getEstatsInfo\"}\r\n	{* display var=$aEstats *}\r\n	<table width=\"100%\">\r\n	<tr>\r\n		<td width=\"50%\" align=\"left\"><input type=\"button\" value=\"Back\" /></td>\r\n		<td width=\"50%\" align=\"right\"><input type=\"button\" value=\"Next\" /></td>\r\n	</tr>\r\n	</table>\r\n	<small>\r\n		{foreach from=$aEstats item=\"es\" name=\"loopEstats\"}\r\n			<a href=\"?pg=flashgraph-frame&format=small&userIds={$userProfile.id}&esId={$es.id}&type={$es.name|niceText|htmlspecialchars}&precision={$es.units.decimalPlaces|default:1}\" target=\"graphwindow\">{$es.name|niceText|replace:\" \":\"&nbsp;\"}</a> {if !$smarty.foreach.loopEstats.last}|{/if}\r\n		{foreachelse}\r\n			<b>No Available eStat Graphs</b>\r\n		{/foreach}\r\n	</small>\r\n	{else}\r\n	<small>\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1&totalChange=1\" target=\"graphwindow\">Change in Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1\" target=\"graphwindow\">Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</a><br />\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=water&fillPrevious=0&precision=1\" target=\"graphwindow\">Water Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise Min</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</a>\r\n	</small>\r\n	{/if}\r\n</td></tr>\r\n</table>\r\n<br />\r\n<table width=\"700\">\r\n<tr><td colspan=\"2\">\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'goalsMottosBlock\', \'\', \'showHide\');\"><img id=\"goalsMottosBlock_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>\r\n	Goals &amp; Mottos</h2>\r\n<blockquote id=\"goalsMottosBlock\" style=\"display:block;\">\r\n<dl>\r\n	<dt>Motto:</dt>\r\n	<dd>{$userProfile.personalSaying|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Nutrition Goal:</dt>\r\n	<dd>{$userProfile.nutritionGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Fitness Goal:</dt>\r\n	<dd>{$userProfile.fitnessGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Lifestyle Goal:</dt>\r\n	<dd>{$userProfile.lifestyleGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n</dl>\r\n</blockquote>\r\n</td></tr>\r\n</table>'),(4153,257,0.12,'smarty','0','Added hidden input for non admin users for frequency.',1123496659,2,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/blank.tpl\"}\r\n{include_php file=\"shared_handle:estats/manageUserEstats\"}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'statsSettingsDiv\', \'\', \'showHide\');updateParentHeight();\"><img id=\"statsSettingsDiv_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>\r\n	Change Stats Settings\r\n</h2>\r\n\r\n<div id=\"statsSettingsDiv\">\r\n<form name=\"new_estat\" method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"category units description frequency confirmCustomEstat confirmCustomUnits return\" />\r\n<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return}\" />\r\n\r\n{* ***************************************** eStat Selector ***************************************** *}\r\n{if $smarty.request.eStatAction eq \"\"}\r\n\r\n{* display var=$allUnits *}\r\n{* display var=$estats *}\r\n{* display var=$userEstats *}\r\n{* display var=$groupEstats *}\r\n\r\n	<h3>Show or Hide Trackable Stats</h3>\r\n	<p>Select the items from the list of available statistics below that you are interested in tracking.<br />\r\n	If you want to track something that is not shown in the list below, click on the <b>\'Add New eStat\'</b> button.</p>\r\n\r\n<script type=\"text/javascript\" language=\"javascript\">{literal}\r\n	function toggleEstatCheckbox(esId) {\r\n		esCB = document.getElementById(\'estat_\'+esId);\r\n		if (esCB.checked) {\r\n			esCB.checked = false;\r\n		} else {\r\n			esCB.checked = true;\r\n		}\r\n	}\r\n{/literal}</script>\r\n\r\n	<table width=\"500\">\r\n	<tr>\r\n		<td colspan=\"5\"><hr /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td align=\"center\"><b>Title</b></td>\r\n		<td align=\"center\"><b>Custom Description</b></td>\r\n		<td align=\"center\"><b>Units</b></td>\r\n		{if $acm->isDomainAdmin()}<td align=\"center\"><b>Frequency</td>{/if}\r\n	</tr>\r\n	{foreach from=$estats item=\"estat\"}\r\n		<tr>\r\n			<td>{if $groupEstats[$estat.id]}\r\n				<input type=\"hidden\" name=\"selectedEstats[{$estat.id}]\" value=\"{$estat.name}\" />\r\n			    	<input id=\"estat_{$estat.id}\" name=\"groupEstats[{$estat.id}]\" type=\"checkbox\" value=\"{$estat.name}\" {if $userEstats[$estat.id] OR $groupEstats[$estat.id]} checked=\"checked\"{/if} disabled=\"disabled\" />\r\n			    {else}\r\n				<input id=\"estat_{$estat.id}\" name=\"selectedEstats[{$estat.id}]\" type=\"checkbox\" value=\"{$estat.name}\" {if $userEstats[$estat.id] OR $groupEstats[$estat.id]} checked=\"checked\"{/if} />\r\n			    {/if}</td>\r\n			<td nowrap=\"nowrap\"><a href=\"javascript://\" onmouseover=\"xOpen(\'note_estat{$estat.id}\');\" onmouseout=\"xClose(\'note_estat{$estat.id}\');\" {if NOT $groupEstats[$estat.id]}onclick=\"toggleEstatCheckbox({$estat.id});\"{/if}>{$estat.name|niceText}</a><br />\r\n				<div id=\"note_estat{$estat.id}\" style=\"display:none;\" class=\"floatInfoBox\"><small>{$estat.description|capitalize}{if $groupEstats[$estat.id]}<br /><i>Requested by:</i> <b>{$groupEstats[$estat.id].groupName|niceText}</b>{/if}</small></div></td>\r\n			<td><input size=\"40\" maxlength=\"32\" type=\"text\" name=\"estat_description[{$estat.id}]\" value=\"{$userEstats[$estat.id].description}\"{if $groupEstats[$estat.id]} disabled=\"disabled\"{/if} /></td>\r\n			<td>{if $groupEstats[$estat.id].unitId}\r\n				{assign var=\"curUnitId\" value=`$groupEstats[$estat.id].unitId`}\r\n			    {elseif $userEstats[$estat.id].unitId}\r\n				{assign var=\"curUnitId\" value=`$userEstats[$estat.id].unitId`}\r\n			    {else}\r\n				{assign var=\"curUnitId\" value=`$estat.defaultUnitId`}\r\n			    {/if}\r\n			<select name=\"estat_unit[{$estat.id}]\"{if $groupEstats[$estat.id]} readonly=\"readonly\" disabled=\"disabled\"{/if}>\r\n			{foreach from=$allEstatUnits[$estat.id] item=\'unitId\'}\r\n				<option value=\"{$unitId}\"{if $curUnitId eq $unitId} selected=\"selected\"{/if}>{$allUnits.$unitId.name|niceText}</option>\r\n			{/foreach}\r\n			</select>\r\n			</td>\r\n			{if $acm->isDomainAdmin()}\r\n			<td>{if $groupEstats[$estat.id].frequency}\r\n				{assign var=\"curFrequency\" value=$groupEstats[$estat.id].frequency}\r\n			    {elseif $userEstats[$estat.id].frequency}\r\n				{assign var=\"curFrequency\" value=$userEstats[$estat.id].frequency}\r\n			    {else}\r\n				{assign var=\"curFrequency\" value=\"\"}\r\n			    {/if}\r\n			<select name=\"estat_frequency[{$estat.id}]\"{if $groupEstats[$estat.id]} disabled=\"disabled\"{/if}>\r\n				<option value=\"daily\"{if $curFrequency eq \"daily\"} selected=\"selected\"{/if}>Daily</option>\r\n				<option value=\"weekly\"{if $curFrequency eq \"weekly\"} selected=\"selected\"{/if}>Weekly</option>\r\n			</select>\r\n			</td>\r\n			{else}\r\n			<td>\r\n				<input type=\"hidden\" name=\"estat_frequency[{$estat.id}]\" value=\"daily\" />\r\n			</td>\r\n			{/if}\r\n		</tr>\r\n	{/foreach}\r\n	<tr>\r\n		<td colspan=\"5\"><hr /></td>\r\n	</tr>\r\n	<tr>\r\n		<td colspan=\"5\" nowrap=\"nowrap\" align=\"center\">\r\n			<input name=\"eStatAction\" type=\"submit\" value=\"Save Tracking Changes\" />\r\n			<input name=\"eStatAction\" type=\"submit\" value=\"Add New eStat\" />\r\n		</td>\r\n	</tr>\r\n	</table>\r\n\r\n{* ***************************************** Main Form ***************************************** *}\r\n{elseif $smarty.request.eStatAction eq \"Add New eStat\" OR $smarty.request.eStatAction eq \"Save New eStat\"}\r\n\r\n<h3>Add New Trackable eStat</h3>\r\n<p>Fill out the following form to register a new \"eStat\" that you would like to track, it can be anything from how many times you sneeze to the amount of money you spend on fast food.<br />\r\nIf you have any problems or questions, feel free to <a href=\"?pg=contactUs\">contact us</a>.</p>\r\n\r\n<hr />\r\n<table>\r\n<tr>\r\n	<td valign=\"top\" align=\"right\"><b>Tracking&nbsp;Category:</b></td>\r\n	<td valign=\"top\"><input type=\"text\" name=\"category\" maxlength=\"32\" value=\"{$estatName}\" /></td>\r\n	<td>\r\n		<ul>\r\n		<li>Enter a title for what you want to track.</li>\r\n		<li><i>ie:</i> weight, distance exercised, distance run, time slept.</li>\r\n		<li>Do not put units of measure here.</li>\r\n		<li>Use <b>\'time\'</b> instead of <b>\'hours\'</b> or <b>\'distance\'</b> instead of <b>\'miles\'</b>.</li>\r\n	</ul></td>\r\n</tr>\r\n<tr>\r\n	<td valign=\"top\" align=\"right\"><b>Description:</b></td>\r\n	<td valign=\"top\"><input type=\"text\" name=\"description\" maxlength=\"32\" value=\"{$estatDescription}\" /></td>\r\n	<td>\r\n		<ul>\r\n		<li>Brief description of this stat <i>(optional)</i></li>\r\n		</ul></td>\r\n</tr>\r\n<tr>\r\n	<td valign=\"top\" align=\"right\"><b>Measurement&nbsp;Unit:</b></td>\r\n	<td valign=\"top\"><select name=\"units\" onchange=\"checkToCreateNewUnit(this);\">\r\n		{foreach from=$allUnits item=\"unit\"}\r\n			<option value=\"{$unit.name}\"{if $unit.id eq $estatUnits} selected=\"selected\"{/if}>{$unit.name}</option>\r\n		{/foreach}\r\n		<option value=\"\">- Create New -</option>\r\n		</select><br />\r\n		<div id=\"createNewUnitDiv\" style=\"display:none;white-space:nowrap;\">\r\n		<input size=\"10\" maxlength=\"32\" id=\"newUnitInput\" type=\"text\" name=\"newUnit\" value=\"\" disabled=\"disabled\" />\r\n		<select id=\"newUnitDecimalsSelect\" name=\"newUnitDecimals\" disabled=\"disabled\">\r\n			<option value=\"0\">0</option>\r\n			<option value=\"1\">1</option>\r\n			<option value=\"2\">2</option>\r\n			<option value=\"3\">3</option>\r\n			<option value=\"4\">4</option>\r\n		</select>\r\n		</div>\r\n		<script type=\"text/javascript\">{literal}\r\n			function checkToCreateNewUnit(dropdown) {\r\n				if (dropdown.value == \'\') {\r\n					xGetElementById(\'createNewUnitDiv\').style.display = \'block\';\r\n					xGetElementById(\'newUnitInput\').disabled = false;\r\n					xGetElementById(\'newUnitDecimalsSelect\').disabled = false;\r\n					xClose(\'existingUnitNotes\');\r\n					xOpen(\'newUnitNotes\');\r\n				} else {\r\n					xGetElementById(\'createNewUnitDiv\').style.display = \'none\';\r\n					xGetElementById(\'newUnitInput\').disabled = true;\r\n					xGetElementById(\'newUnitDecimalsSelect\').disabled = true;	\r\n					xClose(\'newUnitNotes\');\r\n					xOpen(\'existingUnitNotes\');\r\n				}\r\n				updateParentHeight();\r\n			}\r\n		{/literal}</script>\r\n	</td>\r\n	<td>\r\n		<ul id=\"existingUnitNotes\" style=\"display:block;\">\r\n		<li>Select the measurement unit to use.</li>	\r\n		<li>Or, Choose <b>\'- Create New -\'</b> if it doesn\'t exist.</li>\r\n		</ul>\r\n		<ul id=\"newUnitNotes\" style=\"display:none;\">\r\n		<li>Enter a new measurement unit.</li>\r\n		<li><i>ie:</i> pounds, kilograms, tons</li>\r\n		<li>Select how many decimal places the unit can have.</li>\r\n		</ul>\r\n		</td>\r\n</tr>\r\n<tr>\r\n	<td valign=\"top\" align=\"right\"><b>Frequency:</b></td>\r\n	<td valign=\"top\"><select name=\"frequency\">\r\n		<option value=\"daily\"{if $estatFrequency eq \"daily\"} selected=\"selected\"{/if}>Daily</option>\r\n		<option value=\"weekly\"{if $estatFrequency eq \"weekly\"} selected=\"selected\"{/if}>Weekly</option>\r\n	</select></td>\r\n	<td>\r\n 		<ul>\r\n		<li>How often will it be entered</li>\r\n		</ul></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<input type=\"submit\" name=\"eStatAction\" value=\"Save New eStat\" />&nbsp; \r\n		<input type=\"button\" name=\"buttonAction\" value=\"Cancel\" onclick=\"location.replace(\'?pg={$page.name}\');\" />&nbsp;\r\n	</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n\r\n</form>\r\n</div>\r\n<span id=\"eStatsSinker\">&nbsp;</span>\r\n<script type=\"text/javascript\">{literal}\r\n	function xDef() {\r\n		for(var i=0; i<arguments.length; ++i) {\r\n			if(typeof(arguments[i])==\'undefined\') return false;\r\n		}\r\n		return true;\r\n	}\r\n\r\n	function xPageY(e) {\r\n	  if (!(e=document.getElementById(e))) return 0;\r\n	  var y = 0;\r\n	  while (e) {\r\n	    if (xDef(e.offsetTop)) y += e.offsetTop;\r\n	    e = xDef(e.offsetParent) ? e.offsetParent : null;\r\n	  }\r\n	  return y;\r\n	}\r\n\r\n	function updateParentHeight() {\r\n		parent.xHeight(\'profileUpdateIFrame\', xPageY(\'eStatsSinker\')+30);\r\n		parent.xHeight(\'statsContainer\', xPageY(\'eStatsSinker\')+30);\r\n	}\r\n\r\n	updateParentHeight();\r\n\r\n{/literal}</script>'),(5334,233,1.80,'smarty','1','Working on e-mail your team feature.',1258161682,2,'206.71.78.158','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{assign var=\"GUIDs\" value=\"\"}\r\n\r\n{select_query assign=\"managerId\" return=\"val\"}\r\n	userId FROM competitions c WHERE c.id = {$smarty.request.cid}\r\n{/select_query}\r\n\r\n{if $managerId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	<!-- ismanager -->\r\n{/if}\r\n\r\n{if $isManager or \'yes\' == $smarty.session.company.preferences.anyone_joins_teams}\r\n	{assign var=\"canCreateTeams\" value=\"true\"}\r\n	{assign var=\"canAssignToTeams\" value=\"true\"}\r\n	{include_php file=\"shared_handle:competition/management\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition/load\"}\r\n\r\n<script type=\"text/javascript\">{literal}\r\n	var GUIDs = \'0\';\r\n\r\n	function updateGUIDs() {\r\n		var checkBoxes = document.forms[\'leaderBoardForm\'][\"graphCheckbox[]\"];\r\n		if (!checkBoxes.length) {\r\n			checkBoxes[0] = checkBoxes;\r\n			checkBoxes.length = 1;\r\n		}\r\n		GUIDs = \'\';\r\n		for (var x = 0; x < checkBoxes.length; x++) {\r\n			if (checkBoxes[x].checked == true && checkBoxes[x].value) {\r\n				GUIDs += checkBoxes[x].value+\',\'; \r\n			}\r\n			\r\n		}\r\n		rewriteGraphLinks();\r\n	}\r\n\r\n\r\n	function loadGraphWindow(graphParams) {\r\n		uri = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}; //&\'+graphParams+\'&userIds=\'+GUIDs;\r\n		var gFrame = window.frames[\'graphwindow\'];\r\n		// gFrame.location.replace(uri);\r\n		var gForm = document.getElementById(\'form_leaderBoard\');\r\n		gForm.gParams.value = graphParams;\r\n		gForm.userIds.value = GUIDs;\r\n		gForm.submit();\r\n		return false;\r\n	}\r\n{/literal}</script>\r\n\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\r\n\r\n{capture name=\"scoringMethod\"}\r\n	<b>{$competition.current_parameter.name|capitalize}</b> ({$competition.current_parameter.units}) - {$competition.current_parameter.basedOn|capitalize}{* - {$competition.current_parameter.polarity|capitalize} *}\r\n{/capture}\r\n\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" width=\"275\">\r\n\r\n		{if $competition.prizes|@count}\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'winners\', \'\', \'showHide\');\"><img id=\"winners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Winners\r\n		</h2>\r\n\r\n		<div id=\"winners\" style=\"display:block;\">\r\n		{foreach from=$competition.prizes item=\"prize\" key=\"prizeId\"}\r\n			<a href=\"javascript://\" onclick=\"window.open(\'?pg=competition/winners&cid={$competition.id}&prizeId={$prizeId}\', \'\', \'height=425,width=300,menubar=no,status=no,scrollbars=yes,titlebar=no,resizable=yes\');\">{$prize.title}</a><br />\r\n		{/foreach}\r\n		</div>\r\n		{/if}\r\n		\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'leaderBoard\', \'\', \'showHide\');\"><img id=\"leaderBoard_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Leaders\r\n		</h2>\r\n		\r\n		{if $competition.dateOfObject}<div align=\"right\"><small><i>as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}</i></small></div>{/if}\r\n\r\n		<div id=\"leaderBoard\" style=\"display:block;\">\r\n		<small>{$smarty.capture.scoringMethod}</small><br />\r\n		{if $competition.style eq \"Group-vs-Group\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Team Average)</div>\r\n		{elseif $competition.style eq \"Company-vs-Company\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Company Average)</div>\r\n		{/if}\r\n		{if $competition.parameters|@count gt 1}\r\n			<select name=\"scoringMethod\" onchange=\"if(this.value)location.replace(\'?pg={$page.name}&cid={$competition.id}&cpid=\'+this.value);\" style=\"width:200px;\">\r\n				<option value=\"\">(Choose Leaderboard)</option>\r\n			{foreach from=$competition.parameters key=\"paramId\" item=\"param\"}\r\n				{if $paramId neq $competition.current_parameter.id}\r\n				<option value=\"{$paramId}\">{$param.name|capitalize} - {$param.basedOn|capitalize}{* - {$param.polarity} *}</option>\r\n				{/if}\r\n			{/foreach}\r\n			</select>\r\n		{/if}\r\n		<form id=\"form_leaderBoard\" name=\"leaderBoardForm\" method=\"POST\" action=\"index.php?pg=flashgraph-frame&compId={$competition.id}\" target=\"graphwindow\">\r\n		<input type=\"hidden\" name=\"gParams\" value=\"\" />\r\n		<input type=\"hidden\" name=\"userIds\" value=\"\" />\r\n		<table cellpadding=\"0\" cellspacing=\"0\">\r\n		{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\">Team</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></span>\r\n			<td class=\"thinCell\">#Pl</td>\r\n			{* <td class=\"cellHeadTiny\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show In Graphs\" /></td> *}\r\n			</tr>\r\n			{foreach name=\"rankLoop\" from=$competition.team_data item=\"teamScore\" key=\"teamName\"}\r\n				{if $teamName ne \"Waiting to Join\"}\r\n					<tr>\r\n						<td class=\"thinCell\"><small>{$smarty.foreach.rankLoop.iteration}</small></td>\r\n						<td class=\"thinCell\"><small class=\"mini\">{$teamName|default:\"&nbsp;\"}</small></td>\r\n						<td class=\"thinCell\"><small>{$teamScore|number_format:2}</small></td>\r\n						<td class=\"thinCell\"><small>{$competition.teams.$teamName|@count|default:\"0\"}</small></td>\r\n						{* <td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{foreach from=$teams.users item=teamUser}{$teamUser.id},{if $smarty.foreach.rankLoop.iteration lt 11}{append var=\"GUIDs\" value=\"`$teamUser.id`,\"}{/if}{/foreach}{$GUIDs}\"{if $smarty.foreach.rankLoop.iteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td> *}\r\n					</tr>\r\n				{/if}\r\n			{/foreach}\r\n		{else} \r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\" align=\"center\">Name</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"{$smarty.capture.scoringMethod|strip_tags}\" /></td>\r\n			<td class=\"thinCell\">Update</td>\r\n			<td class=\"thinCell\" align=\"center\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show in Graphs\" /></td>\r\n			</tr>\r\n			{foreach from=$competition.data item=\"userData\" key=\"userId\" name=\"compData\"}\r\n			{assign var=\"curIteration\" value=$smarty.foreach.compData.iteration}\r\n			{if $curIteration eq 21}\r\n			</table>\r\n			</div>\r\n			<br />\r\n			<h2 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'runnerUps\', \'\', \'showHide\');\"><img id=\"runnerUps_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n				Runner Ups\r\n			</h2>\r\n			<div id=\"runnerUps\" style=\"display:none;\">\r\n			<table cellpadding=\"0\" cellspacing=\"0\">\r\n			{/if}\r\n			<tr>\r\n			<td class=\"thinCell\"><small>{$curIteration}</small></td>\r\n			<td class=\"thinCell\"><small class=\"mini\">{$competition.users[$userId]}</small></td>\r\n			<td class=\"thinCell\"><small>{$userData.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n			<td class=\"thinCell\"><small>{if $userData.doe}{$userData.doe|date_format2:\"n/j/y\"}{else}-Never-{/if}</small></td>\r\n			<td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{$userId}{if $curIteration lt 11}{append var=\"GUIDs\" value=\"`$userId`,\"}{/if}\"{if $curIteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td>\r\n			</tr>\r\n			{/foreach}\r\n		{/if}\r\n		</form>\r\n		<script type=\"text/javascript\">GUIDs = \'{$GUIDs}\';</script>\r\n		</table>\r\n		</div> \r\n		<div align=\"right\"><small><i><a href=\"?pg=faq#comp\">How is the competition scored?</a></i></small></div>\r\n		<img src=\"./img/blank.gif\" width=\"168\" height=\"1\" alt=\"\" />\r\n		{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'managePlayers\', \'\', \'showHide\');\"><img id=\"managePlayers_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div> \r\n			Manage\r\n		</h2>\r\n		<div id=\"managePlayers\" style=\"display:none;\">\r\n					<form name=\"managePlayers[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n					<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n					<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n					<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n					<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n					<input type=\"hidden\" name=\"style\" value=\"{$competition.style}\">\r\n					<span class=\"cellHeadTiny\" style=\"clear:left;\">Del</span>\r\n					<span class=\"cellHead\">View Stats</span>\r\n					{* <span class=\"cellHeadSmall\">-</span> *}\r\n					<br />\r\n					{foreach from=$competition.users item=\"username\" key=\"userId\" name=\"dateUpdated\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"managePlayers[delete][]\" value=\"{$username}\" style=\"width:14px;height:14px;margin:0px 2px;\"></small></span>\r\n						<span class=\"cell\"><small><a href=\"?pg=my_home&cid={$competition.id}&userId={$userId}&hideComps=1\">{$username}</a></small></span>\r\n						{* <span class=\"cellSmall\"><small><a href=\"mailto:{$compUser.email}\">email</a></small></span> *}\r\n						<br />\r\n					{/foreach}\r\n					<div style=\"text-align:center;\">\r\n                                                <br />\r\n						<input type=\"submit\" class=\"button\" value=\"Remove Selected\">\r\n					</div>\r\n					</form>\r\n		</div><br/>\r\n		{/if}\r\n		{* End new section for Player management. *}\r\n		\r\n		{* Begin new section for Team management.  This can be moved where ever. *}\r\n		{* ******************************** TEAM MANAGEMENT ***************************************** *}\r\n		{if $canCreateTeams and $competition.style eq \'Group-vs-Group\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'teamManagement\', \'\', \'showHide\');\"><img id=\"teamManagement_img\" src=\"./img/blank.gif\" class=\"showHide_{if $smarty.request.showTeamManagement}on{else}off{/if}\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div>\r\n			Teams</h2>\r\n		<div id=\"teamManagement\" style=\"display:{if $smarty.request.showTeamManagement}block{else}none{/if};\">\r\n			<form name=\"manageTeam[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n			<div id=\"playersList{counter}\">\r\n				{if $isManager}<span class=\"cellHeadTiny\">Del</span>{/if}\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"team\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						{if $isManager}<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>{/if}\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small>\r\n							{if $isManager or $team|@in_array:$user->id}<input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\">\r\n							{else}<span>{$teamName}</span>\r\n							{/if}\r\n						</small></span><br />\r\n					{/if}\r\n				{/foreach}\r\n			</div>\r\n                        <br />\r\n			<div style=\"text-align:center;\">New Team: <input id=\"addTeam\" type=\"text\" name=\"manageTeam[addTeam]\" size=\"10\"><br />\r\n			<br />\r\n                        <input type=\"submit\" class=\"button\" value=\"Submit Changes\"></div>\r\n			</form>\r\n		</div><br />\r\n		{/if}\r\n		{* End new section for Team management. *}\r\n\r\n		\r\n		{* if !$isManager AND $competition.users|@count lt 45}{include file=\"layouts/ads.tpl\"}{assign var=\"adsShown\" value=\"1\"}{/if *}\r\n\r\n		{*\r\n			<h2 class=\"withBG\">Competition Stats</h2>\r\n			<span class=\"cellHeadLarge\">Category</span><span class=\"cellHeadSmall\">Result</span><br />\r\n			<span class=\"cellLarge\"><small>start weight</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupStartWeight|default:0} lbs</small></span><br />\r\n			<span class=\"cellLarge\"><small>weight lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupWeightLost|default:0} lbs</small></span><br />\r\n			{if $competition.groupPercentageWeightLost gt 0}<span class=\"cellLarge\"><small>% lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupPercentageWeightLost|default:0|number_format:\"2\"}</small></span><br />{/if}\r\n			<span class=\"cellLarge\"><small>fat intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupFat|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>calorie intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupCalories|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>minutes exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupExercise|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>distance exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupDistanceExercised|default:0}</small></span><br />\r\n			<img src=\"./img/blank.gif\" width=\"165\" height=\"1\" alt=\"\" />\r\n		*}\r\n		</td>\r\n		<td width=\"100%\" valign=\"top\">\r\n			<div id=\"contentBox\" class=\"centerBox\" style=\"margin-left:10px;\"><div class=\"topRightTreasure\">\r\n<div id=\"jackpot\">{if $competition.potAmount gt 0}${$competition.potAmount|number_format:2}{/if}</div>\r\n<h1 class=\"underline\">{$competition.title|default:\"Competition Title\"}</h1>\r\n\r\n{* ******************************** COMPETITION END *********************************** *}\r\n{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}\r\n	{if $competition.results.winners|@count eq 1}\r\n		{* There was one winner, either by scoringMethod or tieBreakerMethod *}\r\n\r\n		{math assign=\"daysOfCompetition\" equation=\"(x - y) / z\" x=$competition.endDate|default:\"0\" y=$competition.startDate|default:\"0\" z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat|default:\"0\" y=$competition.results.secondPlaceStat|default:\"0\"}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerName\"}    {*key=\"winnerName\"*}\r\n			{assign var=\"winnerData\" value=$competitions.users.$winnerName}\r\n			\r\n			{if $competition.style eq \"Group-vs-Group\"}\r\n				{assign var=\"description\" value=\"Winning Team\"}\r\n				{assign var=\"avg\" value=\"average\"}\r\n			{else}\r\n				{assign var=\"description\" value=\"Winner\"}\r\n			{/if}\r\n\r\n			<h2><br /><b>{$winnerName}</b> is the {$description}{if $competition.potAmount}, taking home <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{strip}\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of \r\n				fierce competition, <b>{$winnerName}</b> is the \r\n				{$description}!	Based on \r\n				<b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2} \r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n			{else}                                {* A Tie! *}\r\n				{assign var=\"weightLost\" value=\"Weight Lost\"}\r\n				{assign var=\"percentLost\" value=\"Percentage Weight Lost\"}\r\n\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> \r\n				days of fierce competition, there was a tie in the judging \r\n				method, <b>{$competition.scoringMethod}</b>. To break this \r\n				tie, the selected tie breaking method, \r\n				<b>{$competition.tieBreakerMethod}</b>, was used to determine \r\n				<b>{$winnerName}</b> as the {$description}. <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2}\r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n				<!--\r\n				<b>{$winnerData.$weightLost|number_format:0} pounds</b>, which \r\n				was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n				-->\r\n			{/if}\r\n			{/strip}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:3}</b> margin over <b>{$competition.results.secondPlaceUser}</b>.\r\n			\r\n			<h2><br />Congratulations to you all!</h2>\r\n			<br />\r\n			<div class=\"underline\"></div>\r\n		{/foreach}\r\n\r\n	{elseif $competition.results.winners|@count gt 1}\r\n		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}\r\n	\r\n		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>\r\n		<ul>\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			<li>{$winnerName}</li>\r\n		{/foreach}\r\n		</ul>\r\n		\r\n	{else}\r\n		{* For some reason, there were no winners *}\r\n\r\n		<h2><br />\r\n		Winner information is being calculated. <br />\r\n		Please check back soon.\r\n		<br /><br /></h2>\r\n	{/if}\r\n	This competition has ended and is no longer active.<br />\r\n{/if}\r\n{* ************************************************************************************ *}\r\n\r\n<div id=\"prizeDesc\">{$competition.potDescription}<br />\r\n{if $competition.potAmount}<small style=\"color:#FFF;\">(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>\r\n\r\n{if $competition.startDate lt $smarty.now}\r\n	Time remaining: <b>{$competition.timeLeft}</b><br />\r\n{else}\r\n	This competition has not yet started!<br />\r\n{/if}\r\n\r\nStart{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:\"n/j/Y\"}</b> &nbsp; \r\nEnd{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:\"n/j/Y\"}</b><br />\r\n{if $competition.calculationMode neq \"Real-Time\"}Competition stats/scoring updated as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}{if $isManager} (<a href=\"?pg=competition&cid={$smarty.request.cid}&nocache=1\">Update Now!</a>){/if}<br />{/if}\r\n<div style=\"font-size:5px;clear:left;\">&nbsp;</div>\r\n{assign var=\"scoringMethod\" value=$competition.scoringMethod}\r\n{assign var=\"tieBreakerMethod\" value=$competition.tieBreakerMethod}\r\n{assign var=\"weeklyWinnersMethod1\" value=$competition.weeklyWinnersMethod1}\r\n{assign var=\"weeklyWinnersMethod2\" value=$competition.weeklyWinnersMethod2}\r\n\r\n{* ******************** WEEKLY WINNERS ********************* *}\r\n{if $competition.weeklyWinners}\r\n	{if $weeklyWinnersMethod1}             {* DON\'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n			<a href=\"javascript:toggle(\'weeklyWinners\', \'\', \'showHide\');\"><img id=\"weeklyWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n			Last Week\'s Winners<i>!</i> <small style=\"color:#000; font-size:11px;\">(<i><b>{$competition.weeklyWinners.startDate|date_format2:\"D n/j\"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:\"D n/j\"}</b></i>)</small></h2> \r\n		<div id=\"weeklyWinners\">\r\n		<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod1}</div>\r\n		<img src=\"{$skinFolder}images/winner_1.gif\" style=\"float:left;\" />\r\n		{strip}\r\n		{foreach name=\"method1\" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}\r\n			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method1.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method1.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> led the way last week by \r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b> {elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}\r\n			{else}\r\n				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod2} \r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod2}</div>\r\n		<img src=\"{$skinFolder}images/winner_2.gif\" style=\"float:left;\" />\r\n		{* display var=$competition.weeklyWinners.users *}\r\n		{strip}\r\n		{foreach name=\"method2\" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}\r\n			\r\n			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method2.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method2.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> won by \r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{/if}\r\n			{else}\r\n				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod1}\r\n	</tr></table></div>{/if}\r\n{/if}\r\n{* ********************************************************* *}\r\n\r\n{if $acm->isDomainAdmin() and $smarty.request.debug}\r\n	{display var=$competition}\r\n{/if} \r\n\r\n{* ******************************** COMPARISON GRAPHS ***************************************** *}\r\n{if $competition.graphParameters|@count}\r\n<script type=\"text/javascript\">{literal}\r\n	function rewriteGraphLinks() {\r\n		var gLinksDiv = document.getElementById(\'graphLinksDiv\');\r\n		gLinksDiv.innerHTML = \'\';\r\n		{/literal}{foreach name=\"graphTypes\" from=$competition.graphParameters item=\"cgp\"}\r\n		gLinksDiv.innerHTML += \'<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type={$cgp.name|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&basedOn={$cgp.basedOn|replace:\" \":\"+\"}&fillPrevious={if $cgp.assumeConstantValues eq \"yes\"}1{else}0{/if}&precision={$cgp.decimalPlaces}&format=wide&userIds=\'+GUIDs+\'\" target=\"graphwindow\"><small>{$cgp.name|niceText|replace:\" \":\"&nbsp;\"}&nbsp;-&nbsp;{$cgp.basedOn|niceText|replace:\" \":\"&nbsp;\"}</small></a>{if !$smarty.foreach.graphTypes.last} | {/if}\';\r\n		{/foreach}\r\n	{literal}\r\n	}\r\n{/literal}</script>\r\n<h2 class=\"withBG\"><a name=\"graph\"></a>\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'graphs\', \'\', \'showHide\');\"><img id=\"graphs_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Comparison Graphs &nbsp; <small><i>No graph? <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">click here</a> to download the free Flash Player plug-in.</i></small></h2>\r\n<div id=\"graphs\" style=\"display:block;\">\r\n	<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&format=wide\"}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe \"iframe_graphwindow\" name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"230\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<div id=\"graphLinksDiv\">\r\n		<small>\r\n		{foreach name=\"graphTypes\" from=$competition.availableGraphs key=\"graphType\" item=\"graphParams\"}\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&{$graphParams}\');\" target=\"graphwindow\">{$graphType}</a>{if $smarty.foreach.graphTypes.iteration neq $competition.availableGraphs|@count} | {/if}\r\n		{/foreach}\r\n		</small></div></td>\r\n	</tr>\r\n	</table>\r\n	<script type=\"text/javascript\">\r\n		rewriteGraphLinks();\r\n	</script>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'teams\', \'\', \'showHide\');\"><img id=\"teams_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>\r\n<div id=\"teams\" style=\"display:block;\">\r\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td>\r\n	<div align=\"right\" style=\"border-bottom:1px solid black; margin:2px; padding:2px;\">All stats based on: {$smarty.capture.scoringMethod}</div>\r\n	{if $canAssignToTeams}\r\n		<form name=\"changeTeam\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n	{/if}\r\n		{assign var=\"minEx\" value=\"Minutes Exercise\"}\r\n		{assign var=\"distEx\" value=\"Distance Exercised\"}\r\n		{assign var=\"pctLst\" value=\"Percentage Weight Lost\"}\r\n		{assign var=\"wtLst\" value=\"Percentage Weight Lost\"}\r\n		{foreach from=$competition.team_data name=\"teamsLoop\" item=\"teamScore\" key=\"teamName\"}\r\n			<div id=\"playersList{$smarty.foreach.teamsLoop.iteration}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			{if $teamName eq \"Waiting to Join\"}<h2>Not assigned to a team</h2>{else}<h4><span style=\"font-weight:normal;\">#{$smarty.foreach.teamsLoop.iteration}) </span>{$teamName|default:\"&nbsp;\"}{/if}</h4>\r\n			<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:250px; background-color:#FFC;\">\r\n			<tr>\r\n				<td class=\"thinCell\" width=\"55%\">Name</td>\r\n				<td class=\"thinCell\" width=\"25%\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></td>\r\n				<td class=\"thinCell\" width=\"20%\">Update</span>\r\n			</tr>\r\n			{foreach from=$competition.teams.$teamName item=\"userId\"}\r\n			<tr>\r\n				<td class=\"thinCell\" style=\"text-align:left;\"><small>{if $isManager or $userId eq $user->id}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small>{if $competition.team_captains.$teamName eq $userId OR $userId|@in_array:$competition.teams.$teamName} <img src=\"/systems/v2_ehc/images/ehc/ico/ico_captain.gif\" />{/if}</td>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span> *}\r\n				<td class=\"thinCell\"><small>{$competition.data.$userId.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n				<td class=\"thinCell\"><small>{if $competition.data.$userId.doe}{$competition.data.$userId.doe|date_format2:\"n/j/y\"}{else}Never{/if}</small></td>\r\n			</tr>\r\n			{foreachelse}\r\n			{* No players assigned to this team. *}\r\n			<tr>\r\n				<td class=\"thinCell\">No players yet.</td>\r\n			</tr>\r\n			{/foreach}\r\n\r\n			</table>\r\n			{if $competition.team_captains.$teamName eq $user->id}\r\n				<div style=\"border:1px solid #BBBBBB; padding:5px; margin:5px;\">\r\n					E-Mail your team:<br />\r\n					<textarea name=\"email_team[{$teamName}][body]\" rows=\"10\" cols=\"30\"></textarea><br />\r\n					<input type=\"submit\" name=\"emailTeam\" value=\"Send Message\" />\r\n				</div>\r\n			{/if}\r\n			</div>\r\n		{/foreach}\r\n	{if $canAssignToTeams and $competition.style neq \'Company-vs-Company\'}\r\n		<br />\r\n		<select name=\"changeTeam[team]\">\r\n			<option value=\"\">Move selected players to...</option>\r\n			{foreach from=$competition.teams item=\"newTeams\" key=\"newTeamName\"}\r\n				{*if $newTeamName ne $teamName and $newTeamName ne \"Waiting to Join\"*}\r\n				{if $newTeamName ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeamName}\">{$newTeamName}</option>\r\n				{/if}\r\n			{/foreach}\r\n		</select><br />\r\n		<input id=\"assign_captains_checkbox\" type=\"checkbox\" name=\"assignCaptains\" value=\"1\"><label for=\"assign_captains_checkbox\"> Assign selected player(s) as captain(s)</label><br />\r\n		<input type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\r\n		<img src=\"/systems/v2_ehc/images/ehc/ico/ico_captain.gif\" /> = Team Captain\r\n	{/if}\r\n</td></tr></table>\r\n</div>\r\n{/if}\r\n</div>\r\n	{* ******************************** DISCUSSION BOARD ***************************************** *}\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'discuss\', \'\', \'showHide\');\"><img id=\"discuss_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Discussion Board</h2>\r\n<div id=\"discuss\" style=\"display:block;\">\r\n	<table cellpadding=\"0\" width=\"100%\" border=\"0\"><tr><td><iframe src=\"?pg=competition/forum\" id=\"discussionBoard\" frameborder=\"0\" scrolling=\"yes\" style=\"width:100%;\"></iframe></td></tr></table>\r\n</div>\r\n\r\n</div></td>\r\n</tr></table>\r\n\r\n{*\r\n<script type=\"text/javascript\">{literal}\r\n	if ( window.frames != null ) {\r\n	    for ( i = 0; i< window.frames.length; i++ )\r\n	        window.alert (\"Child window \" +i+ \" is named \"+window.frames(i).name);\r\n	}\r\n{/literal}</script>\r\n*}'),(4163,260,0.10,'smarty','0','Page created.',1124232241,16,'216.194.127.150',''),(4164,260,0.11,'smarty','0','Page created.',1124232328,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<h1>10,000 Steps-a-Day Campaign Articles</h1>\r\n<blockquote>\r\n	<h2>Click on the week number below to download a PDF version of the weekly articles.</h2>\r\n	\r\n	<ol>\r\n		<li><a href=\"{$skinFolder}images/week1.pdf\"/>Week 1<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week2.pdf\"/>Week 2<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week3.pdf\"/>Week 3<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week4.pdf\"/>Week 4<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week5.pdf\"/>Week 5<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week6.pdf\"/>Week 6<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week7.pdf\"/>Week 7<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week8.pdf\"/>Week 8<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week9.pdf\"/>Week 9<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week10.pdf\"/>Week 10<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week11.pdf\"/>Week 11<br /></li>\r\n		<li><a href=\"{$skinFolder}images/Week12.pdf\"/>Week 12<br /></li>\r\n	\r\n	</ol>\r\n</blockquote>'),(4165,260,0.12,'smarty','0','Page created.',1124232884,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<h1>5 to 9-a-Day Campaign Newsletters</h1>\r\n<blockquote>\r\n	<h2>Click on the week number below to download a PDF version of the weekly articles.</h2>\r\n	\r\n	<ol>\r\n		<li><a href=\"{$skinFolder}images/5 to 9 a day week1.htm\"/>Week 1<br /></li>\r\n		\r\n	</ol>\r\n</blockquote>'),(4166,260,0.13,'smarty','0','Page created.',1124233072,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<h1>5 to 9-a-Day Campaign Newsletters</h1>\r\n<blockquote>\r\n	<h2>Click on the week number below to download a PDF version of the weekly articles.</h2>\r\n	\r\n	<ol>\r\n		<li><a href=\"{$skinFolder}images/5 to 9 a day week1.htm\" target=\"_blank\"/>Week 1<br /></li>\r\n		\r\n	</ol>\r\n</blockquote>'),(4167,260,0.14,'smarty','0','Page created.',1124233097,16,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<h1>5 to 9-a-Day Campaign Newsletters</h1>\r\n<blockquote>\r\n	<h2>Click on the week number below to view the weekly Newletter articles.</h2>\r\n	\r\n	<ol>\r\n		<li><a href=\"{$skinFolder}images/5 to 9 a day week1.htm\" target=\"_blank\"/>Week 1<br /></li>\r\n		\r\n	</ol>\r\n</blockquote>'),(4461,195,0.76,'smarty','0','Testing graph links.',1128061118,2,'24.2.76.126','{if $smarty.session.company.preferences.hide_home eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{include_php file=\"shared_handle:myHome\"}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title} - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n\r\n{select_query return=\"row\" assign=\"aHRA\"}\r\n	dateTaken, pointsEarned FROM surveys_taken\r\n		WHERE userId = {$user->id}\r\n		AND surveyId = 8\r\n		ORDER BY dateTaken DESC\r\n		LIMIT 1\r\n{/select_query}\r\n\r\n<table width=\"700\">\r\n<tr>\r\n	<td>\r\n	<div id=\"statsContainer\" style=\"overflow:hidden;\">\r\n		<a name=\"updateStats\"></a>\r\n		<iframe name=\"profileUpdateFrame\" id=\"profileUpdateIFrame\" src=\"?pg=my_statistics/update&userId={$smarty.request.userId|default:$userProfile.id}\" frameborder=\"0\" width=\"700\" height=\"440\" scrolling=\"no\"></iframe>\r\n	</div>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<table width=\"700\">\r\n<tr><td>\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'profileGraphTable\', \'\', \'showHide\');\"><img id=\"profileGraphTable_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>User Profile &amp; Graphs</h2>\r\n</td></tr></table>\r\n\r\n<table id=\"profileGraphTable\" width=\"700\">\r\n<tr><td width=\"205\" valign=\"top\">\r\n	<div id=\"UserProfileColumn\" class=\"contentColumn\">\r\n	<h2 class=\"withBG\">Your Profile</h2>\r\n		<span class=\"cellHeadLarge\">Age:</span><span class=\"cellSmall\">{$userProfile.age|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet|default:\"-\"}\'{$userProfile.heightInches|default:\"-\"}&quot;</span><br />\r\n		<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight|default:\"-\"}</span><br /><span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Current Weight:</span><span class=\"cellSmall\">{$userProfile.currentWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">HRA Score:</span><span class=\"cellSmall\">{$aHRA.pointsEarned|default:\"-\"}</span><br />\r\n\r\n		<a href=\"?pg=my_profile\" class=\"link\"><img src=\"{$skinFolder}images/btn_profile.gif\" border=\"0\" alt=\"Update Profile\" vspace=\"10\" /></a><br />\r\n		<a href=\"?pg=my_settings\" class=\"link\"><img src=\"{$skinFolder}images/btn_settings.gif\" border=\"0\" alt=\"Account Settings\" vspace=\"0\" /></a>\r\n	</div>\r\n</td><td valign=\"top\" align=\"center\">	\r\n	<div id=\"graphContainer\">\r\n	<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small\" frameborder=\"0\" width=\"425\" height=\"240\" scrollbars=\"no\"></iframe></div>\r\n	{if true OR $user->username eq \"chad\" OR $user->username eq \"trave\"}\r\n	{include_php file=\"shared_handle:estats/getEstatsInfo\"}\r\n	<div id=\"graphLinksDiv\">\r\n		<table width=\"100%\">\r\n		<tr>\r\n			<td width=\"100%\" align=\"center\"><small>\r\n			{foreach from=$aEstats item=\"es\" name=\"loopEstats\"}\r\n{if $user->username eq \"kevin\"}{display var=$es}{/if}\r\n				<a href=\"?pg=flashgraph-frame&format=small&userIds={$userProfile.id}&esId={$es.id}&type={$es.name|niceText|htmlspecialchars}&fillPrevious=0&precision={$es.units.decimalPlaces|default:1}\" target=\"graphwindow\">{$es.name|niceText|replace:\" \":\"&nbsp;\"}</a> {if !$smarty.foreach.loopEstats.last}|{/if}\r\n			{foreachelse}\r\n				<b>No Available eStat Graphs</b>\r\n			{/foreach}\r\n			</small></td>\r\n		</tr>\r\n		</table>\r\n	</div>\r\n	{else} {* OLD GRAPH LISTINGS *}\r\n	<small>\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1&totalChange=1\" target=\"graphwindow\">Change in Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1\" target=\"graphwindow\">Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</a><br />\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=water&fillPrevious=0&precision=1\" target=\"graphwindow\">Water Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise Min</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</a>\r\n	</small>\r\n	{/if}\r\n</td></tr>\r\n</table>\r\n<br />\r\n<table width=\"700\">\r\n<tr><td colspan=\"2\">\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'goalsMottosBlock\', \'\', \'showHide\');\"><img id=\"goalsMottosBlock_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>\r\n	Goals &amp; Mottos</h2>\r\n<blockquote id=\"goalsMottosBlock\" style=\"display:block;\">\r\n<dl>\r\n	<dt>Motto:</dt>\r\n	<dd>{$userProfile.personalSaying|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Nutrition Goal:</dt>\r\n	<dd>{$userProfile.nutritionGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Fitness Goal:</dt>\r\n	<dd>{$userProfile.fitnessGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Lifestyle Goal:</dt>\r\n	<dd>{$userProfile.lifestyleGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n</dl>\r\n</blockquote>\r\n</td></tr>\r\n</table>\r\n\r\n<script type=\"text/javascript\">\r\n	function updateGraphLinks(s) {ldelim}\r\n		//s.replace(/\\[userId\\]/gi, \'{$userProfile.id}\'); \r\n		document.getElementById(\'graphLinksDiv\').innerHTML = s;\r\n	{rdelim}\r\n</script>'),(4172,258,0.15,'php','0','Copied from Demo again for Competition stuff.',1124349874,2,'66.182.95.52','<h1><a href=\"?pg=<?php echo $SPADE[\'page\'][\'name\']; ?>\">Version 2 (V2) Conversion: Overall Step 4</a></h1>\r\n<br />\r\n\r\n<?php\r\n\r\nif (FALSE == isset($_REQUEST[\'confirm\'])) {\r\n\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=1\">Click here to proceed with the PHP conversion (step 1).</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=2\">Execute step 2.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=3\">Execute step 3.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=4\">Execute step 4.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=5\">Execute step 5.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=6\">Execute step 6 (rebuild estats from surveys taken).</a><br />\';\r\n	echo \'<br />\';\r\n	echo \'Make sure that you have executed steps 1 through 3 of the conversion process on a FRESH copy of of the old V1 EHC database.<br />\';\r\n\r\n	return;\r\n}\r\n\r\ndefine (\'LAST_STEP_NUMBER\', 6);\r\n\r\n/**\r\n * NOTES:\r\n \r\n*** Current eStats\r\n*\r\n\r\n1  weight  Your current weight  1  lifestyle  yes  2  1119738180  \r\n2  water  amount of water consumed  4  nutrition  yes  16  1119740160  \r\n3  time exercised  amount of time exercised  7  fitness  yes  16  1119740340  \r\n4  distance exercised  amount of distance exercised  9  fitness  yes  16  1119740400  \r\n5  fruits and vegetables  fruit and vegetables eaten  12  nutrition  yes  16  1119740460  \r\n6  sleep  amount of time slept at night  8  lifestyle  yes  16  1119740640  \r\n7  calorie intake  Calories eaten  18  nutrition  yes  2  1122444781  \r\n8  fat intake  Fat in all food eaten  17  nutrition  yes  2  1122444781  \r\n9  carb intake  Carbohydrates in all food eaten  17  nutrition  yes  2  1122444781  \r\n\r\n*** Current units\r\n*\r\n\r\n1  pounds  1  2  1119738422  \r\n2  kilograms  1  2  1119738444  \r\n4  glasses  1  16  1119742425  \r\n5  ounces  0  16  1119742425  \r\n7  minutes  0  16  1119742490  \r\n8  hours  2  16  1119742490  \r\n9  miles  2  16  1119742515  \r\n10  kilometers  2  16  1119742515  \r\n11  laps  1  16  1119742546  \r\n12  cups  1  16  1119742939  \r\n13  pieces  1  16  1119742953  \r\n16  steps  0  16  1119743102  \r\n17  grams  1  2  1122444589  \r\n18  calories  0  2  1122444589  \r\n\r\n */\r\n\r\necho \'<h2>PHP Conversion Step \' . (int)$_REQUEST[\'confirm\'] . \'</h2>\';\r\n\r\nswitch ((int)$_REQUEST[\'confirm\']) {\r\n// -------------------------------- USER ESTATS ---------------------------------------------\r\ncase \'1\':\r\n\r\n	echo \"Creating User eStats (determining which eStats to track) for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Clear out table first (just in case)\r\n	$Q = \"DELETE FROM user_estats\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up all users to track weight with \'pounds\' as units\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT u.id AS \'userId\', 1 as \'estatId\', 1 AS \'unitId\', \'daily\' as \'frequency\'\r\n		FROM _users u\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up all users to track time exercised with \'minutes\' as units\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT u.id AS \'userId\', 3 as \'estatId\', 7 AS \'unitId\', \'daily\' as \'frequency\'\r\n		FROM _users u\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'distance exercised\' for users who had entries (estat 4, \'steps\' unit 16, \'miles\' unit 9)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 4 AS \'estatId\', IF(avg(distanceExercised)>100,16,9) AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.distanceExercised > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'water\' for users who had entries (estat 2, \'ounces\' unit 5, \'glasses\' unit 4)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 2 AS \'estatId\', IF(avg(water)>7,5,4) AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.water > 0\r\n		GROUP BY us.userId\";\r\n		\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'calories\' for users who had entries (estat 7, \'calories\' unit 18)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 7 AS \'estatId\', 18 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.calories > 0\r\n		GROUP BY us.userId\";\r\n	\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'fat\' for users who had entries (estat 8, \'grams\' unit 17)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)		\r\n		SELECT us.userId AS \'userId\', 8 AS \'estatId\', 17 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.fat > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'carbs\' for users who had entries (estat 9, \'grams\' unit 17)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)		\r\n		SELECT us.userId AS \'userId\', 9 AS \'estatId\', 17 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.carbs > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- ESTAT ENTRIES ---------------------------------------------\r\ncase \'2\':\r\n\r\n	echo \"Creating eStat Entries for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Clear out table first (just in case)\r\n	$Q = \"DELETE FROM estat_entries\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'weight\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 1 AS \'estatId\', us.weight AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.weight > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'water\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 2 AS \'estatId\', us.water AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.water > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'time exercised\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 3 AS \'estatId\', us.minutesExercise AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.minutesExercise > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'distance exercised\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 4 AS \'estatId\', us.distanceExercised AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.distanceExercised > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'calories\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 7 AS \'estatId\', us.calories AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.calories > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'fat\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 8 AS \'estatId\', us.fat AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.fat > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'carb\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 9 AS \'estatId\', us.carbs AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.carbs > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- COMPANY / GROUPS ---------------------------------------------\r\ncase \'3\':\r\n\r\n	echo \"Creating groups for all companies and group memberships for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Create groups for companies\r\n	$Q = \"SELECT id, companyName, companyVanity, userId\r\n		FROM companies\";\r\n\r\n	$companies = $SPADE[\'db\']->query($Q);\r\n\r\n	foreach ($companies as $company) {\r\n		$Q = \"INSERT INTO _groups (name, description, about, ownerId)\r\n			VALUES (\'\" . $company[\'companyVanity\'] . \"\', \r\n				\'\" . $company[\'companyName\'] . \"\', \r\n				\'Company Group Account\', \r\n				\" . (int)$company[\'userId\'] . \")\";\r\n\r\n		$companyGroupId = $SPADE[\'db\']->query($Q);\r\n\r\n		if (FALSE == $companyGroupId) {\r\n			logError (\'An error occurred while attempting to create a group for company \"\' . $company[\'companyName\'] . \'\".\');\r\n			continue;\r\n		}\r\n\r\n		// Update companies with group IDs\r\n		$Q = \"UPDATE companies \r\n			SET groupId = \" . (int)$companyGroupId . \"\r\n			WHERE id = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to update the company \"\' . $company[\'companyName\'] . \'\" with its new group id (\' . $companyGroupId . \').\');\r\n			continue;\r\n		}\r\n\r\n		// Create group memberships for all users\r\n		$Q = \"INSERT INTO _group_users (groupId, userId, title)\r\n			SELECT \" . (int)$companyGroupId . \" AS \'groupId\', u.id AS \'userId\', \'Employee: \" . addslashes($company[\'companyName\']) . \"\' AS \'title\'\r\n			FROM _users u\r\n			WHERE u.companyId = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to create group memberships for employees of \"\' . $company[\'companyName\'] . \'\". It is possible this company has no registered employees.\');\r\n			//continue;\r\n		}\r\n\r\n		// Update group_forums table with now corresponding group ID\r\n		$Q = \"UPDATE group_forums\r\n			SET groupId = \" . (int)$companyGroupId . \"\r\n			WHERE groupId = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to update the company forums for \"\' . $company[\'companyName\'] . \'\". It is possible this company had no registered forums.\');\r\n			//continue;\r\n		}\r\n	\r\n		echo \'SUCCESS: \' . $company[\'id\'] . \'.) \' . $company[\'companyName\'] . \' -- \' . $company[\'companyVanity\'] . \'.ehealthcompete.com<br />\';\r\n	}\r\n\r\n\r\n	break;\r\n\r\n// -------------------------------- COMPETITIONS ---------------------------------------------\r\ncase \'4\':\r\n\r\n	echo \"Converting competition data.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	$scoringMethods = array(\r\n		\'Weight Lost\' => array( \'estatId\' => 1, \'basedOn\' => \'actual change\', \'polarity\' => \'negative\' ),\r\n		\'Percentage Weight Lost\' => array( \'estatId\' => 1, \'basedOn\' => \'percent change\', \'polarity\' => \'negative\' ),\r\n		\'Minutes Exercise\' => array( \'estatId\' => 3, \'basedOn\' => \'total\', \'polarity\' => \'positive\' ),\r\n		\'Distance Exercised\' => array( \'estatId\' => 4, \'basedOn\' => \'total\', \'polarity\' => \'positive\' ),\r\n		\'Weight Gained\' => array( \'estatId\' => 1, \'basedOn\' => \'actual change\', \'polarity\' => \'positive\')\r\n	);\r\n\r\n	/**		\r\n	1  weight  Your current weight  1  lifestyle  yes  2  1119738180  \r\n	2  water  amount of water consumed  4  nutrition  yes  16  1119740160  \r\n	3  time exercised  amount of time exercised  7  fitness  yes  16  1119740340  \r\n	4  distance exercised  amount of distance exercised  9  fitness  yes  16  1119740400  \r\n	5  fruits and vegetables  fruit and vegetables eaten  12  nutrition  yes  16  1119740460  \r\n	6  sleep  amount of time slept at night  8  lifestyle  yes  16  1119740640  \r\n	7  calorie intake  Calories eaten  18  nutrition  yes  2  1122444781  \r\n	8  fat intake  Fat in all food eaten  17  nutrition  yes  2  1122444781  \r\n	9  carb intake  Carbohydrates in all food eaten  17  nutrition  yes  2  1122444781  \r\n	**/\r\n\r\n\r\n	$Q = \"SELECT * FROM competitions_old\";\r\n\r\n	$competitions = $SPADE[\'db\']->query($Q);\r\n\r\n	// Copy main competition data over...\r\n	// Done in SQL step 1.\r\n\r\n	foreach ($competitions as $comp) {\r\n		// ----- CREATE COMPETITION PARAMETERS ----- //\r\n		$currentParameters = array();\r\n		$currentParameters[] = $comp[\'scoringMethod\'];		\r\n\r\n		// Create competition parameters\r\n		$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n			VALUES (\" . (int)$comp[\'id\'] . \",\r\n				\" . (int)$scoringMethods[$comp[\'scoringMethod\']][\'estatId\'] . \",\r\n				\'\" . $scoringMethods[$comp[\'scoringMethod\']][\'basedOn\'] . \"\',\r\n				\'\" . $scoringMethods[$comp[\'scoringMethod\']][\'polarity\'] . \"\',\r\n				0)\";\r\n\r\n		if (FALSE == ($parameterId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		// Add parameter \r\n		if ($comp[\'tieBreakerMethod\'] && !in_array($comp[\'tieBreakerMethod\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'tieBreakerMethod\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'tieBreakerMethod\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'tieBreakerMethod\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'tieBreakerMethod\']][\'polarity\'] . \"\',\r\n					1)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n		if ($comp[\'weeklyWinnersMethod1\'] && !in_array($comp[\'weeklyWinnersMethod1\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'weeklyWinnersMethod1\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'polarity\'] . \"\',\r\n					2)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n		if ($comp[\'weeklyWinnersMethod2\'] && !in_array($comp[\'weeklyWinnersMethod2\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'weeklyWinnersMethod2\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'polarity\'] . \"\',\r\n					3)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n\r\n		// ----- CREATE COMPETITION PRIZES ----- //\r\n		$Q = \"INSERT INTO competition_prizes (\r\n				competitionId, title, description, maxWinners, \r\n				frequency, andOr, dateStart, dateEnd )\r\n			VALUES (\" . (int)$comp[\'id\'] . \",\r\n				\'Competition Prize\',\r\n				\'\" . addslashes($comp[\'potDescription\']) . \"\',\r\n				1,\r\n				\'once\',\r\n				\'and\',\r\n				\" . (int)$comp[\'startDate\'] . \",\r\n				\" . (int)$comp[\'endDate\'] . \")\";\r\n\r\n		if (FALSE == ($prizeId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Unable to create a competition prize for competition ID \' . (int)$comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		\r\n		// ----- CREATE COMPETITION PRIZE PARAMETERS ----- //\r\n		$Q = \"INSERT INTO competition_prize_parameters (\r\n				competitionPrizeId, competitionParameterId)\r\n			VALUES (\" . (int)$prizeId . \",\r\n				\" . (int)$parameterId . \")\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Unable to create a competition prize parameter for competition ID \' . (int)$comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n	}\r\n\r\n	// ----- CREATE INVOICES ----- //\r\n	$Q = \"SELECT cp.userId, u.firstName, u.lastName, c.companyName, u.address1, u.address2,\r\n			u.city, u.state, u.country, u.zip, u.phone1, u.email,\r\n			cp.amount, cp.dateDonated, cp.paymentMethod, cp.entryFee,\r\n			cp.compId, comp.title\r\n		FROM competition_pot cp\r\n		INNER JOIN _users u ON (cp.userId = u.id)\r\n		LEFT JOIN competitions comp ON (cp.compId = comp.id)\r\n		LEFT JOIN companies c ON (u.companyId = c.id)\";\r\n\r\n	$paymentDetails = $SPADE[\'db\']->query($Q);\r\n\r\n	// Continue if no entry fees were paid\r\n	if (FALSE == is_array($paymentDetails) || 0 == sizeof($paymentDetails)) {\r\n		continue;\r\n	}\r\n\r\n	foreach ($paymentDetails as $payment) {\r\n		$Q = \"INSERT INTO invoices (\r\n				userId, firstName, lastName, company,\r\n				address1, address2, city, state, country, zip, phone, email,\r\n				dateDue, amountDue)\r\n			VALUES (\r\n				\" . (int)$payment[\'userId\'] . \",\r\n				\'\" . addslashes($payment[\'firstName\']) . \"\',\r\n				\'\" . addslashes($payment[\'lastName\']) . \"\',\r\n				\'\" . addslashes($payment[\'companyName\']) . \"\',\r\n				\'\" . addslashes($payment[\'address1\']) . \"\',\r\n				\'\" . addslashes($payment[\'address2\']) . \"\',\r\n				\'\" . addslashes($payment[\'city\']) . \"\',\r\n				\'\" . addslashes($payment[\'state\']) . \"\',\r\n				\'\" . addslashes($payment[\'country\']) . \"\', \r\n				\'\" . $payment[\'zip\'] . \"\',\r\n				\'\" . $payment[\'phone1\'] . \"\',\r\n				\'\" . addslashes($payment[\'email\']) . \"\',\r\n				\" . (int)$payment[\'dateDonated\'] . \",\r\n				\'\" . $payment[\'entryFee\'] . \"\')\";\r\n\r\n		if (FALSE == ($invoiceId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Could not create an invoice for competition payment for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		$Q = \"INSERT INTO competition_entry_fees (\r\n				competitionId, userId, amount, invoiceId)\r\n			VALUES (\r\n				\'\" . $payment[\'compId\'] . \"\',\r\n				\" . (int)$payment[\'userId\'] . \",\r\n				\'\" . $payment[\'amount\'] . \"\',\r\n				\" . (int)$invoiceId . \")\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Unable to save the competition entry fee for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		$Q = \"INSERT INTO invoice_line_items (\r\n				invoiceNumber, description, price, quantity)\r\n			VALUES (\r\n				\" . (int)$invoiceId . \",\r\n				\'Competition entry fee, competition #\" . $payment[\'compId\'] . \"\',\r\n				\'\" . $payment[\'entryFee\'] . \"\', \r\n				1)\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Could not create an invoice line item for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n		}\r\n\r\n		$Q = \"INSERT INTO invoice_payments (\r\n				invoiceNumber, dateOfPayment, amountPaid, paymentMethod)\r\n			VALUES (\r\n				\" . (int)$invoiceId . \",\r\n				\" . (int)$payment[\'dateDonated\'] . \",\r\n				\'\" . $payment[\'amount\'] . \"\',\r\n				\'\" . $payment[\'paymentMethod\'] . \"\')\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Could not create an invoice payment for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\' ] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- FIX ESTAT ENTRIES FOR NON-STANDARD UNITS ---------------------------------------------\r\ncase \'5\':\r\n\r\n	echo \"Converting eStats for non-standard units.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Get userId\'s of users who have non-standard units (ounces = unitId 5) for water entries.\r\n	$Q = \"SELECT u.id\r\n		FROM user_estats ue\r\n		INNER JOIN _users u ON (ue.userId = u.id)\r\n		WHERE ue.estatId = 2\r\n		AND ue.unitId = 5\";\r\n\r\n	$userIds = $SPADE[\'db\']->query($Q, DB_LIST);\r\n	$userIds = implode(\',\', $userIds);\r\n\r\n	$Q = \"UPDATE estat_entries \r\n		SET value = (value * 0.125)\r\n		WHERE estatId = 2\r\n		AND userId IN (\" . $userIds . \")\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError (\'An error occurred while attempting to update and convert water entries from ounces to glasses.\');\r\n		break;\r\n	}\r\n\r\n	// Get userId\'s of users who have non-standard units (steps = unitId 16) for distance exercised entries.\r\n	$Q = \"SELECT u.id\r\n		FROM user_estats ue\r\n		INNER JOIN _users u ON (ue.userId = u.id)\r\n		WHERE ue.estatId = 4\r\n		AND ue.unitId = 16\";\r\n\r\n	$userIds = $SPADE[\'db\']->query($Q, DB_LIST);\r\n	$userIds = implode(\',\', $userIds);\r\n\r\n	$Q = \"UPDATE estat_entries \r\n		SET value = (value * 0.0005)\r\n		WHERE estatId = 4\r\n		AND userId IN (\" . $userIds . \")\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError (\'An error occurred while attempting to update and convert distance exercised entries from steps to miles.\');\r\n		break;\r\n	}\r\n\r\n\r\n	break;\r\n\r\n// -------------------------------- CORRECT / REBUILD estat_entries FROM company_survey_estats ---------------------------------------------\r\ncase \'6\':\r\n\r\n	echo \"Rebuilding estat_entries from company_survey_estats<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	$Q = \"SELECT *\r\n		FROM company_survey_estats\";\r\n\r\n	$companySurveyEstats = $SPADE[\'db\']->query($Q);\r\n\r\n	foreach ($companySurveyEstats as $cse) {\r\n\r\n		$whereAddition = \'\';\r\n\r\n		if ($cse[\'dateStart\']) {\r\n			$whereAddition .= \' AND st.dateTaken > \' . $cse[\'dateStart\'];\r\n		}\r\n\r\n		if ($cse[\'dateEnd\']) {\r\n			$whereAddition .= \' AND st.dateTaken < \' . $cse[\'dateEnd\'];\r\n		}\r\n\r\n		$Q = \"SELECT ee.id\r\n			FROM surveys_taken st\r\n			INNER JOIN surveys s ON (st.surveyId = s.id)\r\n			INNER JOIN estat_entries ee ON (ee.userId = st.userId AND ee.estatId = \" . $cse[\'estatId\'] . \" AND ee.dateOfEntry = st.dateTaken)\r\n			WHERE s.id = \" . $cse[\'surveyId\'] . \"\r\n			AND s.companyId = \" . $cse[\'companyId\'] . $whereAddition;\r\n		\r\n		display($Q);\r\n\r\n		$entryIds = trim(implode(\',\', $SPADE[\'db\']->query($Q, DB_LIST)));\r\n\r\n		if ($entryIds) {\r\n			$Q = \"DELETE FROM estat_entries WHERE id IN (\" . $entryIds . \")\";\r\n	\r\n			display($Q);\r\n	\r\n			$SPADE[\'db\']->query($Q);\r\n		}\r\n\r\n		//$Q = \"SELECT st.*\r\n		$Q = \"SELECT st.surveyId, count(*)\r\n			FROM surveys_taken st\r\n			LEFT JOIN surveys s ON (st.surveyId = s.id)\r\n			WHERE s.id = \" . $cse[\'surveyId\'] . \"\r\n			AND s.companyId = \" . $cse[\'companyId\'] . $whereAddition;\r\n\r\n		display($Q);\r\n		continue;\r\n\r\n		$surveysTaken = $SPADE[\'db\']->query($Q);\r\n\r\n		if (is_array($surveysTaken) AND 0 < sizeof($surveysTaken)) {\r\n			foreach ($surveysTaken as $st) {\r\n				$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n					VALUES (\r\n						\" . $st[\'userId\'] . \",\r\n						\" . $cse[\'estatId\'] . \",\r\n						\" . $st[\'pointsEarned\'] . \",\r\n						\" . $st[\'dateTaken\'] . \",\r\n						\" . $SPADE[\'user\']->id . \",\r\n						\" . time() . \")\";\r\n\r\n				display($Q);\r\n\r\n				$SPADE[\'db\']->query($Q);\r\n			}\r\n		}\r\n	}\r\n\r\n\r\n\r\n	break;\r\n\r\ndefault:\r\n	logError( \'Unknown confirm step number: \' . $_REQUEST[\'confirm\'] );\r\n	return;\r\n}\r\n\r\n\r\nif ($_REQUEST[\'confirm\'] <= LAST_STEP_NUMBER) {\r\n	echo \'<br /><br /><a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=\' . ((int)$_REQUEST[\'confirm\'] + 1) . \'\">Execute the next step of the PHP conversion process.</a>\';\r\n}\r\n\r\n\r\n?>'),(4186,109,0.31,'smarty','0','Fixed... did not have a closing form tag.',1125939978,16,'24.10.174.164','{if $user->isLoggedIn()}{assign var=\"pgLayout\" value=\"file:layouts/withLeftNav.tpl\"}{/if}\r\n{include_php file=\"shared_handle:contactForm\"}\r\n\r\n<h1>Contact Us</h1>\r\n\r\n<strong>You can contact us by E-mail, phone, or U.S. mail. </strong><br><br>\r\n\r\n<form name=\"contactForm\" action=\"index.php\" method=\"post\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table>\r\n<tr>\r\n	<td><span>Your Name:</span></td>\r\n	<td><input type=\"text\" name=\"mfName\" value=\"{$smarty.request.mfName|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Your E-mail Address:</span></td>\r\n	<td><input type=\"text\" name=\"mfEmail\" value=\"{$smarty.request.mfEmail|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Your Phone:</span></td>\r\n	<td><input type=\"text\" name=\"mfPhone\" value=\"{$smarty.request.mfPhone|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n\r\n<tr>\r\n	<td><span>Subject:</span></td>\r\n	<td><input type=\"text\" name=\"mfSubject\" value=\"{$smarty.request.mfSubject|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Message Body:</span></td>\r\n	<td><textarea cols=\"35\" rows=\"6\" name=\"mfMessage\">{$smarty.request.mfMessage|stripslashes|htmlspecialchars}</textarea></td>\r\n</tr>\r\n<tr>\r\n	<td><span>&nbsp;</span></td>\r\n	<td><input type=\"submit\" value=\"Send Now\"></td>\r\n</tr>\r\n</table>\r\n<div class=\"underline\">&nbsp;</div>\r\n<br />\r\n<table>\r\n<tr>\r\n	<td><span>E-Mail:</span></td>\r\n	<td><span><strong>Fill out the form above or email us at <br>{mailto address=\"contact@ehealthcompete.com\" text=\"contact@ehealthcompete.com\" encode=\"javascript\"}</strong></span></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Phone:</span></td>\r\n	<td><span><strong>801.427.7595</strong></span></td>\r\n</tr>\r\n<!--tr>\r\n	<td><span>Fax:</span></td>\r\n	<td><span><strong>1-801-555-5555 </strong></span></td>\r\n</tr-->\r\n<tr>\r\n	<td valign=\"top\" nowrap><span><br>U.S. Mail: &nbsp; &nbsp; </span></td>\r\n	<td><span><strong><br>eHealthCompete, L.L.C. <br>\r\n			963 W. 670 S. Ste 23<br>\r\n			Pleasant Grove, Ut 84062</strong></span></td>\r\n</tr>\r\n</table>\r\n\r\n</form>\r\n'),(4187,261,0.10,'smarty','0','Page created.',1126199924,3,'216.194.127.150',''),(4188,261,0.11,'smarty','0','Page created.',1126200075,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{display var=$prefValues}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{display var=$aValues}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4189,261,0.12,'smarty','0','Page created.',1126200078,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{display var=$prefValues}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{display var=$aValues}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4190,261,0.13,'smarty','0','Page created.',1126202577,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{display var=$smarty.session}\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{display var=$prefValues}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{display var=$aValues}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4191,261,0.14,'smarty','0','Page created.',1126202639,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{display var=$smarty.session.company}\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{display var=$prefValues}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{display var=$aValues}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4192,261,0.15,'smarty','0','Page created.',1126202913,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{* display var=$smarty.session.company *}\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{display var=$prefValues}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{display var=$aValues}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4193,261,0.16,'smarty','0','Page created.',1126212879,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{* display var=$smarty.session.company *}\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{* display var=$prefValues *}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{display var=$aValues}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4194,261,0.17,'smarty','0','Page created.',1126213146,3,'216.194.127.150','<h1>{$page.title}</h1>\r\n\r\n{* display var=$smarty.session.company *}\r\n\r\n{include_php file=\"shared_handle:preferences/groupUpdate\"}\r\n\r\n{assign var=\"currentCategory\" value=\"\"}\r\n\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n{literal}\r\n<script type=\"text/javascript\">\r\nfunction checkNumber(value, min, max, precision) {\r\n	if(value == \'\') return;\r\n	var message = \'\';\r\n	if(value < min || value > max) {\r\n		message = \'Value must be between \' + min + \' and \' + max + \'.\\n\\n\';\r\n		if(precision > 0) {\r\n			message += \'NOTE: Value may be truncated after \' + precision + \' decimal places.\';\r\n		}\r\n	}\r\n	if (value.match(/.*\\..*\\./)) {\r\n		message += \'Please enter a valid number.\';\r\n	}\r\n	if(message) alert(message);\r\n}\r\n</script>\r\n{/literal}\r\n{* display var=$prefValues *}\r\n<table>\r\n{foreach from=$aPrefs item=row}\r\n{* display var=$row *}\r\n{assign var=\"lockedName\" value=\"`$row.name`_locked\"}\r\n{if $currentCategory neq $row.category}\r\n	{assign var=\"currentCategory\" value=$row.category}\r\n	<tr><td colspan=\"2\"><h2 class=\"withBG\">{$currentCategory}</h2></td></tr>\r\n{/if}\r\n<tr><td valign=\"top\">{$row.description}</td>\r\n{if $row.inputType|test_or:\"select-one\":\"select-multiple\":\"radios\":\"checkboxes\"}\r\n	{assign_array var=\"aOptions\" values=$row.validInput}\r\n	{assign_array var=\"aValues\" values=$prefValues[$row.name]}\r\n	{assign_array var=\"aDefaults\" values=$row.defaultValue}\r\n	{* display var=$aDefaults *}\r\n	{* display var=$aValues *}\r\n{/if}\r\n	<td valign=\"top\">\r\n{if $row.inputType eq \"string\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" maxlength=\"{$row.validInput}\" name=\"prefs[{$row.name}]\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"integer\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9]/))this.value = this.value.replace(/[^0-9]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \"float\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onkeyup=\"if(this.value.match(/[^0-9\\.]/))this.value = this.value.replace(/[^0-9\\.]/,\'\');\" onblur=\"checkNumber(this.value, {$row.validInput});\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{elseif $row.inputType eq \'select-one\' OR $row.inputType eq \'select-multiple\'}\r\n	<select name=\"prefs[{$row.name}]{if $row.inputType eq \'select-multiple\'}[]\" multiple=\"multiple\" size=\"{$row.inputSize}{/if}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}>\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<option value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option|@in_array:$aValues)} selected=\"selected\"{/if}>{$option}</option>\r\n	{/foreach}</select>\r\n{elseif $row.inputType eq \"radios\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"radio\" name=\"prefs[{$row.name}]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND $option|@inArray:$aDefaults) OR ($option eq $prefValues[$row.name])} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n{elseif $row.inputType eq \"checkboxes\"}\r\n	{foreach from=$aOptions item=\"option\"}\r\n		<input type=\"checkbox\" name=\"prefs[{$row.name}][]\" value=\"{$option}\"{if (!$prefValues[$row.name] AND !$row.name|@inArray:$savedPrefs AND $option|@inArray:$aDefaults) OR ($option|@inArray:$aValues)} checked=\"checked\"{/if}{if $prefValues[$lockedName]} disabled=\"disabled\"{/if}> {$option}<br />\r\n	{/foreach}\r\n	<input type=\"hidden\" name=\"prefs[{$row.name}][]\" value=\"END:{$row.name}\" /> \r\n{elseif $row.inputType eq \"regex\"}\r\n	<input type=\"text\" size=\"{$row.inputSize}\" name=\"prefs[{$row.name}]\" onchange=\"if(!this.value.match({$row.validInput})) alert (\'\\\'\' + this.value + \'\\\' is not valid for \\\'{$row.description}\\\'.\')\" value=\"{$prefValues[$row.name]|default:$row.defaultValue}\"{if $prefValues[$lockedName]} disabled=\"disabled\"{/if} />\r\n{else}\r\n	Unrecognized Input Type! <b>({$row.inputType})</b>\r\n{/if} \r\n	</td>\r\n</tr>\r\n{/foreach}\r\n</tr>\r\n</table>\r\n\r\n<div align=\"right\">\r\n	<input type=\"submit\" name=\"prefAction\" value=\"Save Changes\" />\r\n</div>\r\n</form>'),(4616,138,0.84,'smarty','0','flashgraph v2 date range now working.',1134618801,2,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=$smarty.session.company.preferences.stylesheet_url|default:\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"0\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"basedOn\" value=$smarty.request.basedOn|default:\"total\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$basedOn:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$basedOn:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$basedOn:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n{if $smarty.request.esId AND !$compId}\r\n<div style=\"position:absolute;top:0px;right:0px;\">\r\n	<small><i>{$graphTimeFrom|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"} - {$graphTimeUntil|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"}</i></small>\r\n</div>\r\n{/if}\r\n\r\n{* OLD: <h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $basedOn}Change in {/if}{$type|niceText} Over Time</h3>*}\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {$type|niceText} - {$basedOn|niceText} Over Time</h3>\r\n{if true AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif true OR $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if true OR $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if !$compId AND $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>back <i style=\"font-weight:normal;\">({$graphTimeBack|date_format2:\"M jS, y\"})</i></small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if !$compId AND $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>forward <i style=\"font-weight:normal;\">({$graphTimeNext|date_format2:\"M jS, y\"})</i></small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4708,233,1.50,'smarty','0','Testing new Other Winners section',1138077395,2,'24.2.76.126','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{assign var=\"GUIDs\" value=\"\"}\r\n\r\n{select_query assign=\"managerId\" return=\"val\"}\r\n	userId FROM competitions c WHERE c.id = {$smarty.request.cid}\r\n{/select_query}\r\n\r\n{if $managerId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	<!-- ismanager -->\r\n	{include_php file=\"shared_handle:competition/management\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition/load\"}\r\n\r\n<script type=\"text/javascript\">{literal}\r\n	var GUIDs = \'0\';\r\n\r\n	function updateGUIDs() {\r\n		var checkBoxes = document.forms[\'leaderBoardForm\'][\"graphCheckbox[]\"];\r\n		if (!checkBoxes.length) {\r\n			checkBoxes[0] = checkBoxes;\r\n			checkBoxes.length = 1;\r\n		}\r\n		GUIDs = \'\';\r\n		for (var x = 0; x < checkBoxes.length; x++) {\r\n			if (checkBoxes[x].checked == true && checkBoxes[x].value) {\r\n				GUIDs += checkBoxes[x].value+\',\'; \r\n			}\r\n			\r\n		}\r\n		rewriteGraphLinks();\r\n	}\r\n\r\n\r\n	function loadGraphWindow(graphParams) {\r\n		uri = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}; //&\'+graphParams+\'&userIds=\'+GUIDs;\r\n		var gFrame = window.frames[\'graphwindow\'];\r\n		// gFrame.location.replace(uri);\r\n		var gForm = document.getElementById(\'form_leaderBoard\');\r\n		gForm.gParams.value = graphParams;\r\n		gForm.userIds.value = GUIDs;\r\n		gForm.submit();\r\n		return false;\r\n	}\r\n{/literal}</script>\r\n\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\r\n\r\n{capture name=\"scoringMethod\"}\r\n	<b>{$competition.current_parameter.name|capitalize}</b> ({$competition.current_parameter.units}) - {$competition.current_parameter.basedOn|capitalize}{* - {$competition.current_parameter.polarity|capitalize} *}\r\n{/capture}\r\n\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" width=\"275\">\r\n\r\n		{if $acm->isDomainAdmin()}\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'otherWinners\', \'\', \'showHide\');\"><img id=\"otherWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Other Winners\r\n		</h2>\r\n\r\n		<div id=\"otherWinners\" style=\"display:block;\">\r\n		<small>Testing...</small>\r\n		</div>\r\n		{/if}\r\n		\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'leaderBoard\', \'\', \'showHide\');\"><img id=\"leaderBoard_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Leaders\r\n		</h2>\r\n		\r\n		{if $competition.dateOfObject}<div align=\"right\"><small><i>as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}</i></small></div>{/if}\r\n\r\n		<div id=\"leaderBoard\" style=\"display:block;\">\r\n		<small>{$smarty.capture.scoringMethod}</small><br />\r\n		{if $competition.style eq \"Group-vs-Group\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Team Average)</div>\r\n		{elseif $competition.style eq \"Company-vs-Company\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Company Average)</div>\r\n		{/if}\r\n		{if $competition.parameters|@count gt 1}\r\n			<select name=\"scoringMethod\" onchange=\"if(this.value)location.replace(\'?pg={$page.name}&cid={$competition.id}&cpid=\'+this.value);\" style=\"width:200px;\">\r\n				<option value=\"\">(Choose Leaderboard)</option>\r\n			{foreach from=$competition.parameters key=\"paramId\" item=\"param\"}\r\n				{if $paramId neq $competition.current_parameter.id}\r\n				<option value=\"{$paramId}\">{$param.name|capitalize} - {$param.basedOn|capitalize}{* - {$param.polarity} *}</option>\r\n				{/if}\r\n			{/foreach}\r\n			</select>\r\n		{/if}\r\n		<form id=\"form_leaderBoard\" name=\"leaderBoardForm\" method=\"POST\" action=\"index.php?pg=flashgraph-frame&compId={$competition.id}\" target=\"graphwindow\">\r\n		<input type=\"hidden\" name=\"gParams\" value=\"\" />\r\n		<input type=\"hidden\" name=\"userIds\" value=\"\" />\r\n		<table cellpadding=\"0\" cellspacing=\"0\">\r\n		{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\">Team</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></span>\r\n			<td class=\"thinCell\">#Pl</td>\r\n			{* <td class=\"cellHeadTiny\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show In Graphs\" /></td> *}\r\n			</tr>\r\n			{foreach name=\"rankLoop\" from=$competition.team_data item=\"teamScore\" key=\"teamName\"}\r\n				{if $teamName ne \"Waiting to Join\"}\r\n					<tr>\r\n						<td class=\"thinCell\"><small>{$smarty.foreach.rankLoop.iteration}</small></td>\r\n						<td class=\"thinCell\"><small class=\"mini\">{$teamName|default:\"&nbsp;\"}</small></td>\r\n						<td class=\"thinCell\"><small>{$teamScore|number_format:2}</small></td>\r\n						<td class=\"thinCell\"><small>{$competition.teams.$teamName|@count|default:\"0\"}</small></td>\r\n						{* <td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{foreach from=$teams.users item=teamUser}{$teamUser.id},{if $smarty.foreach.rankLoop.iteration lt 11}{append var=\"GUIDs\" value=\"`$teamUser.id`,\"}{/if}{/foreach}{$GUIDs}\"{if $smarty.foreach.rankLoop.iteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td> *}\r\n					</tr>\r\n				{/if}\r\n			{/foreach}\r\n		{else} \r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\" align=\"center\">Name</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"{$smarty.capture.scoringMethod|strip_tags}\" /></td>\r\n			<td class=\"thinCell\">Update</td>\r\n			<td class=\"thinCell\" align=\"center\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show in Graphs\" /></td>\r\n			</tr>\r\n			{foreach from=$competition.data item=\"userData\" key=\"userId\" name=\"compData\"}\r\n			{assign var=\"curIteration\" value=$smarty.foreach.compData.iteration}\r\n			{if $curIteration eq 21}\r\n			</table>\r\n			</div>\r\n			<br />\r\n			<h2 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'runnerUps\', \'\', \'showHide\');\"><img id=\"runnerUps_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n				Runner Ups\r\n			</h2>\r\n			<div id=\"runnerUps\" style=\"display:none;\">\r\n			<table cellpadding=\"0\" cellspacing=\"0\">\r\n			{/if}\r\n			<tr>\r\n			<td class=\"thinCell\"><small>{$curIteration}</small></td>\r\n			<td class=\"thinCell\"><small class=\"mini\">{$competition.users[$userId]}</small></td>\r\n			<td class=\"thinCell\"><small>{$userData.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n			<td class=\"thinCell\"><small>{if $userData.doe}{$userData.doe|date_format2:\"n/j/y\"}{else}-Never-{/if}</small></td>\r\n			<td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{$userId}{if $curIteration lt 11}{append var=\"GUIDs\" value=\"`$userId`,\"}{/if}\"{if $curIteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td>\r\n			</tr>\r\n			{/foreach}\r\n		{/if}\r\n		</form>\r\n		<script type=\"text/javascript\">GUIDs = \'{$GUIDs}\';</script>\r\n		</table>\r\n		</div> \r\n		<div align=\"right\"><small><i><a href=\"?pg=faq#comp\">How is the competition scored?</a></i></small></div>\r\n		<img src=\"./img/blank.gif\" width=\"168\" height=\"1\" alt=\"\" />\r\n		{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'managePlayers\', \'\', \'showHide\');\"><img id=\"managePlayers_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div> \r\n			Manage\r\n		</h2>\r\n		<div id=\"managePlayers\" style=\"display:none;\">\r\n					<form name=\"managePlayers[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n					<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n					<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n					<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n					<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n					<input type=\"hidden\" name=\"style\" value=\"{$competition.style}\">\r\n					<span class=\"cellHeadTiny\" style=\"clear:left;\">Del</span>\r\n					<span class=\"cellHead\">View Stats</span>\r\n					{* <span class=\"cellHeadSmall\">-</span> *}\r\n					<br />\r\n					{foreach from=$competition.users item=\"username\" key=\"userId\" name=\"dateUpdated\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"managePlayers[delete][]\" value=\"{$username}\" style=\"width:14px;height:14px;margin:0px 2px;\"></small></span>\r\n						<span class=\"cell\"><small><a href=\"?pg=my_home&cid={$competition.id}&userId={$userId}&hideComps=1\">{$username}</a></small></span>\r\n						{* <span class=\"cellSmall\"><small><a href=\"mailto:{$compUser.email}\">email</a></small></span> *}\r\n						<br />\r\n					{/foreach}\r\n					<div style=\"text-align:center;\">\r\n                                                <br />\r\n						<input type=\"submit\" class=\"button\" value=\"Remove Selected\">\r\n					</div>\r\n					</form>\r\n		</div><br/>\r\n		{/if}\r\n		{* End new section for Player management. *}\r\n		\r\n		{* Begin new section for Team management.  This can be moved where ever. *}\r\n		{* ******************************** TEAM MANAGEMENT ***************************************** *}\r\n		{if $isManager and $competition.style eq \'Group-vs-Group\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'teamManagement\', \'\', \'showHide\');\"><img id=\"teamManagement_img\" src=\"./img/blank.gif\" class=\"showHide_{if $smarty.request.showTeamManagement}on{else}off{/if}\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div>\r\n			Teams</h2>\r\n		<div id=\"teamManagement\" style=\"display:{if $smarty.request.showTeamManagement}block{else}none{/if};\">\r\n			<form name=\"manageTeam[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n			<div id=\"playersList{counter}\">\r\n				<span class=\"cellHeadTiny\">Del</span>\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"teams\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small><input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\"></small></span><br />\r\n					{/if}\r\n				{/foreach}\r\n			</div>\r\n                        <br />\r\n			<div style=\"text-align:center;\">New Team: <input id=\"addTeam\" type=\"text\" name=\"manageTeam[addTeam]\" size=\"10\"><br />\r\n			<br />\r\n                        <input type=\"submit\" class=\"button\" value=\"Submit Changes\"></div>\r\n			</form>\r\n		</div><br />\r\n		{/if}\r\n		{* End new section for Team management. *}\r\n\r\n		\r\n		{* if !$isManager AND $competition.users|@count lt 45}{include file=\"layouts/ads.tpl\"}{assign var=\"adsShown\" value=\"1\"}{/if *}\r\n\r\n		{*\r\n			<h2 class=\"withBG\">Competition Stats</h2>\r\n			<span class=\"cellHeadLarge\">Category</span><span class=\"cellHeadSmall\">Result</span><br />\r\n			<span class=\"cellLarge\"><small>start weight</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupStartWeight|default:0} lbs</small></span><br />\r\n			<span class=\"cellLarge\"><small>weight lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupWeightLost|default:0} lbs</small></span><br />\r\n			{if $competition.groupPercentageWeightLost gt 0}<span class=\"cellLarge\"><small>% lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupPercentageWeightLost|default:0|number_format:\"2\"}</small></span><br />{/if}\r\n			<span class=\"cellLarge\"><small>fat intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupFat|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>calorie intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupCalories|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>minutes exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupExercise|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>distance exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupDistanceExercised|default:0}</small></span><br />\r\n			<img src=\"./img/blank.gif\" width=\"165\" height=\"1\" alt=\"\" />\r\n		*}\r\n		</td>\r\n		<td width=\"100%\" valign=\"top\">\r\n			<div id=\"contentBox\" class=\"centerBox\" style=\"margin-left:10px;\"><div class=\"topRightTreasure\">\r\n<div id=\"jackpot\">{if $competition.potAmount gt 0}${$competition.potAmount|number_format:2}{/if}</div>\r\n<h1 class=\"underline\">{$competition.title|default:\"Competition Title\"}</h1>\r\n\r\n{* ******************************** COMPETITION END *********************************** *}\r\n{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}\r\n	{if $competition.results.winners|@count eq 1}\r\n		{* There was one winner, either by scoringMethod or tieBreakerMethod *}\r\n\r\n		{math assign=\"daysOfCompetition\" equation=\"(x - y) / z\" x=$competition.endDate|default:\"0\" y=$competition.startDate|default:\"0\" z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat|default:\"0\" y=$competition.results.secondPlaceStat|default:\"0\"}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerName\"}    {*key=\"winnerName\"*}\r\n			{assign var=\"winnerData\" value=$competitions.users.$winnerName}\r\n			\r\n			{if $competition.style eq \"Group-vs-Group\"}\r\n				{assign var=\"description\" value=\"Winning Team\"}\r\n				{assign var=\"avg\" value=\"average\"}\r\n			{else}\r\n				{assign var=\"description\" value=\"Winner\"}\r\n			{/if}\r\n\r\n			<h2><br /><b>{$winnerName}</b> is the {$description}{if $competition.potAmount}, taking home <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{strip}\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of \r\n				fierce competition, <b>{$winnerName}</b> is the \r\n				{$description}!	Based on \r\n				<b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2} \r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n			{else}                                {* A Tie! *}\r\n				{assign var=\"weightLost\" value=\"Weight Lost\"}\r\n				{assign var=\"percentLost\" value=\"Percentage Weight Lost\"}\r\n\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> \r\n				days of fierce competition, there was a tie in the judging \r\n				method, <b>{$competition.scoringMethod}</b>. To break this \r\n				tie, the selected tie breaking method, \r\n				<b>{$competition.tieBreakerMethod}</b>, was used to determine \r\n				<b>{$winnerName}</b> as the {$description}. <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2}\r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n				<!--\r\n				<b>{$winnerData.$weightLost|number_format:0} pounds</b>, which \r\n				was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n				-->\r\n			{/if}\r\n			{/strip}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:3}</b> margin over <b>{$competition.results.secondPlaceUser}</b>.\r\n			\r\n			<h2><br />Congratulations to you all!</h2>\r\n			<br />\r\n			<div class=\"underline\"></div>\r\n		{/foreach}\r\n\r\n	{elseif $competition.results.winners|@count gt 1}\r\n		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}\r\n	\r\n		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>\r\n		<ul>\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			<li>{$winnerName}</li>\r\n		{/foreach}\r\n		</ul>\r\n		\r\n	{else}\r\n		{* For some reason, there were no winners *}\r\n\r\n		<h2><br />\r\n		Winner information is being calculated. <br />\r\n		Please check back soon.\r\n		<br /><br /></h2>\r\n	{/if}\r\n	This competition has ended and is no longer active.<br />\r\n{/if}\r\n{* ************************************************************************************ *}\r\n\r\n<div id=\"prizeDesc\">{$competition.potDescription}<br />\r\n{if $competition.potAmount}<small style=\"color:#FFF;\">(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>\r\n\r\n{if $competition.startDate lt $smarty.now}\r\n	Time remaining: <b>{$competition.timeLeft}</b><br />\r\n{else}\r\n	This competition has not yet started!<br />\r\n{/if}\r\n\r\nStart{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:\"n/j/Y\"}</b> &nbsp; \r\nEnd{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:\"n/j/Y\"}</b><br />\r\n{if $competition.calculationMode neq \"Real-Time\"}Competition stats/scoring updated as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}{if $isManager} (<a href=\"?pg=competition&cid={$smarty.request.cid}&nocache=1\">Update Now!</a>){/if}<br />{/if}\r\n<div style=\"font-size:5px;clear:left;\">&nbsp;</div>\r\n{assign var=\"scoringMethod\" value=$competition.scoringMethod}\r\n{assign var=\"tieBreakerMethod\" value=$competition.tieBreakerMethod}\r\n{assign var=\"weeklyWinnersMethod1\" value=$competition.weeklyWinnersMethod1}\r\n{assign var=\"weeklyWinnersMethod2\" value=$competition.weeklyWinnersMethod2}\r\n\r\n{* ******************** WEEKLY WINNERS ********************* *}\r\n{if $competition.weeklyWinners}\r\n	{if $weeklyWinnersMethod1}             {* DON\'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n			<a href=\"javascript:toggle(\'weeklyWinners\', \'\', \'showHide\');\"><img id=\"weeklyWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n			Last Week\'s Winners<i>!</i> <small style=\"color:#000; font-size:11px;\">(<i><b>{$competition.weeklyWinners.startDate|date_format2:\"D n/j\"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:\"D n/j\"}</b></i>)</small></h2> \r\n		<div id=\"weeklyWinners\">\r\n		<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod1}</div>\r\n		<img src=\"{$skinFolder}images/winner_1.gif\" style=\"float:left;\" />\r\n		{strip}\r\n		{foreach name=\"method1\" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}\r\n			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method1.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method1.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> led the way last week by \r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b> {elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}\r\n			{else}\r\n				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod2} \r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod2}</div>\r\n		<img src=\"{$skinFolder}images/winner_2.gif\" style=\"float:left;\" />\r\n		{* display var=$competition.weeklyWinners.users *}\r\n		{strip}\r\n		{foreach name=\"method2\" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}\r\n			\r\n			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method2.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method2.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> won by \r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{/if}\r\n			{else}\r\n				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod1}\r\n	</tr></table></div>{/if}\r\n{/if}\r\n{* ********************************************************* *}\r\n\r\n{if $acm->isDomainAdmin() and $smarty.request.debug}\r\n	{display var=$competition}\r\n{/if} \r\n\r\n{* ******************************** COMPARISON GRAPHS ***************************************** *}\r\n{if $competition.graphParameters|@count}\r\n<script type=\"text/javascript\">{literal}\r\n	function rewriteGraphLinks() {\r\n		var gLinksDiv = document.getElementById(\'graphLinksDiv\');\r\n		gLinksDiv.innerHTML = \'\';\r\n		{/literal}{foreach name=\"graphTypes\" from=$competition.graphParameters item=\"cgp\"}\r\n		gLinksDiv.innerHTML += \'<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type={$cgp.name|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&basedOn={$cgp.basedOn|replace:\" \":\"+\"}&fillPrevious={if $cgp.assumeConstantValues eq \"yes\"}1{else}0{/if}&precision={$cgp.decimalPlaces}&format=wide&userIds=\'+GUIDs+\'\" target=\"graphwindow\"><small>{$cgp.name|niceText|replace:\" \":\"&nbsp;\"}&nbsp;-&nbsp;{$cgp.basedOn|niceText|replace:\" \":\"&nbsp;\"}</small></a>{if !$smarty.foreach.graphTypes.last} | {/if}\';\r\n		{/foreach}\r\n	{literal}\r\n	}\r\n{/literal}</script>\r\n<h2 class=\"withBG\"><a name=\"graph\"></a>\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'graphs\', \'\', \'showHide\');\"><img id=\"graphs_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Comparison Graphs &nbsp; <small><i>No graph? <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">click here</a> to download the free Flash Player plug-in.</i></small></h2>\r\n<div id=\"graphs\" style=\"display:block;\">\r\n	<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&format=wide\"}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe \"iframe_graphwindow\" name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"230\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<div id=\"graphLinksDiv\">\r\n		<small>\r\n		{foreach name=\"graphTypes\" from=$competition.availableGraphs key=\"graphType\" item=\"graphParams\"}\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&{$graphParams}\');\" target=\"graphwindow\">{$graphType}</a>{if $smarty.foreach.graphTypes.iteration neq $competition.availableGraphs|@count} | {/if}\r\n		{/foreach}\r\n		</small></div></td>\r\n	</tr>\r\n	</table>\r\n	<script type=\"text/javascript\">\r\n		rewriteGraphLinks();\r\n	</script>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'teams\', \'\', \'showHide\');\"><img id=\"teams_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>\r\n<div id=\"teams\" style=\"display:block;\">\r\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td>\r\n	<div align=\"right\" style=\"border-bottom:1px solid black; margin:2px; padding:2px;\">All stats based on: {$smarty.capture.scoringMethod}</div>\r\n	{if $isManager}\r\n		<form name=\"changeTeam\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n	{/if}\r\n		{assign var=\"minEx\" value=\"Minutes Exercise\"}\r\n		{assign var=\"distEx\" value=\"Distance Exercised\"}\r\n		{assign var=\"pctLst\" value=\"Percentage Weight Lost\"}\r\n		{assign var=\"wtLst\" value=\"Percentage Weight Lost\"}\r\n		{foreach from=$competition.team_data name=\"teamsLoop\" item=\"teamScore\" key=\"teamName\"}\r\n			<div id=\"playersList{$smarty.foreach.teamsLoop.iteration}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			{if $teamName eq \"Waiting to Join\"}<h2>Not assigned to a team</h2>{else}<h4><span style=\"font-weight:normal;\">#{$smarty.foreach.teamsLoop.iteration}) </span>{$teamName|default:\"&nbsp;\"}{/if}</h4>\r\n			<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:250px; background-color:#FFC;\">\r\n			<tr>\r\n				<td class=\"thinCell\" width=\"55%\">Name</td>\r\n				<td class=\"thinCell\" width=\"25%\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></td>\r\n				<td class=\"thinCell\" width=\"20%\">Update</span>\r\n			</tr>\r\n			{foreach from=$competition.teams.$teamName item=\"userId\"}\r\n			<tr>\r\n				<td class=\"thinCell\" style=\"text-align:left;\"><small>{if $isManager}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small></td>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span> *}\r\n				<td class=\"thinCell\"><small>{$competition.data.$userId.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n				<td class=\"thinCell\"><small>{if $competition.data.$userId.doe}{$competition.data.$userId.doe|date_format2:\"n/j/y\"}{else}Never{/if}</small></td>\r\n			</tr>\r\n			{foreachelse}\r\n			{* No players assigned to this team. *}\r\n			<tr>\r\n				<td class=\"thinCell\">No players yet.</td>\r\n			</tr>\r\n			{/foreach}\r\n\r\n			</table>\r\n			</div>\r\n		{/foreach}\r\n	{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<br />\r\n		<select name=\"changeTeam[team]\">\r\n			<option value=\"\">Move selected players to...</option>\r\n			{foreach from=$competition.teams item=\"newTeams\" key=\"newTeamName\"}\r\n				{*if $newTeamName ne $teamName and $newTeamName ne \"Waiting to Join\"*}\r\n				{if $newTeamName ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeamName}\">{$newTeamName}</option>\r\n				{/if}\r\n			{/foreach}\r\n		</select><br />\r\n		<input type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\r\n	{/if}\r\n</td></tr></table>\r\n</div>\r\n{/if}\r\n</div>\r\n	{* ******************************** DISCUSSION BOARD ***************************************** *}\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'discuss\', \'\', \'showHide\');\"><img id=\"discuss_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Discussion Board</h2>\r\n<div id=\"discuss\" style=\"display:block;\">\r\n	<table cellpadding=\"0\" width=\"100%\" border=\"0\"><tr><td><iframe src=\"?pg=competition/forum\" id=\"discussionBoard\" frameborder=\"0\" scrolling=\"yes\" style=\"width:100%;\"></iframe></td></tr></table>\r\n</div>\r\n\r\n</div></td>\r\n</tr></table>\r\n\r\n{*\r\n<script type=\"text/javascript\">{literal}\r\n	if ( window.frames != null ) {\r\n	    for ( i = 0; i< window.frames.length; i++ )\r\n	        window.alert (\"Child window \" +i+ \" is named \"+window.frames(i).name);\r\n	}\r\n{/literal}</script>\r\n*}'),(4712,277,0.12,'smarty','0','Page created.',1138079170,2,'24.2.76.126','{assign var=\"pgLayout\" value=\"file:layouts/blank.tpl\"}\r\n{include_php file=\"shared:competition/otherWinners\"}\r\n<h2>Other Winners</h2>\r\n\r\n{display var=$competition}'),(4713,277,0.13,'smarty','0','Page created.',1138079227,2,'24.2.76.126','{assign var=\"pgLayout\" value=\"file:layouts/blank.tpl\"}\r\n{include_php file=\"shared:competition/otherWinners.php\"}\r\n<h2>Other Winners</h2>\r\n\r\n{display var=$competition}'),(4714,277,0.14,'smarty','0','Page created.',1138079279,2,'24.2.76.126','{assign var=\"pgLayout\" value=\"file:layouts/blank.tpl\"}\r\n{include_php file=\"shared_handle:competition/otherWinners\"}\r\n<h2>Other Winners</h2>\r\n\r\n{display var=$competition}'),(4715,233,1.52,'smarty','0','Testing new Other Winners section',1138080004,2,'24.2.76.126','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{assign var=\"GUIDs\" value=\"\"}\r\n\r\n{select_query assign=\"managerId\" return=\"val\"}\r\n	userId FROM competitions c WHERE c.id = {$smarty.request.cid}\r\n{/select_query}\r\n\r\n{if $managerId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	<!-- ismanager -->\r\n	{include_php file=\"shared_handle:competition/management\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition/load\"}\r\n\r\n<script type=\"text/javascript\">{literal}\r\n	var GUIDs = \'0\';\r\n\r\n	function updateGUIDs() {\r\n		var checkBoxes = document.forms[\'leaderBoardForm\'][\"graphCheckbox[]\"];\r\n		if (!checkBoxes.length) {\r\n			checkBoxes[0] = checkBoxes;\r\n			checkBoxes.length = 1;\r\n		}\r\n		GUIDs = \'\';\r\n		for (var x = 0; x < checkBoxes.length; x++) {\r\n			if (checkBoxes[x].checked == true && checkBoxes[x].value) {\r\n				GUIDs += checkBoxes[x].value+\',\'; \r\n			}\r\n			\r\n		}\r\n		rewriteGraphLinks();\r\n	}\r\n\r\n\r\n	function loadGraphWindow(graphParams) {\r\n		uri = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}; //&\'+graphParams+\'&userIds=\'+GUIDs;\r\n		var gFrame = window.frames[\'graphwindow\'];\r\n		// gFrame.location.replace(uri);\r\n		var gForm = document.getElementById(\'form_leaderBoard\');\r\n		gForm.gParams.value = graphParams;\r\n		gForm.userIds.value = GUIDs;\r\n		gForm.submit();\r\n		return false;\r\n	}\r\n{/literal}</script>\r\n\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\r\n\r\n{capture name=\"scoringMethod\"}\r\n	<b>{$competition.current_parameter.name|capitalize}</b> ({$competition.current_parameter.units}) - {$competition.current_parameter.basedOn|capitalize}{* - {$competition.current_parameter.polarity|capitalize} *}\r\n{/capture}\r\n\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" width=\"275\">\r\n\r\n		{if $acm->isDomainAdmin() and $competition.prizes|@count}\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'otherWinners\', \'\', \'showHide\');\"><img id=\"otherWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Other Winners\r\n		</h2>\r\n\r\n		<div id=\"otherWinners\" style=\"display:block;\">\r\n		<small>\r\n		{foreach from=$competition.prizes item=\"prize\"}\r\n			<a href=\"javascript://\" onclick=\"window.open(\'?pg=competition/other_winners&cid={$competition.id}&prizeId={$prize.id}\', \'\', \'height=550,width=285,menubar=no,status=no,titlebar=no,resizable=yes\');\">{$prize.title}</a><br />\r\n		{/foreach}\r\n		</small>\r\n		</div>\r\n		{/if}\r\n		\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'leaderBoard\', \'\', \'showHide\');\"><img id=\"leaderBoard_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Leaders\r\n		</h2>\r\n		\r\n		{if $competition.dateOfObject}<div align=\"right\"><small><i>as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}</i></small></div>{/if}\r\n\r\n		<div id=\"leaderBoard\" style=\"display:block;\">\r\n		<small>{$smarty.capture.scoringMethod}</small><br />\r\n		{if $competition.style eq \"Group-vs-Group\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Team Average)</div>\r\n		{elseif $competition.style eq \"Company-vs-Company\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Company Average)</div>\r\n		{/if}\r\n		{if $competition.parameters|@count gt 1}\r\n			<select name=\"scoringMethod\" onchange=\"if(this.value)location.replace(\'?pg={$page.name}&cid={$competition.id}&cpid=\'+this.value);\" style=\"width:200px;\">\r\n				<option value=\"\">(Choose Leaderboard)</option>\r\n			{foreach from=$competition.parameters key=\"paramId\" item=\"param\"}\r\n				{if $paramId neq $competition.current_parameter.id}\r\n				<option value=\"{$paramId}\">{$param.name|capitalize} - {$param.basedOn|capitalize}{* - {$param.polarity} *}</option>\r\n				{/if}\r\n			{/foreach}\r\n			</select>\r\n		{/if}\r\n		<form id=\"form_leaderBoard\" name=\"leaderBoardForm\" method=\"POST\" action=\"index.php?pg=flashgraph-frame&compId={$competition.id}\" target=\"graphwindow\">\r\n		<input type=\"hidden\" name=\"gParams\" value=\"\" />\r\n		<input type=\"hidden\" name=\"userIds\" value=\"\" />\r\n		<table cellpadding=\"0\" cellspacing=\"0\">\r\n		{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\">Team</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></span>\r\n			<td class=\"thinCell\">#Pl</td>\r\n			{* <td class=\"cellHeadTiny\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show In Graphs\" /></td> *}\r\n			</tr>\r\n			{foreach name=\"rankLoop\" from=$competition.team_data item=\"teamScore\" key=\"teamName\"}\r\n				{if $teamName ne \"Waiting to Join\"}\r\n					<tr>\r\n						<td class=\"thinCell\"><small>{$smarty.foreach.rankLoop.iteration}</small></td>\r\n						<td class=\"thinCell\"><small class=\"mini\">{$teamName|default:\"&nbsp;\"}</small></td>\r\n						<td class=\"thinCell\"><small>{$teamScore|number_format:2}</small></td>\r\n						<td class=\"thinCell\"><small>{$competition.teams.$teamName|@count|default:\"0\"}</small></td>\r\n						{* <td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{foreach from=$teams.users item=teamUser}{$teamUser.id},{if $smarty.foreach.rankLoop.iteration lt 11}{append var=\"GUIDs\" value=\"`$teamUser.id`,\"}{/if}{/foreach}{$GUIDs}\"{if $smarty.foreach.rankLoop.iteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td> *}\r\n					</tr>\r\n				{/if}\r\n			{/foreach}\r\n		{else} \r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\" align=\"center\">Name</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"{$smarty.capture.scoringMethod|strip_tags}\" /></td>\r\n			<td class=\"thinCell\">Update</td>\r\n			<td class=\"thinCell\" align=\"center\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show in Graphs\" /></td>\r\n			</tr>\r\n			{foreach from=$competition.data item=\"userData\" key=\"userId\" name=\"compData\"}\r\n			{assign var=\"curIteration\" value=$smarty.foreach.compData.iteration}\r\n			{if $curIteration eq 21}\r\n			</table>\r\n			</div>\r\n			<br />\r\n			<h2 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'runnerUps\', \'\', \'showHide\');\"><img id=\"runnerUps_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n				Runner Ups\r\n			</h2>\r\n			<div id=\"runnerUps\" style=\"display:none;\">\r\n			<table cellpadding=\"0\" cellspacing=\"0\">\r\n			{/if}\r\n			<tr>\r\n			<td class=\"thinCell\"><small>{$curIteration}</small></td>\r\n			<td class=\"thinCell\"><small class=\"mini\">{$competition.users[$userId]}</small></td>\r\n			<td class=\"thinCell\"><small>{$userData.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n			<td class=\"thinCell\"><small>{if $userData.doe}{$userData.doe|date_format2:\"n/j/y\"}{else}-Never-{/if}</small></td>\r\n			<td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{$userId}{if $curIteration lt 11}{append var=\"GUIDs\" value=\"`$userId`,\"}{/if}\"{if $curIteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td>\r\n			</tr>\r\n			{/foreach}\r\n		{/if}\r\n		</form>\r\n		<script type=\"text/javascript\">GUIDs = \'{$GUIDs}\';</script>\r\n		</table>\r\n		</div> \r\n		<div align=\"right\"><small><i><a href=\"?pg=faq#comp\">How is the competition scored?</a></i></small></div>\r\n		<img src=\"./img/blank.gif\" width=\"168\" height=\"1\" alt=\"\" />\r\n		{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'managePlayers\', \'\', \'showHide\');\"><img id=\"managePlayers_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div> \r\n			Manage\r\n		</h2>\r\n		<div id=\"managePlayers\" style=\"display:none;\">\r\n					<form name=\"managePlayers[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n					<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n					<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n					<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n					<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n					<input type=\"hidden\" name=\"style\" value=\"{$competition.style}\">\r\n					<span class=\"cellHeadTiny\" style=\"clear:left;\">Del</span>\r\n					<span class=\"cellHead\">View Stats</span>\r\n					{* <span class=\"cellHeadSmall\">-</span> *}\r\n					<br />\r\n					{foreach from=$competition.users item=\"username\" key=\"userId\" name=\"dateUpdated\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"managePlayers[delete][]\" value=\"{$username}\" style=\"width:14px;height:14px;margin:0px 2px;\"></small></span>\r\n						<span class=\"cell\"><small><a href=\"?pg=my_home&cid={$competition.id}&userId={$userId}&hideComps=1\">{$username}</a></small></span>\r\n						{* <span class=\"cellSmall\"><small><a href=\"mailto:{$compUser.email}\">email</a></small></span> *}\r\n						<br />\r\n					{/foreach}\r\n					<div style=\"text-align:center;\">\r\n                                                <br />\r\n						<input type=\"submit\" class=\"button\" value=\"Remove Selected\">\r\n					</div>\r\n					</form>\r\n		</div><br/>\r\n		{/if}\r\n		{* End new section for Player management. *}\r\n		\r\n		{* Begin new section for Team management.  This can be moved where ever. *}\r\n		{* ******************************** TEAM MANAGEMENT ***************************************** *}\r\n		{if $isManager and $competition.style eq \'Group-vs-Group\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'teamManagement\', \'\', \'showHide\');\"><img id=\"teamManagement_img\" src=\"./img/blank.gif\" class=\"showHide_{if $smarty.request.showTeamManagement}on{else}off{/if}\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div>\r\n			Teams</h2>\r\n		<div id=\"teamManagement\" style=\"display:{if $smarty.request.showTeamManagement}block{else}none{/if};\">\r\n			<form name=\"manageTeam[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n			<div id=\"playersList{counter}\">\r\n				<span class=\"cellHeadTiny\">Del</span>\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"teams\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small><input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\"></small></span><br />\r\n					{/if}\r\n				{/foreach}\r\n			</div>\r\n                        <br />\r\n			<div style=\"text-align:center;\">New Team: <input id=\"addTeam\" type=\"text\" name=\"manageTeam[addTeam]\" size=\"10\"><br />\r\n			<br />\r\n                        <input type=\"submit\" class=\"button\" value=\"Submit Changes\"></div>\r\n			</form>\r\n		</div><br />\r\n		{/if}\r\n		{* End new section for Team management. *}\r\n\r\n		\r\n		{* if !$isManager AND $competition.users|@count lt 45}{include file=\"layouts/ads.tpl\"}{assign var=\"adsShown\" value=\"1\"}{/if *}\r\n\r\n		{*\r\n			<h2 class=\"withBG\">Competition Stats</h2>\r\n			<span class=\"cellHeadLarge\">Category</span><span class=\"cellHeadSmall\">Result</span><br />\r\n			<span class=\"cellLarge\"><small>start weight</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupStartWeight|default:0} lbs</small></span><br />\r\n			<span class=\"cellLarge\"><small>weight lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupWeightLost|default:0} lbs</small></span><br />\r\n			{if $competition.groupPercentageWeightLost gt 0}<span class=\"cellLarge\"><small>% lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupPercentageWeightLost|default:0|number_format:\"2\"}</small></span><br />{/if}\r\n			<span class=\"cellLarge\"><small>fat intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupFat|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>calorie intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupCalories|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>minutes exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupExercise|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>distance exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupDistanceExercised|default:0}</small></span><br />\r\n			<img src=\"./img/blank.gif\" width=\"165\" height=\"1\" alt=\"\" />\r\n		*}\r\n		</td>\r\n		<td width=\"100%\" valign=\"top\">\r\n			<div id=\"contentBox\" class=\"centerBox\" style=\"margin-left:10px;\"><div class=\"topRightTreasure\">\r\n<div id=\"jackpot\">{if $competition.potAmount gt 0}${$competition.potAmount|number_format:2}{/if}</div>\r\n<h1 class=\"underline\">{$competition.title|default:\"Competition Title\"}</h1>\r\n\r\n{* ******************************** COMPETITION END *********************************** *}\r\n{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}\r\n	{if $competition.results.winners|@count eq 1}\r\n		{* There was one winner, either by scoringMethod or tieBreakerMethod *}\r\n\r\n		{math assign=\"daysOfCompetition\" equation=\"(x - y) / z\" x=$competition.endDate|default:\"0\" y=$competition.startDate|default:\"0\" z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat|default:\"0\" y=$competition.results.secondPlaceStat|default:\"0\"}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerName\"}    {*key=\"winnerName\"*}\r\n			{assign var=\"winnerData\" value=$competitions.users.$winnerName}\r\n			\r\n			{if $competition.style eq \"Group-vs-Group\"}\r\n				{assign var=\"description\" value=\"Winning Team\"}\r\n				{assign var=\"avg\" value=\"average\"}\r\n			{else}\r\n				{assign var=\"description\" value=\"Winner\"}\r\n			{/if}\r\n\r\n			<h2><br /><b>{$winnerName}</b> is the {$description}{if $competition.potAmount}, taking home <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{strip}\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of \r\n				fierce competition, <b>{$winnerName}</b> is the \r\n				{$description}!	Based on \r\n				<b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2} \r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n			{else}                                {* A Tie! *}\r\n				{assign var=\"weightLost\" value=\"Weight Lost\"}\r\n				{assign var=\"percentLost\" value=\"Percentage Weight Lost\"}\r\n\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> \r\n				days of fierce competition, there was a tie in the judging \r\n				method, <b>{$competition.scoringMethod}</b>. To break this \r\n				tie, the selected tie breaking method, \r\n				<b>{$competition.tieBreakerMethod}</b>, was used to determine \r\n				<b>{$winnerName}</b> as the {$description}. <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2}\r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n				<!--\r\n				<b>{$winnerData.$weightLost|number_format:0} pounds</b>, which \r\n				was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n				-->\r\n			{/if}\r\n			{/strip}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:3}</b> margin over <b>{$competition.results.secondPlaceUser}</b>.\r\n			\r\n			<h2><br />Congratulations to you all!</h2>\r\n			<br />\r\n			<div class=\"underline\"></div>\r\n		{/foreach}\r\n\r\n	{elseif $competition.results.winners|@count gt 1}\r\n		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}\r\n	\r\n		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>\r\n		<ul>\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			<li>{$winnerName}</li>\r\n		{/foreach}\r\n		</ul>\r\n		\r\n	{else}\r\n		{* For some reason, there were no winners *}\r\n\r\n		<h2><br />\r\n		Winner information is being calculated. <br />\r\n		Please check back soon.\r\n		<br /><br /></h2>\r\n	{/if}\r\n	This competition has ended and is no longer active.<br />\r\n{/if}\r\n{* ************************************************************************************ *}\r\n\r\n<div id=\"prizeDesc\">{$competition.potDescription}<br />\r\n{if $competition.potAmount}<small style=\"color:#FFF;\">(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>\r\n\r\n{if $competition.startDate lt $smarty.now}\r\n	Time remaining: <b>{$competition.timeLeft}</b><br />\r\n{else}\r\n	This competition has not yet started!<br />\r\n{/if}\r\n\r\nStart{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:\"n/j/Y\"}</b> &nbsp; \r\nEnd{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:\"n/j/Y\"}</b><br />\r\n{if $competition.calculationMode neq \"Real-Time\"}Competition stats/scoring updated as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}{if $isManager} (<a href=\"?pg=competition&cid={$smarty.request.cid}&nocache=1\">Update Now!</a>){/if}<br />{/if}\r\n<div style=\"font-size:5px;clear:left;\">&nbsp;</div>\r\n{assign var=\"scoringMethod\" value=$competition.scoringMethod}\r\n{assign var=\"tieBreakerMethod\" value=$competition.tieBreakerMethod}\r\n{assign var=\"weeklyWinnersMethod1\" value=$competition.weeklyWinnersMethod1}\r\n{assign var=\"weeklyWinnersMethod2\" value=$competition.weeklyWinnersMethod2}\r\n\r\n{* ******************** WEEKLY WINNERS ********************* *}\r\n{if $competition.weeklyWinners}\r\n	{if $weeklyWinnersMethod1}             {* DON\'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n			<a href=\"javascript:toggle(\'weeklyWinners\', \'\', \'showHide\');\"><img id=\"weeklyWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n			Last Week\'s Winners<i>!</i> <small style=\"color:#000; font-size:11px;\">(<i><b>{$competition.weeklyWinners.startDate|date_format2:\"D n/j\"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:\"D n/j\"}</b></i>)</small></h2> \r\n		<div id=\"weeklyWinners\">\r\n		<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod1}</div>\r\n		<img src=\"{$skinFolder}images/winner_1.gif\" style=\"float:left;\" />\r\n		{strip}\r\n		{foreach name=\"method1\" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}\r\n			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method1.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method1.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> led the way last week by \r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b> {elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}\r\n			{else}\r\n				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod2} \r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod2}</div>\r\n		<img src=\"{$skinFolder}images/winner_2.gif\" style=\"float:left;\" />\r\n		{* display var=$competition.weeklyWinners.users *}\r\n		{strip}\r\n		{foreach name=\"method2\" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}\r\n			\r\n			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method2.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method2.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> won by \r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{/if}\r\n			{else}\r\n				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod1}\r\n	</tr></table></div>{/if}\r\n{/if}\r\n{* ********************************************************* *}\r\n\r\n{if $acm->isDomainAdmin() and $smarty.request.debug}\r\n	{display var=$competition}\r\n{/if} \r\n\r\n{* ******************************** COMPARISON GRAPHS ***************************************** *}\r\n{if $competition.graphParameters|@count}\r\n<script type=\"text/javascript\">{literal}\r\n	function rewriteGraphLinks() {\r\n		var gLinksDiv = document.getElementById(\'graphLinksDiv\');\r\n		gLinksDiv.innerHTML = \'\';\r\n		{/literal}{foreach name=\"graphTypes\" from=$competition.graphParameters item=\"cgp\"}\r\n		gLinksDiv.innerHTML += \'<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type={$cgp.name|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&basedOn={$cgp.basedOn|replace:\" \":\"+\"}&fillPrevious={if $cgp.assumeConstantValues eq \"yes\"}1{else}0{/if}&precision={$cgp.decimalPlaces}&format=wide&userIds=\'+GUIDs+\'\" target=\"graphwindow\"><small>{$cgp.name|niceText|replace:\" \":\"&nbsp;\"}&nbsp;-&nbsp;{$cgp.basedOn|niceText|replace:\" \":\"&nbsp;\"}</small></a>{if !$smarty.foreach.graphTypes.last} | {/if}\';\r\n		{/foreach}\r\n	{literal}\r\n	}\r\n{/literal}</script>\r\n<h2 class=\"withBG\"><a name=\"graph\"></a>\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'graphs\', \'\', \'showHide\');\"><img id=\"graphs_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Comparison Graphs &nbsp; <small><i>No graph? <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">click here</a> to download the free Flash Player plug-in.</i></small></h2>\r\n<div id=\"graphs\" style=\"display:block;\">\r\n	<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&format=wide\"}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe \"iframe_graphwindow\" name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"230\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<div id=\"graphLinksDiv\">\r\n		<small>\r\n		{foreach name=\"graphTypes\" from=$competition.availableGraphs key=\"graphType\" item=\"graphParams\"}\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&{$graphParams}\');\" target=\"graphwindow\">{$graphType}</a>{if $smarty.foreach.graphTypes.iteration neq $competition.availableGraphs|@count} | {/if}\r\n		{/foreach}\r\n		</small></div></td>\r\n	</tr>\r\n	</table>\r\n	<script type=\"text/javascript\">\r\n		rewriteGraphLinks();\r\n	</script>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'teams\', \'\', \'showHide\');\"><img id=\"teams_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>\r\n<div id=\"teams\" style=\"display:block;\">\r\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td>\r\n	<div align=\"right\" style=\"border-bottom:1px solid black; margin:2px; padding:2px;\">All stats based on: {$smarty.capture.scoringMethod}</div>\r\n	{if $isManager}\r\n		<form name=\"changeTeam\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n	{/if}\r\n		{assign var=\"minEx\" value=\"Minutes Exercise\"}\r\n		{assign var=\"distEx\" value=\"Distance Exercised\"}\r\n		{assign var=\"pctLst\" value=\"Percentage Weight Lost\"}\r\n		{assign var=\"wtLst\" value=\"Percentage Weight Lost\"}\r\n		{foreach from=$competition.team_data name=\"teamsLoop\" item=\"teamScore\" key=\"teamName\"}\r\n			<div id=\"playersList{$smarty.foreach.teamsLoop.iteration}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			{if $teamName eq \"Waiting to Join\"}<h2>Not assigned to a team</h2>{else}<h4><span style=\"font-weight:normal;\">#{$smarty.foreach.teamsLoop.iteration}) </span>{$teamName|default:\"&nbsp;\"}{/if}</h4>\r\n			<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:250px; background-color:#FFC;\">\r\n			<tr>\r\n				<td class=\"thinCell\" width=\"55%\">Name</td>\r\n				<td class=\"thinCell\" width=\"25%\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></td>\r\n				<td class=\"thinCell\" width=\"20%\">Update</span>\r\n			</tr>\r\n			{foreach from=$competition.teams.$teamName item=\"userId\"}\r\n			<tr>\r\n				<td class=\"thinCell\" style=\"text-align:left;\"><small>{if $isManager}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small></td>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span> *}\r\n				<td class=\"thinCell\"><small>{$competition.data.$userId.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n				<td class=\"thinCell\"><small>{if $competition.data.$userId.doe}{$competition.data.$userId.doe|date_format2:\"n/j/y\"}{else}Never{/if}</small></td>\r\n			</tr>\r\n			{foreachelse}\r\n			{* No players assigned to this team. *}\r\n			<tr>\r\n				<td class=\"thinCell\">No players yet.</td>\r\n			</tr>\r\n			{/foreach}\r\n\r\n			</table>\r\n			</div>\r\n		{/foreach}\r\n	{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<br />\r\n		<select name=\"changeTeam[team]\">\r\n			<option value=\"\">Move selected players to...</option>\r\n			{foreach from=$competition.teams item=\"newTeams\" key=\"newTeamName\"}\r\n				{*if $newTeamName ne $teamName and $newTeamName ne \"Waiting to Join\"*}\r\n				{if $newTeamName ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeamName}\">{$newTeamName}</option>\r\n				{/if}\r\n			{/foreach}\r\n		</select><br />\r\n		<input type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\r\n	{/if}\r\n</td></tr></table>\r\n</div>\r\n{/if}\r\n</div>\r\n	{* ******************************** DISCUSSION BOARD ***************************************** *}\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'discuss\', \'\', \'showHide\');\"><img id=\"discuss_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Discussion Board</h2>\r\n<div id=\"discuss\" style=\"display:block;\">\r\n	<table cellpadding=\"0\" width=\"100%\" border=\"0\"><tr><td><iframe src=\"?pg=competition/forum\" id=\"discussionBoard\" frameborder=\"0\" scrolling=\"yes\" style=\"width:100%;\"></iframe></td></tr></table>\r\n</div>\r\n\r\n</div></td>\r\n</tr></table>\r\n\r\n{*\r\n<script type=\"text/javascript\">{literal}\r\n	if ( window.frames != null ) {\r\n	    for ( i = 0; i< window.frames.length; i++ )\r\n	        window.alert (\"Child window \" +i+ \" is named \"+window.frames(i).name);\r\n	}\r\n{/literal}</script>\r\n*}'),