-- Table structure for table `_opt_out`
--

CREATE TABLE `_opt_out` (
  `email` varchar(255) NOT NULL DEFAULT '0',
  PRIMARY KEY (`email`),
  UNIQUE KEY `email` (`email`),
  KEY `email_2` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `_opt_out`
--

INSERT INTO `_opt_out` VALUES ('cathyb@provo.edu'),('cdbarlow@gmail.com'),('chaymond@slc.moog.com'),('chrisandbecky@gmail.com'),('dennis.hathaway@gmail.com'),('dennisbush@octanner.com'),('dianesmithinstg@aol.com'),('drblind@gmail.com'),('ebowler@sces.washk12.org'),('ekib3024@gmail.com'),('fish6@netscape.com'),('frankt@provo.edu'),('geega98@yahoo.com'),('huenemeca@hotmail.com'),('jdangerf@nuskin.com'),('jennifer.a.olson@aexp.com'),('jim_mcevoy@yahoo.com'),('jmchism@gmail.com'),('julie.morgan@wasatchlabs.net'),('kd7lrj@arrl.net'),('kevintheconqueror@hotmail.com'),('kzolling@nuskin.com'),('lingwallclan@gmail.com'),('lizzyanne84@gmail.com'),('lslack@his.washk12.org'),('mberrett@nuskin.com'),('mhardy@1800contacts.com'),('mhardy@contacts.com'),('molly.wilkinson@xango.com'),('nancy.vigraham@riomail.maricopa.edu'),('nobody@onai.net'),('patricia.campbell@gwmail.maricopa.edu'),('paul.cornell@pvmail.maricopa.edu'),('proggersteve@gmail.com'),('skyoung21@hotmail.com'),('smills@myfamilyinc.com'),('spencersoffe@gmail.com'),('spencersoffe@yahoo.com'),('test@onai.net');

--
-- Table structure for table `_page_history`
--

CREATE TABLE `_page_history` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pageId` int(10) unsigned DEFAULT '0',
  `version` double(4,2) DEFAULT '0.10',
  `contentType` varchar(20) DEFAULT 'text',
  `isActive` char(1) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '0',
  `comment` varchar(255) DEFAULT 'none',
  `dateModified` bigint(12) unsigned DEFAULT '0',
  `userId` int(10) unsigned DEFAULT '0',
  `ipAddress` varchar(30) DEFAULT '0.0.0.0',
  `content` text,
  PRIMARY KEY (`id`),
  KEY `keyPageId` (`pageId`),
  KEY `keyUserId` (`userId`)
) ENGINE=MyISAM AUTO_INCREMENT=5354 DEFAULT CHARSET=latin1 COMMENT='Page Content History, design 1.0';

--
-- Dumping data for table `_page_history`
--

INSERT INTO `_page_history` VALUES (720,110,0.12,'smarty','0','added content and HTML',1083469421,16,'64.85.253.211','<h1>Terms of Use</h1><p />\r\n\r\nTERMS OF SERVICE AGREEMENT \r\nThis agreement (hereinafter, the \"Agreement\") between WeightLossWars (hereinafter, \"WLW\", \"us\" or \"we\") and you sets forth the terms and conditions which govern your use of any of the WLW or WLW sponsored websites (hereinafter, the \"Sites\") and/or the services (hereinafter, the \"Services\") thereon which are provided by WLW. \r\nPLEASE READ THIS AGREEMENT CAREFULLY BEFORE ACCESSING OR USING ANY OF THE SITES AND/OR SERVICES. BY ACCESSING OR USING THE SITES AND/OR SERVICES, YOU AGREE TO BE BOUND BY THE TERMS AND CONDITIONS SET FORTH BELOW. IF YOU DO NOT WISH TO BE BOUND BY THESE TERMS AND CONDITIONS, YOU MAY NOT ACCESS OR USE THE SITES OR SERVICES AND SHOULD IMMEDIATELY CEASE SUCH USE. WLW MAY MODIFY THIS AGREEMENT AT ANY TIME, AND SUCH MODIFICATIONS SHALL BE EFFECTIVE IMMEDIATELY UPON NOTICE, WHICH MAY BE ACCOMPLISHED BY POSTING THE MODIFIED AGREEMENT ON THE SITE OR VIA EMAIL. YOUR USE OF ANY OF THE SITES AND/OR SERVICES FOLLOWING SUCH NOTICE SHALL BE DEEMED YOUR ACCEPTANCE OF SUCH CHANGES. YOU AGREE TO REVIEW THE AGREEMENT PERIODICALLY TO BE AWARE OF SUCH MODIFICATIONS AND YOUR CONTINUED ACCESS OR USE OF THE SITE AND/OR THE SERVICES SHALL BE DEEMED YOUR CONCLUSIVE ACCEPTANCE OF THE MODIFIED AGREEMENT. IF WE REQUEST, YOU IRREVOCABLY AGREE TO SIGN A NON-ELECTRONIC VERSION OF THIS AGREEMENT.\r\n1. Limited License; Use of Services.\r\nWLW grants to you a limited personal, non-exclusive and non-transferable right and license to access the Sites and use the Services thereon. Unless otherwise specified in writing, the Services are for your personal and non-commercial use. \r\nWLW\'s Services shall contain, without limitation, email services, bulletin and message boards, chat areas, news groups, forums, communities, calendars, and various other message communication applications.\r\n2. Prohibited Activities.\r\nIn connection with your use of the Sites and/or the Services, you acknowledge and agree that you will not:\r\na. copy, reverse engineer, reverse assemble, otherwise attempt to discover the source code, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer or sell any information, software, products or services obtained through the Sites or the Services;\r\nb. access the Sites or Services by any means other than through the standard industry-accepted or WLW-provided interfaces;\r\nc. transmit any message, information, data, text, software or image, or other content that is unlawful, harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, or otherwise objectionable which may invade another\'s right of privacy or publicity; \r\nd. impersonate any person or entity, including without limitation, an WLW official, forum leader, chat room monitor, guide or host, or falsely state or otherwise misrepresent your affiliation with such a person or entity; \r\ne. post or transmit any material that contains a virus or corrupted data;\r\nf. delete any author attributions, legal notices or proprietary designations or labels that you upload to any communication feature; \r\ng. use of any Site or Service\'s communications features in a manner that adversely affects the availability of its resources to other users (e.g., excessive shouting, use of all caps, or flooding continuous postings of repetitive text); \r\nh. post or transmit any unsolicited advertising, promotional materials, \"junk mail\", \"spam,\" \"chain letters,\" \"pyramid schemes\" or any other form of solicitation or any non-resume information such as opinions or notices, commercial or otherwise;\r\ni. violate any applicable local, state, national or international law; \r\nj. upload or transmit any material that infringes any patent, trademark, trade secret, copyright or other proprietary rights of any party; \r\nk. delete or revise any material posted by any other person or entity;\r\nl. manipulate or otherwise display the Sites and/or the Services by using framing or similar navigational technology; \r\nm. register, subscribe, attempt to register, attempt to subscribe, unsubscribe, or attempt to unsubscribe, any party for any WLW product or Service if you are not expressly authorized by such party to do so; or\r\nn. use the Sites and/or the Services for any purpose that is unlawful or prohibited by these terms and conditions. You may not use the Site or the Services in any manner that could damage, disable, overburden or impair WLW\'s servers or networks, or interfere with any other user\'s use and enjoyment of the Sites and/or the Services. Furthermore, you may not attempt to gain unauthorized access to any of the Sites, Services, accounts, computer systems or networks connected to WLW through hacking, password mining or any other means. You may not obtain or attempt to obtain any materials or information through any means not intentionally made available through the Sites or the Services.\r\n3. Billing and Renewal Transactions and Policies.\r\nCertain products or Services may be offered for sale on the Sites. In the event you wish to purchase or to subscribe for any of these products or Services, you will be asked by WLW or an authorized third party to supply certain information, including without limitation, your full name, address, telephone number and credit card information. You agree to provide WLW or such third party with the foregoing information as well as any other mandatory information that is accurate, complete and current, and to comply with the terms and conditions of any agreement that you may enter into governing your purchase of the product or Service. You shall be responsible for all charges incurred through your account as well as for paying any applicable taxes.\r\nSome Services offered by WLW are subscription-based services. If you open a subscription-based account with any of WLW\'s Sites, you hereby agree to pay all charges to your account, including any applicable taxes, in accordance with billing terms in effect at the time the fee or charge becomes payable. WLW reserves the right to change the amount of, or basis for determining, any fees or charges for Services we provide, and to institute new fees, charges or terms effective upon notice to subscribers. We reserve the right to terminate any account at any time for any reason. \r\nPlease note that we only accept credit card payments and do not accept debit card payments at this time. You agree to notify WLW immediately in writing or via email (at billing@waterfrontmedia.com) if you discover that the card number you provided to WLW when you signed up for membership is actually a debit card number.\r\nAutomatic Renewal Terms\r\nYour subscription will be automatically renewed and your credit card will be automatically charged on a quarterly, monthly or weekly basis, depending upon the billing terms for your account, for as long as you remain a member. You agree that WLW will not be obligated to send you any renewal or advance billing notices or confirmations that your credit card has been charged.\r\nYour right to use the Service or a specific product is conditional upon our receipt of payment. If payment cannot be charged to your credit card or if a charge is refunded for any reason, including chargeback, we reserve the right to immediately and without notice, either suspend or terminate your access and account, thereby terminating this Agreement and all WLW obligations hereunder. You are required to pay any amounts still owed to us at the time your account is suspended or terminated.\r\nIn the event you elect to terminate your subscription and WLW is notified accordingly by calling 888-625-8707, Monday through Friday, 9 a.m. to 8 p.m. eastern time, you shall be entitled to receive, on request, any refunds available to you. Terminations are not retroactive. If you terminate your membership after your membership period has begun, you will only be entitled to a refund for the unexpired portion of that membership period, less any applicable minimum charges. You may still be obligated to pay for other charges incurred. If you have an outstanding balance due on any WLW account, you hereby agree that WLW may charge these unpaid fees to your credit card.\r\n4. Message Boards and Chat Rooms.\r\nWLW hosts message boards, chats and other public forums on its Sites. Any user failing to comply with the terms and conditions of this Agreement may be expelled from and refused continued access to, the message boards, chats or other public forums in the future. WLW or its designated agents may remove or alter any user-created content at any time for any reason. Message boards, chats and other public forums are intended to serve as discussion centers for users and subscribers. Information and content posted within these public forums may be provided by WLW staff, WLW\'s outside contributors, or by users not connected with WLW, some of whom may employ anonymous user names. WLW expressly disclaims all responsibility and endorsement and makes no representation as to the validity of any opinion, advice, information or statement made or displayed in these forums by third parties, nor are we responsible for any errors or omissions in such postings, or for hyperlinks embedded in any messages. Under no circumstances will we, our affiliates, suppliers or agents be liable for any loss or damage caused by your reliance on information obtained through these forums. The opinions expressed in these forums are solely the opinions of the participants, and do not reflect the opinions of WLW or any of its subsidiaries or affiliates.\r\n5. Monitoring.\r\nWLW has no obligation whatsoever to monitor any of the content or postings on the message boards, chat rooms or other public forums on the Sites. However, you acknowledge and agree that we have the absolute right to monitor the same at our sole discretion. In addition, we reserve the right to alter, edit, refuse to post or remove any postings or content, in whole or in part, for any reason and to disclose such materials and the circumstances surrounding their transmission to any third party in order to satisfy any applicable law, regulation, legal process or governmental request and to protect ourselves, our clients, sponsors, users and visitors.\r\nMaterials posted and/or uploaded to the various public forums may be subject to size and usage limitations. You are responsible for adhering to such limitations. \r\n6. Third Party Content.\r\nIn general, the content contained on any of the Sites or Services is supplied by third parties and users. Accordingly, WLW is a distributor (and not a publisher) of such content and has no more editorial control over such content than does a public library, bookstore, or newsstand. Any opinions, advice, statements, services, offers, or other information or content expressed or made available by third parties, including information providers, are those of the respective authors or distributors, and not WLW. Neither WLW nor any third-party provider of information guarantees the accuracy, completeness, or usefulness of any content. Furthermore, WLW neither endorses nor is responsible for the accuracy and reliability of any opinion, advice, or statement made on any of the Sites or Services by anyone other than an authorized WLW representative while acting in his/her official capacity.\r\n7. Contests and Games.\r\nWLW often provides contests and games on its Sites. The rules, regulations and procedures governing any of the foregoing shall be accessible through a hypertext link prominently displayed on the web page where the contest or game may be located. By entering or participating in any of them, you agree to be subject to those rules, regulations and procedures. Please remember to read the rules carefully before participating.\r\n8. Accounts, Passwords and Security. \r\nIf any of the Sites or Services require you to open an account, you must complete the registration process by providing WLW with current, complete and accurate information, as prompted by the applicable registration form. You acknowledge that by providing any information to WLW which is untrue, inaccurate, not current or incomplete, WLW reserves the right to terminate this Agreement and your continued access and use of the Sites and/or the Services.\r\nAs part of the registration process, you will be asked to select a username and password. You are entirely responsible for maintaining the security and confidentiality of your account and password. FURTHERMORE, YOU ARE ENTIRELY RESPONSIBLE FOR ANY AND ALL ACTIVITIES AND CONDUCT, WHETHER BY YOU OR ANYONE ELSE, THAT ARE CONDUCTED THROUGH YOUR ACCOUNT. You agree to notify WLW immediately of any unauthorized use of your account or any other breach of security. WLW will not be liable for any loss that you may incur as a result of someone else using your password or account, either with or without your knowledge. However, you may be held liable for any losses incurred by WLW or another party due to someone else using your account or password.\r\n9. Disclaimer Regarding Links.\r\nThe links on any of the Sites and/or Services will let you leave the particular Site or Service you are accessing in order to access a linked site (the \"Linked Sites\"). WLW provides these links as a convenience, but we neither control nor endorse these Linked Sites, nor has WLW reviewed or approved the content which appears on the Linked Sites. WLW is not responsible for the legality, accuracy or inappropriate nature of any content, advertising, products or other materials on or available from any Linked Sites. You acknowledge and agree that WLW shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of any of the links, content, goods or services available on or through the Linked Sites.\r\n10. Dealings with Third Parties.\r\nYour participation, correspondence or business dealings with any third party found on or through our Sites and Services, regarding payment and delivery of specific goods and services, and any other terms, conditions, representations or warranties associated with such dealings, are solely between you and such third party. You agree that WLW shall not be responsible or liable for any loss, damage, or other matters of any sort incurred as the result of such dealings.\r\n11. Proprietary Rights.\r\nYou acknowledge and agree that the Sites and Services contain proprietary and confidential information that is protected by applicable intellectual property and other laws, and are the sole property of WLW or its licensors. You further acknowledge and agree that any content contained in advertisements or information presented to you through advertisers concerning WLW or otherwise is protected by copyrights, trademarks, service marks, patents or other proprietary rights and laws. \r\nBy sending or transmitting to us creative suggestions, ideas, notes, concepts, information, or other materials (collectively, \" Submission Materials\") or by posting such Submission Materials on the Sites, you hereby grant to us and our designees a worldwide, non-exclusive, sublicensable (through multiple tiers), assignable, royalty-free, perpetual, irrevocable right to use, reproduce, distribute (through multiple tiers), create derivative works of, publicly perform, publicly display, digitally perform, make, have made, sell, offer for sale and import such Submission Materials in any media now known or hereafter devised, for any purpose whatsoever, commercial or otherwise, without compensation to you, the provider of the Submission Materials. The foregoing license to WLW shall be fully paid-up and royalty free. In addition, under no circumstances shall WLW have any obligation whatsoever to pay a fee to any subscriber or user in connection with the Submission Materials upon the occurrence of a transfer of all or any portion of WLW\'s business through a merger, sale or transfer of all or substantially all of the assets of WLW, nor shall the sale of advertising on any of the Sites give rise to any obligation to pay a fee to Subscribers. \r\nNone of the Submission Materials disclosed or posted via message boards, chats or other public forums shall be subject to any obligation, whether of confidentiality, attribution, or otherwise, on WLW\'s part and we shall not be liable for any use or disclosure of any such Submission Materials.\r\n12. Copyright Policy.\r\nThe Digital Millennium Copyright Act of 1998 (the \"DMCA\") provides recourse for copyright owners who believe that material appearing on the Internet infringes their rights under the U.S. copyright law. If you believe in good faith that materials hosted by WLW infringe your copyright, you, or your agent may send to WLW a notice requesting that the material be removed or access to it be blocked. Any notification by a copyright owner or a person authorized to act on its behalf that fails to comply with requirements of the DMCA shall not be considered sufficient notice and shall not be deemed to confer upon WLW actual knowledge of facts or circumstances from which infringing material or acts are evident. If you believe in good faith that a notice of copyright infringement has been wrongly filed against you, the DMCA permits you to send to WLW a counter-notice. All notices and counter notices must meet the then current statutory requirements imposed by the DMCA; see http://www.loc.gov/copyright for details.\r\nWLW\'s Copyright Agent for notice of claims of copyright infringement or counter notices can be reached as follows:\r\nDesignated Agent: Brian Cooper\r\nAddress of Agent: 45 Main Street, Suite 406, Brooklyn, NY 11201\r\nTelephone: 718.797.0722\r\nFax: 718.797.0582 \r\nE-mail for notice: DMCA@waterfrontmedia.com.\r\nWe suggest that you consult your legal advisor before filing a notice or counter-notice. Also, be aware that there can be penalties for false claims under the DMCA. \r\n13. Privacy.\r\nWLW\'s policy with respect to the collection and use of your personally identifiable information is set forth at http://www.waterfrontmedia.com/about/privacy. By accepting these Terms of Service, you acknowledge this policy.\r\n14. Disclaimer of Warranties.\r\nTHE SITES AND THE SERVICES, AND ANY CONTENT, TOOLS, PRODUCTS OR SERVICES DISPLAYED, ACCESSED OR OBTAINED ON OR THROUGH THE SITES AND SERVICES ARE PROVIDED \"AS IS\", \"AS AVAILABLE\", AND WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, WLW AND ITS AFFILIATES, SUPPLIERS, AND AGENTS DO NOT WARRANT AND EXPRESSLY DISCLAIM THAT: (i) YOUR USE OF THE SITES AND/OR SERVICES AND ACCESS TO AND USE OF ALL OF THE TOOLS AND FEATURES THEREON WILL BE UNINTERRUPTED, ERROR-FREE, OR SECURE, (ii) THAT ANY INFORMATION OBTAINED THEREIN IS ACCURATE, RELIABLE OR COMPLETE, (iii) THAT DEFECTS WILL BE CORRECTED, or (iv) THAT ANY SOFTWARE, SERVICES, SITES OR SERVER(S) ON WHICH THE SERVICES AND SITES ARE HOSTED ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. YOUR USE OF THE SITES AND THE SERVICES AND ANY INFORMATION OR MATERIALS PROVIDED ON OR THROUGH THE SITES AND SERVICES ARE ENTIRELY AT YOUR OWN RISK.\r\n15. Limitation of Liability. \r\nNEITHER WLW NOR ITS DIRECTORS, OFFICERS, EMPLOYEES, CONTRACTORS, AGENTS OR SPONSORS ARE RESPONSIBLE OR LIABLE TO YOU OR ANYONE ELSE FOR ANY LOSS OR INJURY OR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL, EXEMPLARY, PUNITIVE OR OTHER DAMAGES UNDER ANY CONTRACT, NEGLIGENCE, STRICT LIABILITY OR OTHER THEORY ARISING OUT OF OR RELATING IN ANY WAY TO (i) THE USE OF OR INABILITY TO USE THE SITES OR THE SERVICES; (ii) ANY CONTENT CONTAINED ON THE SITES AND/OR THE SERVICES; (iii) STATEMENTS OR CONDUCT POSTED OR MADE PUBLICLY AVAILABLE ON THE SITES AND/OR THE SERVICES; (iv) ANY PRODUCT OR SERVICE PURCHASED OR OBTAINED THROUGH THE SITES; (v) ANY ACTION TAKEN IN RESPONSE TO OR AS A RESULT OF ANY INFORMATION AVAILABLE ON THE SITES OR THE SERVICES; (vi) ANY DAMAGE CAUSED BY LOSS OF ACCESS TO, DELETION OF, FAILURE TO STORE, FAILURE TO BACK UP, OR ALTERATION OF ANY CONTENT ON THE SITES OR THE SERVICES, or (vii) ANY OTHER MATTER RELATING TO THE SITES AND/OR THE SERVICES. IN NO EVENT SHALL WLW\'S TOTAL LIABILITY TO YOU FOR ANY AND ALL DAMAGES, LOSSES, AND CAUSES OF ACTION (WHETHER IN CONTRACT, TORT [INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE], STATUTORY, OR OTHERWISE) EXCEED THE AMOUNT PAID BY YOU, IF ANY, FOR USING ANY OF THE SERVICES OR THE SITES.\r\n16. Professional Advice Disclaimer.\r\nWLW\'S SITES DO NOT PROVIDE MEDICAL OR COUNSELLING ADVICE. NOTHING STATED OR POSTED ON ANY SITES OR AVAILABLE THROUGH ANY SERVICES ARE INTENDED TO BE, AND MUST NOT BE TAKEN TO BE, THE PRACTICE OF MEDICAL OR COUNSELING CARE. FOR PURPOSES OF THIS AGREEMENT, THE PRACTICE OF MEDICINE AND COUNSELING INCLUDES, WITHOUT LIMITAITON, PSYCHIATRY, PSYCHOLOGY, PSYCHOTHERAPY, OR PROVIDING HEALTH CARE TREATMENT, INSTRUCTIONS, DIAGNOSIS, PROGNOSIS OR ADVICE. OUR SITES ARE CONTINUALLY UNDER DEVELOPMENT AND WLW MAKES NO WARRANTY OF ANY KIND, IMPLIED OR EXPRESS, AS TO ITS ACCURACY, COMPLETENESS OR APPROPRIATENESS FOR ANY PURPOSE. PLEASE SEEK THE ADVICE OF PROFESSIONALS, AS APPROPRIATE, REGARDING THE EVALUATION OF ANY SPECIFIC INFORMATION, OPINION, ADVICE OR CONTENT.\r\n17. Indemnification.\r\nYou agree to indemnify, defend, and hold WLW and its subsidiaries, affiliates, officers, directors, agents, co-branders or other partners, employees, and representatives harmless from and against any and all claims, damages, losses, costs or expenses (including reasonable attorneys\' fees and disbursements) which arise directly or indirectly out of or from (i) your breach of this Agreement, (ii) any allegation that any materials that you submit to WLW or post on any forums (e.g., message boards, chat rooms) infringe or otherwise violate the copyright, trade secret, trademark or other intellectual property rights of a third party, and (iii) your access or use of the Sites and/or the Services. This Section 17 shall survive in the event this Agreement is terminated for any reason.\r\n18. Jurisdictional Issues.\r\nWLW makes no representation or warranty that the content and materials on the Sites and/or the Services are appropriate or available for use in locations outside the United States. Those who choose to access the Sites or use the Services from other locations do so on their own initiative and at their own risk, and are responsible for compliance with local laws, if and to the extent applicable. WLW reserves the right, at any time in our sole discretion, to limit the availability and accessibility of the Sites and/or the Services to any person, geographic area, or jurisdiction we so desire, and to limit the quantities of any such Service or products that we provide.\r\n19. Termination.\r\nThis Agreement shall remain effective until terminated in accordance with its own terms and conditions. You agree that WLW, in its sole discretion, may terminate your password, account (in whole or in part), or use of the Sites or Services, and remove and discard any content within the Sites, at any time and for any reason. You agree that any actions taken under this Section 19 may be effective without prior notice to you. In the event of termination, however, those Sections in this Agreement which provide for continuing obligations on your part shall survive indefinitely.\r\n20. General Information.\r\nThis Agreement constitutes the entire agreement and understanding between you and WLW and governs your use of the Sites and the Services, superseding any prior agreements between you and WLW. This Agreement and the relationship between you and WLW shall be governed by and construed in accordance with the laws of the State of New York, without regard to its conflict of law provisions. You and WLW irrevocably agree to submit to the personal and exclusive jurisdiction of the federal and state courts located within the county of New York, in the State of New York, and waive any jurisdictional, venue, or inconvenient forum objections to such courts. The failure of WLW to exercise or enforce any right or provision of this Agreement shall not constitute a waiver of such right or provision. If any provision of this Agreement is found by a court of competent jurisdiction to be unlawful, void or for any reason unenforceable, then that provision shall be deemed severed herefrom and shall not affect the validity and enforceability of any remaining provisions. The section titles in this Agreement are for convenience purposes only and have no legal or contractual effect. This Agreement is not assignable, transferable or sub-licensable by you except with our prior written consent. However, we may assign this Agreement to any third party whom we choose without your consent. No waiver by WLW of any breach or default hereunder shall be deemed a waiver of any preceding or subsequent breach or default.\r\n\r\n'),(66,7,0.10,'file','1','ACM Group/User management.',1000000003,1,'0.0.0.0',NULL),(7,5,0.10,'file','1','adding editor page',1000000000,1,'122.0.0.0',NULL),(54,6,0.10,'file','1','History Source View created.',1059382900,3,'0.0.0.0',NULL),(70,8,0.10,'file','1','ACM Search Results',0,1,'0.0.0.0',NULL),(143,9,0.19,'php','0','Download - Removed all my silly testing echoes.',1059666248,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\nif (!$_REQUEST[\'historyId\']) {\r\n	die(\'No id specified.\');\r\n}\r\n$Q = \"	SELECT\r\n		h.id, h.pageId, h.version, h.isActive, h.comment, h.dateModified, h.content, h.contentType,\r\n		t.pageName AS name, t.title, t.id AS tocId,\r\n		u.username\r\n	FROM\r\n		_page_history h\r\n		LEFT JOIN _users u ON (h.userId = u.id)\r\n		LEFT JOIN _pages p ON (p.id = h.pageId)\r\n		LEFT JOIN _toc t ON (t.pageId = p.id)\r\n	WHERE\r\n		h.id = \'\".$_REQUEST[\'historyId\'].\"\'\r\n	ORDER BY\r\n		h.version DESC\";\r\n\r\n$thisHistory = $db->query($Q, DB_ROW);\r\n\r\nif (!is_array($thisHistory)) {\r\n	die (\"Page history content not found.\");\r\n}\r\n\r\nif (!($oAcm->checkAccess(\'edit\', \'_toc\', $thisHistory[\'tocId\']) && $oAcm->checkAccess(\'changeVersions\', \'_toc\', $thisHistory[\'tocId\']))) {\r\n	die (\'Access denied.\');\r\n}\r\n\r\n$fileName = $aConstants[\'VANITY\'].\'\\\\\'.$thisHistory[\'name\'].\'_v\'.$thisHistory[\'version\'].\'.\';\r\nswitch($thisHistory[\'contentType\']) {\r\n	case \'php\' : $ext = \'php\'; break;\r\n	case \'file\' :\r\n	case \'smarty\' : $ext = \'tpl\'; break;\r\n	case \'text\' : $ext = \'txt\'; break;\r\n	case \'xml\' : $ext = \'xml\'; break;\r\n	default: $ext = \'txt\';\r\n}\r\n$fileName .= $ext;\r\necho $fileName;\r\nexit();\r\n\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n//header(\"Content-length: \".(string)(filesize($completeFilePath)));\r\n//$fd=fopen($completeFilePath,\'r\');\r\n//fpassthru($fd);\r\necho $thisHistory[\'content\'];\r\n\r\n// Now send through the data...\r\nexit();\r\n?>\r\n'),(1159,126,0.10,'smarty','0','Page created.',1086053081,2,'24.2.64.190',''),(1160,126,0.11,'smarty','0','Page created.',1086053145,2,'24.2.64.190','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1>Sign Up - Terms of Use</h1>\r\n\r\n{include_php file=\"shared_handle:signup.goals\"}\r\n\r\n'),(2634,102,0.60,'smarty','0','Renamed Goals to Profile.',1103235599,3,'67.166.75.78','{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<!-- return:{$smarty.request.signup.return} -->\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 2 - Your Profile</h1>\r\n<p>This step includes recording you initial weight and goals. Each field will be used to calculate other factors including your Body Mass Index. To hide your body weight from others select \'Yes.\' By selecting \'Yes\' others will only see your change in weight (i.e. -5 lbs).<small> * indicates a required field</small></p>\r\n\r\n{include_php file=\"shared_handle:signup.details\"}\r\n\r\n<div>\r\n\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*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\r\n*Gender:\r\nNot Specified &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"not specified\" checked /> <input type=\"radio\" name=\"signup[gender]\" value=\"male\" /> Male &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"female\" /> Female &nbsp;<br />\r\n\r\n*Current Weight:\r\n<input type=\"text\" name=\"signup[initialWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Hide Initial Weight?:\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"Yes\"{if $signup[hideInitialWeight] neq \"No\"} checked{/if} /> Yes &nbsp;<br />\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"No\"{if $signup[hideInitialWeight] eq \"No\"} checked{/if} /> No &nbsp;<br />\r\n\r\n*Goal Weight:\r\n<input type=\"text\" name=\"signup[goalWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Height:\r\n<input type=\"text\" name=\"signup[height][feet]\" class=\"textInput\" maxlength=\"1\" style=\"width:18px;\" /> feet, \r\n<input type=\"text\" name=\"signup[height][inches]\" class=\"textInput\" maxlength=\"2\" style=\"width:20px;\" /> inches<br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Goal</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalGoal]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Motto</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalSaying]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Your Signature</h2>\r\n        Be creative with your signature! This will go at the bottom of the messages you post on the discussion board and can be changed often.\r\n	<textarea name=\"signup[signature]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><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>'),(142,9,0.18,'php','0','Download',1059666202,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\necho \"YAOUOU\";\r\nif (!$_REQUEST[\'historyId\']) {\r\n	die(\'No id specified.\');\r\n}\r\necho \"MARINGE - meh\";\r\necho \"one more test.\";\r\n// Once again.\r\n$Q = \"	SELECT\r\n		h.id, h.pageId, h.version, h.isActive, h.comment, h.dateModified, h.content, h.contentType,\r\n		t.pageName AS name, t.title, t.id AS tocId,\r\n		u.username\r\n	FROM\r\n		_page_history h\r\n		LEFT JOIN _users u ON (h.userId = u.id)\r\n		LEFT JOIN _pages p ON (p.id = h.pageId)\r\n		LEFT JOIN _toc t ON (t.pageId = p.id)\r\n	WHERE\r\n		h.id = \'\".$_REQUEST[\'historyId\'].\"\'\r\n	ORDER BY\r\n		h.version DESC\";\r\n\r\n$thisHistory = $db->query($Q, DB_ROW);\r\n\r\nif (!is_array($thisHistory)) {\r\n	die (\"Page history content not found.\");\r\n}\r\n\r\nif (!($oAcm->checkAccess(\'edit\', \'_toc\', $thisHistory[\'tocId\']) && $oAcm->checkAccess(\'changeVersions\', \'_toc\', $thisHistory[\'tocId\']))) {\r\n	die (\'Access denied.\');\r\n}\r\n\r\n$fileName = $aConstants[\'VANITY\'].\'\\\\\'.$thisHistory[\'name\'].\'_v\'.$thisHistory[\'version\'].\'.\';\r\nswitch($thisHistory[\'contentType\']) {\r\n	case \'php\' : $ext = \'php\'; break;\r\n	case \'file\' :\r\n	case \'smarty\' : $ext = \'tpl\'; break;\r\n	case \'text\' : $ext = \'txt\'; break;\r\n	case \'xml\' : $ext = \'xml\'; break;\r\n	default: $ext = \'txt\';\r\n}\r\n$fileName .= $ext;\r\necho $fileName;\r\nexit();\r\n\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n//header(\"Content-length: \".(string)(filesize($completeFilePath)));\r\n//$fd=fopen($completeFilePath,\'r\');\r\n//fpassthru($fd);\r\necho $thisHistory[\'content\'];\r\n\r\n// Now send through the data...\r\nexit();\r\n?>\r\n'),(145,9,0.21,'php','0','We replace . with - so Windows doesn\'t mess with the filename.',1059666503,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\nif (!$_REQUEST[\'historyId\']) {\r\n	die(\'No id specified.\');\r\n}\r\n$Q = \"	SELECT\r\n		h.id, h.pageId, h.version, h.isActive, h.comment, h.dateModified, h.content, h.contentType,\r\n		t.pageName AS name, t.title, t.id AS tocId,\r\n		u.username\r\n	FROM\r\n		_page_history h\r\n		LEFT JOIN _users u ON (h.userId = u.id)\r\n		LEFT JOIN _pages p ON (p.id = h.pageId)\r\n		LEFT JOIN _toc t ON (t.pageId = p.id)\r\n	WHERE\r\n		h.id = \'\".$_REQUEST[\'historyId\'].\"\'\r\n	ORDER BY\r\n		h.version DESC\";\r\n\r\n$thisHistory = $db->query($Q, DB_ROW);\r\n\r\nif (!is_array($thisHistory)) {\r\n	die (\"Page history content not found.\");\r\n}\r\n\r\nif (!($oAcm->checkAccess(\'edit\', \'_toc\', $thisHistory[\'tocId\']) && $oAcm->checkAccess(\'changeVersions\', \'_toc\', $thisHistory[\'tocId\']))) {\r\n	die (\'Access denied.\');\r\n}\r\n\r\n$fileName = $aConstants[\'VANITY\'].\'-\'.$thisHistory[\'name\'].\'_v\'.str_replace(\'.\', \'-\', $thisHistory[\'version\']).\'.\';\r\nswitch($thisHistory[\'contentType\']) {\r\n	case \'php\' : $ext = \'php\'; break;\r\n	case \'file\' :\r\n	case \'smarty\' : $ext = \'tpl\'; break;\r\n	case \'text\' : $ext = \'txt\'; break;\r\n	case \'xml\' : $ext = \'xml\'; break;\r\n	default: $ext = \'txt\';\r\n}\r\n$fileName .= $ext;\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n//header(\"Content-length: \".(string)(filesize($completeFilePath)));\r\n//$fd=fopen($completeFilePath,\'r\');\r\n//fpassthru($fd);\r\necho $thisHistory[\'content\'];\r\n\r\n// Now send through the data...\r\nexit();\r\n?>\r\n'),(144,9,0.20,'php','0','Saving another version to actually try downloading with.',1059666322,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\nif (!$_REQUEST[\'historyId\']) {\r\n	die(\'No id specified.\');\r\n}\r\n$Q = \"	SELECT\r\n		h.id, h.pageId, h.version, h.isActive, h.comment, h.dateModified, h.content, h.contentType,\r\n		t.pageName AS name, t.title, t.id AS tocId,\r\n		u.username\r\n	FROM\r\n		_page_history h\r\n		LEFT JOIN _users u ON (h.userId = u.id)\r\n		LEFT JOIN _pages p ON (p.id = h.pageId)\r\n		LEFT JOIN _toc t ON (t.pageId = p.id)\r\n	WHERE\r\n		h.id = \'\".$_REQUEST[\'historyId\'].\"\'\r\n	ORDER BY\r\n		h.version DESC\";\r\n\r\n$thisHistory = $db->query($Q, DB_ROW);\r\n\r\nif (!is_array($thisHistory)) {\r\n	die (\"Page history content not found.\");\r\n}\r\n\r\nif (!($oAcm->checkAccess(\'edit\', \'_toc\', $thisHistory[\'tocId\']) && $oAcm->checkAccess(\'changeVersions\', \'_toc\', $thisHistory[\'tocId\']))) {\r\n	die (\'Access denied.\');\r\n}\r\n\r\n$fileName = $aConstants[\'VANITY\'].\'-\'.$thisHistory[\'name\'].\'_v\'.$thisHistory[\'version\'].\'.\';\r\nswitch($thisHistory[\'contentType\']) {\r\n	case \'php\' : $ext = \'php\'; break;\r\n	case \'file\' :\r\n	case \'smarty\' : $ext = \'tpl\'; break;\r\n	case \'text\' : $ext = \'txt\'; break;\r\n	case \'xml\' : $ext = \'xml\'; break;\r\n	default: $ext = \'txt\';\r\n}\r\n$fileName .= $ext;\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n//header(\"Content-length: \".(string)(filesize($completeFilePath)));\r\n//$fd=fopen($completeFilePath,\'r\');\r\n//fpassthru($fd);\r\necho $thisHistory[\'content\'];\r\n\r\n// Now send through the data...\r\nexit();\r\n?>\r\n'),(169,24,0.13,'smarty','0','Page created.',1060037827,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{include_php file=\"spade/handle.fileSystem.php\"}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tocId tab\">\r\n<input type=\"hidden\" name=\"editPageAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"edit/main\">\r\n<input type=\"hidden\" name=\"tocId\" value=\"{$tocId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=edit/main&tab=content&tocId={$tocId}\" class=\"tab{if $tab eq \"content\"}_on{/if}\" onclick=\"return gotoTab(\'content\');\">&nbsp;Page&nbsp;Content&nbsp;</a>| \r\n			<a href=\"?pg=edit/main&tab=toc&tocId={$tocId}\" class=\"tab{if $tab eq \"toc\"}_on{/if}\" onclick=\"return gotoTab(\'toc\');\">&nbsp;Page&nbsp;Settings&nbsp;</a>| \r\n			{if $changeVersion OR $historySettings}<a href=\"?pg=edit/main&tab=history&tocId={$tocId}\" class=\"tab{if $tab eq \"history\"}_on{/if}\" onclick=\"return gotoTab(\'history\');\">&nbsp;Page&nbsp;History&nbsp;</a>| {/if}\r\n			{if $viewAccess}<a href=\"?pg=edit/main&tab=access&tocId={$tocId}\" class=\"tab{if $tab eq \"access\"}_on{/if}\" onclick=\"return gotoTab(\'access\');\">&nbsp;Access&nbsp;Control&nbsp;</a>|{/if}\r\n			{if $searchSettings}<a href=\"?pg=edit/main&tab=search&tocId={$tocId}\" class=\"tab{if $tab eq \"search\"}_on{/if}\" onclick=\"return gotoTab(\'search\');\">&nbsp;Search&nbsp;Engine&nbsp;</a>| {/if}\r\n			<a href=\"?pg=edit/main&tab=jump&tocId={$tocId}\" class=\"tab{if $tab eq \"jump\"}_on{/if}\" onclick=\"return gotoTab(\'jump\');\">&nbsp;Jump&nbsp;To..&nbsp;</a>| \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/edit/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Page Summary</h2>\r\n			\r\n			{if $aEditPage.isChanged}<div style=\"color:#FF0000;\">* Not Saved *</div>{/if}\r\n			<strong>Page Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <!--small>(<a href=\"?pg=edit/main&tab=toc\">edit</a>)</small--><br>\r\n			<strong>Page Title:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <!--small>(<a href=\"?pg=edit/main&tab=toc\">edit</a>)</small--><br>\r\n			<strong>Last Updated:</strong> {$aEditPage.dateModified|date_format2:\"n/j/Y h:i:s A\"}<br>\r\n			<strong>Last Updated By:</strong> {$aEditPage.username|default:\"Unknown\"}<br>\r\n			<strong>Page Version#:</strong> {$aEditPage.version|default:\"Unknown\"}<br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n{if $deleteAccess}<input class=\"btn\" type=\"button\" name=\"deletePage\" value=\"Delete This Page\"\r\n		{if $aEditPage.parentId eq \"0\"}onClick=\"alert(\'You cannot delete a page whose parent is \\\'root\\\'.\\n(Pages whose Parent ID is 0 are \\\'root pages\\\'.)\\n\\nIf you would like to delete this page, it must be\\nmoved beyond the first-teir level.\\n\\nIf this page is your only first-teir page, you must\\nmove another page to the root, move this page\\nbelow the root, then delete it.\');\"{else}onClick=\"if (confirm(\'Are you sure you want to permanently delete this page and\\nall of its backups?{if $aEditPage.childrenCount gt \"0\"}\\n\\nWARNING: This command will also delete all decendents of\\nthis page within the Table of Contents (TOC).\\n\\nDecendents are defined as pages whose Parent ID points\\nto this page. If you are unsure of which pages are\\nchildren of this page, check the TOC or, AS RECOMMENDED,\\nhide this page in the TOC (Page Settings tab).{/if}\')) {literal}{ document.editPageForm.editPageAction.value=\'delete\'; document.editPageForm.submit(); }\"{/literal}{/if}>\r\n{/if}\r\n{if $addAccess}<input class=\"btn\" type=\"button\" name=\"addSubPage\" value=\"Add New Sub Page\" onClick=\"if ({if $aEditPage.isChanged}1{else}isChanged.value != \'\'{/if}) {literal}{ if (confirm(\'You have not saved your changes to the current page.\\nWould you like to save changes and continue?\')) { document.editPageForm.editPageAction.value=\'newsub\'; document.editPageForm.submit(); } } else { document.editPageForm.editPageAction.value=\'newsub\'; document.editPageForm.submit(); }\"{/literal}>{/if}\r\n\r\n<script language=\"JavaScript\">\r\n{if $smarty.request.isPreview}\r\npreviewEditPage();\r\n{/if}\r\n\r\n{literal}\r\nfunction on_change() {\r\n	var df = document.forms[\'editPageForm\'];\r\n	df.isChanged.value = 1;\r\n	df.btnSave.style.border = \'#990000 1px solid\';\r\n	df.btnSave.style.color = \'#CC0000\';\r\n	df.btnSave.disabled = false;\r\n	df.btnDiscard.disabled = false;\r\n}\r\n\r\nvar df = document.forms[\'editPageForm\'];\r\nfor (var x = 0; x < df.elements.length; x++) {\r\n	if (!df.elements[x].onchange) {\r\n		df.elements[x].onchange = on_change;\r\n	}\r\n}\r\n\r\nif (window.opener && typeof(window.opener.preferredEditorHeight) != \'undefined\' && typeof(window.opener.preferredEditorWidth) != \'undefined\') {\r\n	document.body.onresize = function() {var df = document.editPageForm; df.preferredEditorHeight.value = document.body.clientHeight + 13; df.preferredEditorWidth.value = document.body.clientWidth + 13; window.opener.preferredEditorHeight = document.body.clientHeight + 13; window.opener.preferredEditorWidth = document.body.clientWidth + 13; df.editPageAction.value = \'store\';};	\r\n}\r\n\r\n</script>\r\n{/literal}\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(168,24,0.12,'smarty','0','Page created.',1060037631,3,'12.254.145.239','{assign var=\"pgLayout\" value=\"blahr\"}\r\nblah!'),(4614,233,1.46,'smarty','0','Adding totalChange parameter to graph links...',1134617453,2,'216.194.127.150','{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		<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		Thank you for participating. <br />\r\n		Congratulations to the winning team!\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:\" \":\"+\"}+-+{$cgp.basedOn|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&totalChange={if $cgp.basedOn eq \"percent change\"}1{else}0{/if}&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*}'),(141,9,0.17,'php','0','Download',1059665618,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\necho \"YAOUOU\";\r\nif (!$_REQUEST[\'historyId\']) {\r\n	die(\'No id specified.\');\r\n}\r\necho \"MARINGE - meh\";\r\necho \"one more test.\";\r\n$Q = \"	SELECT\r\n		h.id, h.pageId, h.version, h.isActive, h.comment, h.dateModified, h.content, h.contentType,\r\n		t.pageName AS name, t.title, t.id AS tocId,\r\n		u.username\r\n	FROM\r\n		_page_history h\r\n		LEFT JOIN _users u ON (h.userId = u.id)\r\n		LEFT JOIN _pages p ON (p.id = h.pageId)\r\n		LEFT JOIN _toc t ON (t.pageId = p.id)\r\n	WHERE\r\n		h.id = \'\".$_REQUEST[\'historyId\'].\"\'\r\n	ORDER BY\r\n		h.version DESC\";\r\n\r\n$thisHistory = $db->query($Q, DB_ROW);\r\n\r\nif (!is_array($thisHistory)) {\r\n	die (\"Page history content not found.\");\r\n}\r\n\r\nif (!($oAcm->checkAccess(\'edit\', \'_toc\', $thisHistory[\'tocId\']) && $oAcm->checkAccess(\'changeVersions\', \'_toc\', $thisHistory[\'tocId\']))) {\r\n	die (\'Access denied.\');\r\n}\r\n\r\n$fileName = $aConstants[\'VANITY\'].\'\\\\\'.$thisHistory[\'name\'].\'_v\'.$thisHistory[\'version\'].\'.\';\r\nswitch($thisHistory[\'contentType\']) {\r\n	case \'php\' : $ext = \'php\'; break;\r\n	case \'file\' :\r\n	case \'smarty\' : $ext = \'tpl\'; break;\r\n	case \'text\' : $ext = \'txt\'; break;\r\n	case \'xml\' : $ext = \'xml\'; break;\r\n	default: $ext = \'txt\';\r\n}\r\n$fileName .= $ext;\r\necho $fileName;\r\nexit();\r\n\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n//header(\"Content-length: \".(string)(filesize($completeFilePath)));\r\n//$fd=fopen($completeFilePath,\'r\');\r\n//fpassthru($fd);\r\necho $thisHistory[\'content\'];\r\n\r\n// Now send through the data...\r\nexit();\r\n?>\r\n'),(170,24,0.14,'smarty','0','Page created.',1060037913,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tocId tab\">\r\n<input type=\"hidden\" name=\"editPageAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"edit/main\">\r\n<input type=\"hidden\" name=\"tocId\" value=\"{$tocId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=edit/main&tab=content&tocId={$tocId}\" class=\"tab{if $tab eq \"content\"}_on{/if}\" onclick=\"return gotoTab(\'content\');\">&nbsp;Page&nbsp;Content&nbsp;</a>| \r\n			<a href=\"?pg=edit/main&tab=toc&tocId={$tocId}\" class=\"tab{if $tab eq \"toc\"}_on{/if}\" onclick=\"return gotoTab(\'toc\');\">&nbsp;Page&nbsp;Settings&nbsp;</a>| \r\n			{if $changeVersion OR $historySettings}<a href=\"?pg=edit/main&tab=history&tocId={$tocId}\" class=\"tab{if $tab eq \"history\"}_on{/if}\" onclick=\"return gotoTab(\'history\');\">&nbsp;Page&nbsp;History&nbsp;</a>| {/if}\r\n			{if $viewAccess}<a href=\"?pg=edit/main&tab=access&tocId={$tocId}\" class=\"tab{if $tab eq \"access\"}_on{/if}\" onclick=\"return gotoTab(\'access\');\">&nbsp;Access&nbsp;Control&nbsp;</a>|{/if}\r\n			{if $searchSettings}<a href=\"?pg=edit/main&tab=search&tocId={$tocId}\" class=\"tab{if $tab eq \"search\"}_on{/if}\" onclick=\"return gotoTab(\'search\');\">&nbsp;Search&nbsp;Engine&nbsp;</a>| {/if}\r\n			<a href=\"?pg=edit/main&tab=jump&tocId={$tocId}\" class=\"tab{if $tab eq \"jump\"}_on{/if}\" onclick=\"return gotoTab(\'jump\');\">&nbsp;Jump&nbsp;To..&nbsp;</a>| \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/edit/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Page Summary</h2>\r\n			\r\n			{if $aEditPage.isChanged}<div style=\"color:#FF0000;\">* Not Saved *</div>{/if}\r\n			<strong>Page Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <!--small>(<a href=\"?pg=edit/main&tab=toc\">edit</a>)</small--><br>\r\n			<strong>Page Title:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <!--small>(<a href=\"?pg=edit/main&tab=toc\">edit</a>)</small--><br>\r\n			<strong>Last Updated:</strong> {$aEditPage.dateModified|date_format2:\"n/j/Y h:i:s A\"}<br>\r\n			<strong>Last Updated By:</strong> {$aEditPage.username|default:\"Unknown\"}<br>\r\n			<strong>Page Version#:</strong> {$aEditPage.version|default:\"Unknown\"}<br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n{if $deleteAccess}<input class=\"btn\" type=\"button\" name=\"deletePage\" value=\"Delete This Page\"\r\n		{if $aEditPage.parentId eq \"0\"}onClick=\"alert(\'You cannot delete a page whose parent is \\\'root\\\'.\\n(Pages whose Parent ID is 0 are \\\'root pages\\\'.)\\n\\nIf you would like to delete this page, it must be\\nmoved beyond the first-teir level.\\n\\nIf this page is your only first-teir page, you must\\nmove another page to the root, move this page\\nbelow the root, then delete it.\');\"{else}onClick=\"if (confirm(\'Are you sure you want to permanently delete this page and\\nall of its backups?{if $aEditPage.childrenCount gt \"0\"}\\n\\nWARNING: This command will also delete all decendents of\\nthis page within the Table of Contents (TOC).\\n\\nDecendents are defined as pages whose Parent ID points\\nto this page. If you are unsure of which pages are\\nchildren of this page, check the TOC or, AS RECOMMENDED,\\nhide this page in the TOC (Page Settings tab).{/if}\')) {literal}{ document.editPageForm.editPageAction.value=\'delete\'; document.editPageForm.submit(); }\"{/literal}{/if}>\r\n{/if}\r\n{if $addAccess}<input class=\"btn\" type=\"button\" name=\"addSubPage\" value=\"Add New Sub Page\" onClick=\"if ({if $aEditPage.isChanged}1{else}isChanged.value != \'\'{/if}) {literal}{ if (confirm(\'You have not saved your changes to the current page.\\nWould you like to save changes and continue?\')) { document.editPageForm.editPageAction.value=\'newsub\'; document.editPageForm.submit(); } } else { document.editPageForm.editPageAction.value=\'newsub\'; document.editPageForm.submit(); }\"{/literal}>{/if}\r\n\r\n<script language=\"JavaScript\">\r\n{if $smarty.request.isPreview}\r\npreviewEditPage();\r\n{/if}\r\n\r\n{literal}\r\nfunction on_change() {\r\n	var df = document.forms[\'editPageForm\'];\r\n	df.isChanged.value = 1;\r\n	df.btnSave.style.border = \'#990000 1px solid\';\r\n	df.btnSave.style.color = \'#CC0000\';\r\n	df.btnSave.disabled = false;\r\n	df.btnDiscard.disabled = false;\r\n}\r\n\r\nvar df = document.forms[\'editPageForm\'];\r\nfor (var x = 0; x < df.elements.length; x++) {\r\n	if (!df.elements[x].onchange) {\r\n		df.elements[x].onchange = on_change;\r\n	}\r\n}\r\n\r\nif (window.opener && typeof(window.opener.preferredEditorHeight) != \'undefined\' && typeof(window.opener.preferredEditorWidth) != \'undefined\') {\r\n	document.body.onresize = function() {var df = document.editPageForm; df.preferredEditorHeight.value = document.body.clientHeight + 13; df.preferredEditorWidth.value = document.body.clientWidth + 13; window.opener.preferredEditorHeight = document.body.clientHeight + 13; window.opener.preferredEditorWidth = document.body.clientWidth + 13; df.editPageAction.value = \'store\';};	\r\n}\r\n\r\n</script>\r\n{/literal}\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(171,24,0.15,'smarty','0','Page created.',1060038154,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tocId tab\">\r\n<input type=\"hidden\" name=\"editPageAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"edit/main\">\r\n<input type=\"hidden\" name=\"tocId\" value=\"{$tocId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=edit/main&tab=content&tocId={$tocId}\" class=\"tab{if $tab eq \"content\"}_on{/if}\" onclick=\"return gotoTab(\'content\');\">&nbsp;Page&nbsp;Content&nbsp;</a>| \r\n			<a href=\"?pg=edit/main&tab=toc&tocId={$tocId}\" class=\"tab{if $tab eq \"toc\"}_on{/if}\" onclick=\"return gotoTab(\'toc\');\">&nbsp;Page&nbsp;Settings&nbsp;</a>| \r\n			{if $changeVersion OR $historySettings}<a href=\"?pg=edit/main&tab=history&tocId={$tocId}\" class=\"tab{if $tab eq \"history\"}_on{/if}\" onclick=\"return gotoTab(\'history\');\">&nbsp;Page&nbsp;History&nbsp;</a>| {/if}\r\n			{if $viewAccess}<a href=\"?pg=edit/main&tab=access&tocId={$tocId}\" class=\"tab{if $tab eq \"access\"}_on{/if}\" onclick=\"return gotoTab(\'access\');\">&nbsp;Access&nbsp;Control&nbsp;</a>|{/if}\r\n			{if $searchSettings}<a href=\"?pg=edit/main&tab=search&tocId={$tocId}\" class=\"tab{if $tab eq \"search\"}_on{/if}\" onclick=\"return gotoTab(\'search\');\">&nbsp;Search&nbsp;Engine&nbsp;</a>| {/if}\r\n			<a href=\"?pg=edit/main&tab=jump&tocId={$tocId}\" class=\"tab{if $tab eq \"jump\"}_on{/if}\" onclick=\"return gotoTab(\'jump\');\">&nbsp;Jump&nbsp;To..&nbsp;</a>| \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/fsm/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Page Summary</h2>\r\n			\r\n			{if $aEditPage.isChanged}<div style=\"color:#FF0000;\">* Not Saved *</div>{/if}\r\n			<strong>Page Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <!--small>(<a href=\"?pg=edit/main&tab=toc\">edit</a>)</small--><br>\r\n			<strong>Page Title:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <!--small>(<a href=\"?pg=edit/main&tab=toc\">edit</a>)</small--><br>\r\n			<strong>Last Updated:</strong> {$aEditPage.dateModified|date_format2:\"n/j/Y h:i:s A\"}<br>\r\n			<strong>Last Updated By:</strong> {$aEditPage.username|default:\"Unknown\"}<br>\r\n			<strong>Page Version#:</strong> {$aEditPage.version|default:\"Unknown\"}<br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n{if $deleteAccess}<input class=\"btn\" type=\"button\" name=\"deletePage\" value=\"Delete This Page\"\r\n		{if $aEditPage.parentId eq \"0\"}onClick=\"alert(\'You cannot delete a page whose parent is \\\'root\\\'.\\n(Pages whose Parent ID is 0 are \\\'root pages\\\'.)\\n\\nIf you would like to delete this page, it must be\\nmoved beyond the first-teir level.\\n\\nIf this page is your only first-teir page, you must\\nmove another page to the root, move this page\\nbelow the root, then delete it.\');\"{else}onClick=\"if (confirm(\'Are you sure you want to permanently delete this page and\\nall of its backups?{if $aEditPage.childrenCount gt \"0\"}\\n\\nWARNING: This command will also delete all decendents of\\nthis page within the Table of Contents (TOC).\\n\\nDecendents are defined as pages whose Parent ID points\\nto this page. If you are unsure of which pages are\\nchildren of this page, check the TOC or, AS RECOMMENDED,\\nhide this page in the TOC (Page Settings tab).{/if}\')) {literal}{ document.editPageForm.editPageAction.value=\'delete\'; document.editPageForm.submit(); }\"{/literal}{/if}>\r\n{/if}\r\n{if $addAccess}<input class=\"btn\" type=\"button\" name=\"addSubPage\" value=\"Add New Sub Page\" onClick=\"if ({if $aEditPage.isChanged}1{else}isChanged.value != \'\'{/if}) {literal}{ if (confirm(\'You have not saved your changes to the current page.\\nWould you like to save changes and continue?\')) { document.editPageForm.editPageAction.value=\'newsub\'; document.editPageForm.submit(); } } else { document.editPageForm.editPageAction.value=\'newsub\'; document.editPageForm.submit(); }\"{/literal}>{/if}\r\n\r\n<script language=\"JavaScript\">\r\n{if $smarty.request.isPreview}\r\npreviewEditPage();\r\n{/if}\r\n\r\n{literal}\r\nfunction on_change() {\r\n	var df = document.forms[\'editPageForm\'];\r\n	df.isChanged.value = 1;\r\n	df.btnSave.style.border = \'#990000 1px solid\';\r\n	df.btnSave.style.color = \'#CC0000\';\r\n	df.btnSave.disabled = false;\r\n	df.btnDiscard.disabled = false;\r\n}\r\n\r\nvar df = document.forms[\'editPageForm\'];\r\nfor (var x = 0; x < df.elements.length; x++) {\r\n	if (!df.elements[x].onchange) {\r\n		df.elements[x].onchange = on_change;\r\n	}\r\n}\r\n\r\nif (window.opener && typeof(window.opener.preferredEditorHeight) != \'undefined\' && typeof(window.opener.preferredEditorWidth) != \'undefined\') {\r\n	document.body.onresize = function() {var df = document.editPageForm; df.preferredEditorHeight.value = document.body.clientHeight + 13; df.preferredEditorWidth.value = document.body.clientWidth + 13; window.opener.preferredEditorHeight = document.body.clientHeight + 13; window.opener.preferredEditorWidth = document.body.clientWidth + 13; df.editPageAction.value = \'store\';};	\r\n}\r\n\r\n</script>\r\n{/literal}\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(172,24,0.16,'smarty','0','Page created.',1060038612,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"fssId tab\">\r\n<input type=\"hidden\" name=\"fileSystemAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"fsm/main\">\r\n<input type=\"hidden\" name=\"fsId\" value=\"{$fsId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=fsm/main&tab=list&fsId={$fsId}\" class=\"tab{if $tab eq \"content\"}_on{/if}\" onclick=\"return gotoTab(\'content\');\">&nbsp;Page&nbsp;Content&nbsp;</a>| \r\n			<a href=\"?pg=edit/main&tab=toc&tocId={$fsId}\" class=\"tab{if $tab eq \"toc\"}_on{/if}\" onclick=\"return gotoTab(\'toc\');\">&nbsp;Page&nbsp;Settings&nbsp;</a>| \r\n			{if $changeVersion OR $historySettings}<a href=\"?pg=edit/main&tab=history&fsId={$fsId}\" class=\"tab{if $tab eq \"history\"}_on{/if}\" onclick=\"return gotoTab(\'history\');\">&nbsp;Page&nbsp;History&nbsp;</a>| {/if}\r\n			{if $viewAccess}<a href=\"?pg=edit/main&tab=access&fsd={$fsId}\" class=\"tab{if $tab eq \"access\"}_on{/if}\" onclick=\"return gotoTab(\'access\');\">&nbsp;Access&nbsp;Control&nbsp;</a>|{/if}\r\n			{if $searchSettings}<a href=\"?pg=edit/main&tab=search&fsId={$fsId}\" class=\"tab{if $tab eq \"search\"}_on{/if}\" onclick=\"return gotoTab(\'search\');\">&nbsp;Search&nbsp;Engine&nbsp;</a>| {/if}\r\n			<a href=\"?pg=edit/main&tab=jump&fsId={$fsId}\" class=\"tab{if $tab eq \"jump\"}_on{/if}\" onclick=\"return gotoTab(\'jump\');\">&nbsp;Jump&nbsp;To..&nbsp;</a>| \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/fsm/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Folder Summary</h2>\r\n			\r\n			<strong>Folder Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <br>\r\n			<strong>Folder Path:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(173,24,0.17,'smarty','0','Page created.',1060038681,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"fssId tab\">\r\n<input type=\"hidden\" name=\"fileSystemAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"fsm/main\">\r\n<input type=\"hidden\" name=\"fsId\" value=\"{$fsId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=fsm/main&tab=list&fsId={$fsId}\" class=\"tab{if $tab eq \"list\"}_on{/if}\" onclick=\"return gotoTab(\'list\');\">&nbsp;Folder&nbsp;Contents&nbsp;</a>| \r\n			 \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/fsm/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Folder Summary</h2>\r\n			\r\n			<strong>Folder Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <br>\r\n			<strong>Folder Path:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(174,24,0.18,'smarty','0','Page created.',1060043407,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"fssId tab\">\r\n<input type=\"hidden\" name=\"fileSystemAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"fsm/main\">\r\n<input type=\"hidden\" name=\"fsId\" value=\"{$fsId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=fsm/main&tab=list&fsId={$fsId}\" class=\"tab{if $tab eq \"list\"}_on{/if}\" onclick=\"return gotoTab(\'list\');\">&nbsp;Folder&nbsp;Contents&nbsp;</a>| \r\n			 \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{php_include file=\"module:tableManager\"}\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/fsm/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Folder Summary</h2>\r\n			\r\n			<strong>Folder Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <br>\r\n			<strong>Folder Path:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(175,24,0.19,'smarty','0','Page created.',1060043446,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"fssId tab\">\r\n<input type=\"hidden\" name=\"fileSystemAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"fsm/main\">\r\n<input type=\"hidden\" name=\"fsId\" value=\"{$fsId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=fsm/main&tab=list&fsId={$fsId}\" class=\"tab{if $tab eq \"list\"}_on{/if}\" onclick=\"return gotoTab(\'list\');\">&nbsp;Folder&nbsp;Contents&nbsp;</a>| \r\n			 \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include_php file=\"module:tableManager\"}\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/fsm/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Folder Summary</h2>\r\n			\r\n			<strong>Folder Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <br>\r\n			<strong>Folder Path:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(176,24,0.20,'smarty','0','Page created.',1060044372,3,'12.254.145.239','<html>\r\n{assign var=\"tab\" value=$smarty.request.tab|default:\"list\"}\r\n{assign var=\"fsId\" value=$smarty.request.fsId}\r\n{assign var=\"pgLayout\" value=\"dont_use_any\"}\r\n{if !$acm->checkAccess(\'edit\', \'_fs\', $fsId)}\r\n	{message type=\"error\" value=\"You do not have access to edit the specified page.\"}\r\n	<head>\r\n		<title>File System Manager - Access Denied</title>\r\n		<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n	</head>\r\n	<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n		{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n	</body>\r\n	</html>\r\n{else}\r\n{* include_php file=\"spade/handle.fileSystem.php\" *}\r\n{* CHECK AND STORE ALL ACCESS RIGHTS RELATED TO THE PAGE EDITOR *}\r\n{assign var=\"addAccess\" value=$acm->checkAccess(\'add\', \'_toc\', $tocId)}\r\n{assign var=\"deleteAccess\" value=$acm->checkAccess(\'delete\', \'_toc\', $tocId)}\r\n{assign var=\"changeAccess\" value=$acm->checkAccess(\'changeAccess\', \'_toc\', $tocId)}\r\n{assign var=\"viewAccess\" value=$acm->checkAccess(\'viewAccess\', \'_toc\', $tocId)}\r\n\r\n<head>\r\n	<title>File System Manager - {$aEditPage.title}</title>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}edit.css\">\r\n{if $isIE AND $modules.spadeEditor}\r\n	<script language=\"JavaScript\" src=\"{$modules.spadeEditor}\"></script>\r\n{/if}\r\n</head>\r\n<body bgcolor=\"#DDDDDD\" background=\"{$skinFolder}img/editBg.gif\">\r\n	<script language=\"JavaScript\">\r\n		var popupError = \'There was an error opening the popup window.\\n\\nYou must disable any popup blocking software\\nin order for this feature to work properly.\';\r\n		{literal}\r\n		function gotoTab(newTab) {\r\n			var dF = document.fileSystemForm;\r\n			if (dF.isChanged.value || dF.editPageAction.value != \'\') {\r\n				dF.editPageAction.value = \'store\';\r\n				dF.tab.value = newTab;\r\n				dF.submit();\r\n				return false;\r\n			}\r\n			return true;\r\n		}\r\n		\r\n		function saveChanges() {\r\n			{/literal}\r\n			var df = document.editPageForm;\r\n			{if $smarty.request.tab eq \"history\"}\r\n			var inDanger = (historyCount - parseInt(df.historyLimit.value){if $aEditPage.isContentChanged} + 1{/if});\r\n			{elseif $smarty.request.tab eq \"content\"}\r\n			var inDanger = parseInt(historyCount) - {$aEditPage.historyLimit} + ((df.isContentChanged.value != \'\') ? 1 : 0);\r\n			{else}\r\n			var inDanger = historyCount - {$aEditPage.historyLimit}{if $aEditPage.isContentChanged} + 1{/if};\r\n			{/if}\r\n			{if $smarty.request.tab eq \"content\"}\r\n			var isChanged = (df.isContentChanged.value != \'\');\r\n			{else}\r\n			var isChanged = \'{$aEditPage.isContentChanged}\';\r\n			{/if}\r\n\r\n			{if $changeVersion OR $historySettings}if ((inDanger > 0 && confirm(\'The current specified history limit is less than the number of versions\\ncurrently stored in the history\' + ((isChanged) ? \' (plus the new version you are saving)\' : \'\') + \'.\\n\\nThe \' + ((inDanger > 1) ? inDanger+\' oldest versions\' : \'oldest version\') + \' will be deleted.\\n\\nIf you would like to save \' + ((inDanger > 1) ? \'these versions\' : \'this version\') + \', or manually select\\nthe version(s) to delete, click Cancel and do so now.\\n\\nIf you would like to continue and automatically delete\\n\'+((inDanger > 1) ? \'these \'+inDanger+\' versions\' : \'the oldest version\') + \', click OK.\')) || inDanger <= 0){/if}{literal} {\r\n			df.editPageAction.value=\'save\'; \r\n			df.submit();\r\n			}\r\n		}\r\n		{/literal}\r\n	</script>\r\n<form name=\"editPageForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"fssId tab\">\r\n<input type=\"hidden\" name=\"fileSystemAction\" value=\"\">\r\n<input type=\"hidden\" name=\"pg\" value=\"fsm/main\">\r\n<input type=\"hidden\" name=\"fsId\" value=\"{$fsId}\">\r\n<input type=\"hidden\" name=\"tab\" value=\"{$tab}\">\r\n<input type=\"hidden\" name=\"isChanged\" value=\"\">\r\n<input type=\"hidden\" name=\"isPreview\" value=\"\">\r\n<input type=\"hidden\" name=\"preferredPreviewHeight\" value=\"{$s.preferredPreviewHeight}\">\r\n<input type=\"hidden\" name=\"preferredPreviewWidth\" value=\"{$s.preferredPreviewWidth}\">\r\n<input type=\"hidden\" name=\"preferredEditorHeight\" value=\"{$s.preferredEditorHeight}\">\r\n<input type=\"hidden\" name=\"preferredEditorWidth\" value=\"{$s.preferredEditorWidth}\">\r\n<table width=\"100%\">\r\n	<tr>\r\n		<td nowrap><a href=\"http://spade.onai.net\" target=\"_blank\"><img src=\"./img/logos/spade.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a> &nbsp; <a href=\"http://www.onai.net\" target=\"_blank\"><img src=\"./img/logos/onai.gif\" style=\"margin-bottom:8px;\" border=\"0\"></a></td>\r\n		<td width=\"100%\" align=\"center\">&nbsp;</td>\r\n	</tr>\r\n</table>\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"border:#000000 1px solid;\">\r\n	<tr>\r\n		<td background=\"{$skinFolder}img/fade_gray.gif\" bgcolor=\"#B0BEC0\" valign=\"bottom\" style=\"background-repeat:repeat-x;\">\r\n			<span style=\"padding:3px 3px 0px 3px;\"><img src=\"./img/blank.gif\" width=\"1\" height=\"20\" alt=\"\" border=\"0\">\r\n			<a href=\"?pg=fsm/main&tab=list&fsId={$fsId}\" class=\"tab{if $tab eq \"list\"}_on{/if}\" onclick=\"return gotoTab(\'list\');\">&nbsp;Folder&nbsp;Contents&nbsp;</a>| \r\n			 \r\n		</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td bgcolor=\"#FFFFFF\">\r\n			<div style=\"margin:10px;\">\r\n			<noscript>\r\n				<div style=\"color:#FF0000;\" align=\"center\">JavaScript must be enabled for this feature to work properly.<br />You may be able to continue with some features, but enabling JavaScript is highly recommended.</div>\r\n			</noscript>\r\n			{include_php file=\"`$modules.tableManager`\"}\r\n			{include file=\"file:./pages/edit/pageMessages.tpl\"}\r\n			{include file=\"file:./pages/fsm/`$tab`.tpl\"}\r\n			<hr noshade size=\"1\">\r\n			<h2>Current Folder Summary</h2>\r\n			\r\n			<strong>Folder Name:</strong> {$aEditPage.name|default:\"Unknown\"} &nbsp; <br>\r\n			<strong>Folder Path:</strong> {$aEditPage.title|default:\"Unknown\"} &nbsp; <br>\r\n			</div></td>\r\n	</tr>\r\n</table>\r\n</form>\r\n \r\n</body>\r\n</html>\r\n{/if}'),(4343,105,1.26,'php','0','tried to get the new layout on this page but couldn\'t',1127161126,3,'216.194.127.150','<?php\r\n\r\nglobal $SPADE;\r\n\r\nif ($SPADE[\'user\']->isLoggedIn()) {\r\n	$SPADE[\'template\']->assign (\'pgLayout\', \'layouts/withLeftNav.tpl\');\r\n}\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n/*// If you want to make the [0] section active, delete this block!\r\nif (!$SPADE[\'acm\']->isDomainAdmin()) {\r\n	$FAQ[0] = $FAQ[1];\r\n	$FAQ[1] = $FAQ[2];\r\n	$FAQ[2] = $FAQ[3];\r\n	unset($FAQ[3]);\r\n}\r\n//Delete through this line*/\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') {\r\n	unset ($FAQ[0]);\r\n}\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') {\r\n	unset ($FAQ[1]);\r\n}\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') {\r\n	unset ($FAQ[2]);\r\n}\r\n\r\n?>\r\n\r\n\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	$x = 0;\r\n	for ($z = 0; $z < count($FAQ); $z++) { \r\n		while (!is_array($FAQ[$x])) $x++;\r\n	?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	$x = 0;\r\n	for ($z = 0; $z < count($FAQ); $z++) { \r\n		while(!is_array($FAQ[$x])) $x++;\r\n	?>\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(700,90,0.27,'smarty','0','Changed \"more info\" link.',1083279902,2,'24.10.220.247','<h1>Are you ready for the challenge?</h1>\r\n<hr noshade size=\"1\" />\r\nToo many hours in front of a computer screen got you out of shape?<br />\r\nHere’s your chance to lose those extra pounds, make a few bucks, and have fun doing it. WeightLossWars allows you to create a competition among your friends that will provide the tools you need to monitor your progress and the progress of your competitors.<br />\r\n<div align=\"right\"><a href=\"?pg=about\">Click here to find out more.</a></div>\r\n<br />\r\n\r\n<h2>Are you ready for WeightLossWars?</h2>\r\n<hr noshade size=\"1\" />\r\nSelect an Arena below and discover just how much fun losing weight can be.<br />\r\n<br />\r\n				\r\n<table cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n	<td><div id=\"chunk_1\" class=\"chunk\">\r\n			<h2>Corporate</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			Climb higher on the ladder of success, all the way to the top of your coporation!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2>Family/Friends</h2>\r\n			<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Dominate a challenge against your close family and friends, its every man for himself!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2>Partner/Spouse</h2>\r\n			<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Face off in a grueling head to head smackdown against a partner or close friend.</div>\r\n			\r\n		<div id=\"chunk_4\" class=\"chunk\">\r\n			<h2>Group/Club</h2>\r\n			<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Team up with your homies for an ultimate all-out weight-loss rumble. word.</div></td>\r\n</tr>\r\n</table>'),(701,111,0.10,'smarty','0','Page created.',1083280023,2,'24.10.220.247',''),(702,111,0.11,'smarty','1','Page created.',1083280048,2,'24.10.220.247','<h1>Top Navigation</h1>'),(703,112,0.10,'smarty','0','Page created.',1083280056,2,'24.10.220.247',''),(704,112,0.11,'smarty','0','Page created.',1083280076,2,'24.10.220.247','<h1>Bottom Navigation</h1>'),(3698,231,0.35,'smarty','1','added stuff',1116958340,16,'128.187.0.164','<h2>eHealthCompete </h2>\r\n\r\n\r\n<p> Companies\r\n<ol>\r\n	<li>Company preferences\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		preferences<br />\r\n		group_preferences<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		10 hours (preferences)<br />\r\n		</b></li>\r\n	<li>Companies specify what modules they will use, i.e. competitions, incentives, \r\n		survey system, sabotage store, competition ending emails, etc.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		X modules<br />\r\n		X group_modules<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		4 hours<br />\r\n		</b></li>\r\n	<li>Large competitions to only show the top XX teams along with the team that \r\n		the logged in user is on.\r\n		<br /><b>\r\n		<br />\r\n		<u>Time:</u><br />\r\n		25 hours (competition rewrite)<br />\r\n		</b></li>\r\n	<li>Create their own incenitve programs, own tracking variables company wide.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		group_stat_categories<br />\r\n		group_stat_incentives<br />\r\n		group_incentive_rewards<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		6 hours<br />\r\n		</b></li>\r\n	<li>Award points to the variables on My Home based on certain time windows, \r\n		instead of their whole history.\r\n		<br /><b>\r\n		<u>Time:</u><br />\r\n		5 hours<br />\r\n		</b></li>\r\n	<li>Promotional codes for competition creation.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		cart_discounts<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		5 hours (1/2 Onai pays)<br />\r\n		</b></li>\r\n	<li>Automatic email reminders to login and update their stats and take the \r\n		incentive surveys.  These reminders should be twice weekly, and customized \r\n		to the company.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		group_reminders<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		8 hours<br />\r\n		</b></li>\r\n	<li>Companies can choose to use our 3 incentive surveys or use their own, or a \r\n		combo of the 2.</li>\r\n	<li>Tutorials all over the site.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		_page_help<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		8 hours (3/4 Onai pays)<br />\r\n		14 hours (to build images/media for tutorials)<br />\r\n		</b></li>\r\n	<li>Clean up both sites - delete unused pages, etc\r\n		<br /><b>\r\n		<br />\r\n		<u>Time:</u><br />\r\n		5 hours<br />\r\n		</b></li>\r\n	<li>Ability for employees to redeem incentive points in our store for discounts on \r\n		the products.</li>\r\n	<li>Add more graphs, graphical displays, star stats, and fun tools.</li>\r\n	<li>Make coordinators able to create new competitions with new calculations.  So if \r\n		they wanted to do #of veggies a day, there could be a leaderboard for that.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		default_stat_categories<br />\r\n		user_stat_categories<br />\r\n		</b></li>\r\n	<li>Create point thresholds that notify the user that they have reached a reward \r\n		level and can contact their employer, or continue to accumulate points to \r\n		get to the next point level. Maybe point-level based e-mail notifications.</li>\r\n	<li>Goal management like on the Apple Program, that rewards points to those users \r\n		who report their goals when they should, and that rewards employees for \r\n		reaching their goals.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		goal_types<br />\r\n		group_goals<br />\r\n		user_goals<br />\r\n		user_goal_stats<br />\r\n		group_goal_incentives<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		30 hours<br />\r\n		</b></li>\r\n	<li>On the incentive page break down points like this...Standard Incntive points \r\n		(from the surveys we already have there), goal points (points received for \r\n		being active in our new goal system), Company Incentive points (based on \r\n		different quizes and surveys that the employer creates to go along with \r\n		their custome incentive programs and competitions), Forum Points (based on \r\n		the # of points that they receive from viewing and posting comments), points \r\n		based on the entries on My Home, etc.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		group_survey_incentives<br />\r\n		group_forum_incentives<br />\r\n		<br />\r\n		<u>Time:</u><br />\r\n		6 hours<br />\r\n		</b></li>\r\n	<li>Nail down the report section, make it user-friendly.  Hide some stats.</li>\r\n	<li>Second Leader board option (a link at the top that switches to the other \r\n		measurement of their choice).</li>\r\n	<li>Customer service questions are directed to the company and then the coodinator \r\n		can send us customer service questions if they can\'t help.</li>\r\n\r\n	<li>Competition functionality so you can have 2 groups competing against each other; i.e. Nu Skin v.s. Tahitian Noni.</li>\r\n	<li>Group within a group functionality.  That way we skin one group (golds gym) and all the employees in that group who create an account will be under that skin, with the option of displaying the overall leaders for that group somewhere on the MAIN groups sign in page\r\n</ol>\r\nEmployees\r\n<ol>\r\n	<li>Employees can create personal family competitions and invite their friends.\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		group_accounts<br />\r\n		group_charges<br />\r\n		</b></li>\r\n	<li>Employee prefrences allowing them to create their own tracking variables\r\n		<br /><b>\r\n		<u>New Tables:</u><br />\r\n		user_preferences<br />\r\n		</b></li>\r\n	<li>Employees can assign themselves to a team, saving me, or the coordinator a lot of \r\n		time.</li>\r\n</ol>\r\n\r\n\r\n\r\n\r\n\r\n\r\n</p><p><h2>WeightLossWars.com</h2>'),(3699,169,0.19,'smarty','0','added em tags',1117257514,16,'128.187.0.164','<h1 class=\"withBG\">Problem</h1>\r\n\r\n<p><i>This is a very difficult time for\r\n[employers] to cope with doubledigit\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>'),(3687,231,0.26,'smarty','0','Page created.',1115401784,16,'128.187.0.164','<h2>eHealthCompete </h2>\r\n\r\n\r\n<p> Companies\r\n<ol>\r\n	<li>Company preferences</li>\r\n	<li>Companies specify what modules they will use, i.e. competitions, incentives, survey system, sabotage store, competition ending emails, etc.</li>\r\n	<li>Large competitions to only show the top XX teams along with the team that the logged in user is on.</li>\r\n	<li>Create their own incenitve programs, own tracking variables company wide.</li>\r\n	<li>Award points to the variables on My Home based on certain time windows, instead of their who history.</li>\r\n	<li>Promotional codes for competition creation</li>\r\n	<li>Automatic email reminders to login and update their stats and take the incentive surveys.  These reminders should be twice weekly, and customized to the company.</li>\r\n	<li>Companies can choose to use our 3 incentive surveys or use their own, or a combo of the 2.</li>\r\n	<li>Tutorials all over the site.</li>\r\n	<li>Clean up both sites - delete unused pages, etc</li>\r\n	<li>Ability for employees to redeem incentive points in our store for discounts on the products.</li>\r\n	<li>Add more graphs, graphical displays, star stats, and fun tools.</li>\r\n	<li>Make coordinators able to create new competitions with new calculations.  So if they wanted to do #of veggies a day, there could be a leaderboard for that.</li>\r\n	<li>Create point thresholds that notify the user that they have reached a reward level and can contact their employer, or continue to accumulate points to get to the next point leve.</li>\r\n	<li>Goal management like on the Apple Program, that rewards points to those users who report their goals when they should, and that rewards employees for reaching their goals.</li>\r\n	<li>On the incentive page break down points like this...Standard Incntive points (from the surveys we already have there), goal points (points received for being active in our new goal system), Company Incentive points (based on different quizes and surveys that the employer creates to go along with their custome incentive programs and competitions), Forum Points (based on the # of points that they receive from viewing and posting comments), points based on the entries on My Home, etc.\r\n</ol>\r\nEmployees\r\n<ol>\r\n	<li>Employees can create personal family competitions and invite their friends.</li>\r\n	<li>Employee prefrences allowing them to create their own tracking variables</li>\r\n	<li>Employees can assign themselves to a team, saving me, or the coordinator a lot of time.</li>\r\n</ol>\r\n\r\n\r\n\r\n\r\n\r\n\r\n</p><p><h2>WeightLossWars.com</h2>'),(3689,231,0.28,'smarty','0','Page created.',1115402554,16,'128.187.0.164','<h2>eHealthCompete </h2>\r\n\r\n\r\n<p> Companies\r\n<ol>\r\n	<li>Company preferences</li>\r\n	<li>Companies specify what modules they will use, i.e. competitions, incentives, survey system, sabotage store, competition ending emails, etc.</li>\r\n	<li>Large competitions to only show the top XX teams along with the team that the logged in user is on.</li>\r\n	<li>Create their own incenitve programs, own tracking variables company wide.</li>\r\n	<li>Award points to the variables on My Home based on certain time windows, instead of their who history.</li>\r\n	<li>Promotional codes for competition creation</li>\r\n	<li>Automatic email reminders to login and update their stats and take the incentive surveys.  These reminders should be twice weekly, and customized to the company.</li>\r\n	<li>Companies can choose to use our 3 incentive surveys or use their own, or a combo of the 2.</li>\r\n	<li>Tutorials all over the site.</li>\r\n	<li>Clean up both sites - delete unused pages, etc</li>\r\n	<li>Ability for employees to redeem incentive points in our store for discounts on the products.</li>\r\n	<li>Add more graphs, graphical displays, star stats, and fun tools.</li>\r\n	<li>Make coordinators able to create new competitions with new calculations.  So if they wanted to do #of veggies a day, there could be a leaderboard for that.</li>\r\n	<li>Create point thresholds that notify the user that they have reached a reward level and can contact their employer, or continue to accumulate points to get to the next point leve.</li>\r\n	<li>Goal management like on the Apple Program, that rewards points to those users who report their goals when they should, and that rewards employees for reaching their goals.</li>\r\n	<li>On the incentive page break down points like this...Standard Incntive points (from the surveys we already have there), goal points (points received for being active in our new goal system), Company Incentive points (based on different quizes and surveys that the employer creates to go along with their custome incentive programs and competitions), Forum Points (based on the # of points that they receive from viewing and posting comments), points based on the entries on My Home, etc.\r\n	<li>Nail down the report section, make it user friendly useful.  Hide some stats.</li>\r\n	<li>Make the site work with Apple computers.</li>\r\n</ol>\r\nEmployees\r\n<ol>\r\n	<li>Employees can create personal family competitions and invite their friends.</li>\r\n	<li>Employee prefrences allowing them to create their own tracking variables</li>\r\n	<li>Employees can assign themselves to a team, saving me, or the coordinator a lot of time.</li>\r\n</ol>\r\n\r\n\r\n\r\n\r\n\r\n\r\n</p><p><h2>WeightLossWars.com</h2>'),(3691,231,0.30,'smarty','0','Page created.',1115404055,16,'128.187.0.164','<h2>eHealthCompete </h2>\r\n\r\n\r\n<p> Companies\r\n<ol>\r\n	<li>Company preferences</li>\r\n	<li>Companies specify what modules they will use, i.e. competitions, incentives, survey system, sabotage store, competition ending emails, etc.</li>\r\n	<li>Large competitions to only show the top XX teams along with the team that the logged in user is on.</li>\r\n	<li>Create their own incenitve programs, own tracking variables company wide.</li>\r\n	<li>Award points to the variables on My Home based on certain time windows, instead of their who history.</li>\r\n	<li>Promotional codes for competition creation</li>\r\n	<li>Automatic email reminders to login and update their stats and take the incentive surveys.  These reminders should be twice weekly, and customized to the company.</li>\r\n	<li>Companies can choose to use our 3 incentive surveys or use their own, or a combo of the 2.</li>\r\n	<li>Tutorials all over the site.</li>\r\n	<li>Clean up both sites - delete unused pages, etc</li>\r\n	<li>Ability for employees to redeem incentive points in our store for discounts on the products.</li>\r\n	<li>Add more graphs, graphical displays, star stats, and fun tools.</li>\r\n	<li>Make coordinators able to create new competitions with new calculations.  So if they wanted to do #of veggies a day, there could be a leaderboard for that.</li>\r\n	<li>Create point thresholds that notify the user that they have reached a reward level and can contact their employer, or continue to accumulate points to get to the next point leve.</li>\r\n	<li>Goal management like on the Apple Program, that rewards points to those users who report their goals when they should, and that rewards employees for reaching their goals.</li>\r\n	<li>On the incentive page break down points like this...Standard Incntive points (from the surveys we already have there), goal points (points received for being active in our new goal system), Company Incentive points (based on different quizes and surveys that the employer creates to go along with their custome incentive programs and competitions), Forum Points (based on the # of points that they receive from viewing and posting comments), points based on the entries on My Home, etc.\r\n	<li>Nail down the report section, make it user friendly useful.  Hide some stats.</li>\r\n	<li>Make the site work with Apple computers.</li>\r\n	<li>Second Leader board option (a link at the top that switches to the other measurement of their choice).</li>\r\n	<li>Customer service questions are directed to the company and then the coodinator can send us customer service questions if they can\'t help.</li>\r\n</ol>\r\nEmployees\r\n<ol>\r\n	<li>Employees can create personal family competitions and invite their friends.</li>\r\n	<li>Employee prefrences allowing them to create their own tracking variables</li>\r\n	<li>Employees can assign themselves to a team, saving me, or the coordinator a lot of time.</li>\r\n</ol>\r\n\r\n\r\n\r\n\r\n\r\n\r\n</p><p><h2>WeightLossWars.com</h2>'),(696,90,0.25,'smarty','0','All new content for new layout...',1083231276,3,'24.10.220.247','<h1>Are you ready for the challenge?</h1>\r\n<hr noshade size=\"1\" />\r\nToo many hours in front of a computer screen got you out of shape?<br />\r\nHere’s your chance to lose those extra pounds, make a few bucks, and have fun doing it. WeightLossWars allows you to create a competition among your friends that will provide the tools you need to monitor your progress and the progress of your competitors.<br />\r\n<div align=\"right\"><a href=\"javascript://\">Click here to find out more.</a></div>\r\n<br />\r\n\r\n<h2>Are you ready for WeightLossWars?</h2>\r\n<hr noshade size=\"1\" />\r\nSelect an Arena below and discover just how much fun losing weight can be.<br />\r\n<br />\r\n				\r\n<table cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n	<td><div id=\"chunk_1\" class=\"chunk\">\r\n			<h2>Corporate</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			Climb higher on the ladder of success, all the way to the top of your coporation!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2>Family/Friends</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Dominate a challenge against your close family and friends, its every man for himself!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2>Partner/Spouse</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Face off in a grueling head to head smackdown against a partner or close friend.</div>\r\n			\r\n		<div id=\"chunk_4\" class=\"chunk\">\r\n			<h2>Group/Club</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Team up with your homies for an ultimate all-out weight-loss rumble. word.</div></td>\r\n</tr>\r\n</table>'),(697,90,0.26,'smarty','0','new icons..',1083231400,3,'24.10.220.247','<h1>Are you ready for the challenge?</h1>\r\n<hr noshade size=\"1\" />\r\nToo many hours in front of a computer screen got you out of shape?<br />\r\nHere’s your chance to lose those extra pounds, make a few bucks, and have fun doing it. WeightLossWars allows you to create a competition among your friends that will provide the tools you need to monitor your progress and the progress of your competitors.<br />\r\n<div align=\"right\"><a href=\"javascript://\">Click here to find out more.</a></div>\r\n<br />\r\n\r\n<h2>Are you ready for WeightLossWars?</h2>\r\n<hr noshade size=\"1\" />\r\nSelect an Arena below and discover just how much fun losing weight can be.<br />\r\n<br />\r\n				\r\n<table cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n	<td><div id=\"chunk_1\" class=\"chunk\">\r\n			<h2>Corporate</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			Climb higher on the ladder of success, all the way to the top of your coporation!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2>Family/Friends</h2>\r\n			<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Dominate a challenge against your close family and friends, its every man for himself!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2>Partner/Spouse</h2>\r\n			<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Face off in a grueling head to head smackdown against a partner or close friend.</div>\r\n			\r\n		<div id=\"chunk_4\" class=\"chunk\">\r\n			<h2>Group/Club</h2>\r\n			<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Team up with your homies for an ultimate all-out weight-loss rumble. word.</div></td>\r\n</tr>\r\n</table>'),(2804,184,0.12,'smarty','0','Page created.',1103668373,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\nThis is the survey page.<br />\r\nAnswer these for me please.'),(2805,180,0.13,'smarty','0','Page created.',1103668451,2,'67.166.75.78','{redirect href=\"?pg=management/tools&sub=manage_company_details#pts\"}'),(2806,184,0.13,'smarty','0','Page created.',1103668988,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<ol>\r\n	<li>Please choose one of the following:\r\n	<ul>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</li>\r\n	</ul></li>\r\n	<li>Please choose one of the following:\r\n	<ul>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</li>\r\n	</ul></li>\r\n	<li>Please choose one of the following:\r\n	<ul>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</li>\r\n	</ul></li>\r\n	<li>Please choose one of the following:\r\n	<ul>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</li>\r\n		<li><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</li>\r\n	</ul></li>\r\n</ol>\r\n'),(2807,184,0.14,'smarty','0','Page created.',1103669243,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<ol>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n'),(2808,184,0.15,'smarty','0','Page created.',1103670567,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<ol>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n'),(2809,184,0.16,'smarty','0','Page created.',1103670610,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<ol id=\"surveyQuestionList\">\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n'),(2810,184,0.17,'smarty','0','Page created.',1103670752,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<form name=\"surveyForm\" action=\"index.php\" method=\"POST\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<ol id=\"surveyQuestionList\">\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n\r\n<input type=\"submit\" value=\"Submit Responses\" />\r\n</form>\r\n'),(2811,184,0.18,'smarty','0','Page created.',1103670782,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<form name=\"surveyForm\" action=\"index.php\" method=\"POST\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<ol id=\"surveyQuestionList\">\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt><input type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n\r\n<div style=\"text-align:center;\"><input type=\"submit\" value=\"Submit Responses\" /></div>\r\n</form>\r\n'),(2812,184,0.19,'smarty','0','Page created.',1103671045,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<form name=\"surveyForm\" action=\"index.php\" method=\"POST\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<ol id=\"surveyQuestionList\">\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt onclick=\"document.getElementById(\'q1_A\').checked = true;\"><input id=\"q1_A\" type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_B\').checked = true;\"><input id=\"q1_B\" type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_C\').checked = true;\"><input id=\"q1_C\" type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_D\').checked = true;\"><input id=\"q1_D\" type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n\r\n<div style=\"text-align:center;\"><input type=\"submit\" value=\"Submit Responses\" /></div>\r\n</form>\r\n'),(2813,177,0.21,'smarty','0','Added company logo, if available.',1103672908,2,'67.166.75.78','{if $smarty.session.company.logo}<div style=\"float:right; padding:15px; background-color:#fff;\"><img src=\"{$smarty.session.company.logo}\" /></div>{/if}\r\n<h1>Company Management Area</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<h2 class=\"withBG\">Administrative Controls:</h2>\r\n<div style=\"margin-left:25px;\">\r\n	{include file=\"file:./layouts/companyManagementTocDisplay.tpl\"}\r\n</div>'),(2814,184,0.20,'smarty','0','Page created.',1103673419,2,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n{include_php file=\"shared_handle:survey\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<form name=\"surveyForm\" action=\"index.php\" method=\"POST\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<ol id=\"surveyQuestionList\">\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt onclick=\"document.getElementById(\'q1_A\').checked = true;\"><input id=\"q1_A\" type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_B\').checked = true;\"><input id=\"q1_B\" type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_C\').checked = true;\"><input id=\"q1_C\" type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_D\').checked = true;\"><input id=\"q1_D\" type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n\r\n<div style=\"text-align:center;\"><input type=\"submit\" value=\"Submit Responses\" /></div>\r\n</form>\r\n'),(2815,184,0.21,'smarty','0','Page created.',1103673456,2,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n{include_php file=\"shared_handle:company/survey\"}\r\n<h2 class=\"withBG\">Survey #10203 - Week 7 - Day 3</h2>\r\n<form name=\"surveyForm\" action=\"index.php\" method=\"POST\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<ol id=\"surveyQuestionList\">\r\n	<li>Please choose one of the following:\r\n	<dl>\r\n		<dt onclick=\"document.getElementById(\'q1_A\').checked = true;\"><input id=\"q1_A\" type=\"radio\" name=\"q1\" value=\"\"> Option 1</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_B\').checked = true;\"><input id=\"q1_B\" type=\"radio\" name=\"q1\" value=\"\"> Option 2</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_C\').checked = true;\"><input id=\"q1_C\" type=\"radio\" name=\"q1\" value=\"\"> Option 3</dt>\r\n		<dt onclick=\"document.getElementById(\'q1_D\').checked = true;\"><input id=\"q1_D\" type=\"radio\" name=\"q1\" value=\"\"> Option 4</dt>\r\n	</dl></li>\r\n</ol>\r\n\r\n<div style=\"text-align:center;\"><input type=\"submit\" value=\"Submit Responses\" /></div>\r\n</form>\r\n'),(242,24,0.21,'file','1','Page created.',1060841885,1,'12.254.145.239',''),(244,45,0.11,'smarty','0','Page created.',1060842976,3,'127.0.0.1','{table_manager'),(245,45,0.12,'smarty','0','Page created.',1060843131,1,'127.0.0.1','{tablemanager profile_group=\"admin_tools\" style_table=\"gray_bubble\" login_required=\"false\"}'),(246,45,0.13,'smarty','0','Page created.',1060845777,1,'127.0.0.1','{tablemanager profile_group=\"admin_tools\" style_table=\"gray_bubble\" login_required=\"false\"}'),(247,45,0.14,'smarty','0','Page created.',1060852555,1,'127.0.0.1','{tablemanager profile_group=\"admin_tools\" style_table=\"gray_bubble\" login_required=\"false\" color_1=\"E7E7FF\" color_2=\"000000\"}'),(248,45,0.15,'smarty','0','Page created.',1060852826,1,'127.0.0.1','{tablemanager\r\n	profile_group=\"admin_tools\"\r\n	style_table=\"gray_bubble\"\r\n	login_required=\"false\"\r\n	heading_color=\"003366\"\r\n	color_1=\"E7E7FF\"\r\n	color_2=\"D7E4E0\"}'),(591,87,0.12,'php','0','Page copied from Kevins box.',1082496533,1,'208.187.110.149','<?php\r\n\r\n$SPADE[\'template\']->_tpl_vars[\'pgLayout\'] = \'file:layouts/admin.tpl\';\r\n\r\n// Here we can choose a different DB object if necessary...\r\n$dbObject = &$SPADE[\'db\'];\r\n\r\n// May as well leave debug mode on, since the user BETTER have credidentials.\r\n$dbObject->debugModeOn();\r\n\r\nif ($_FILES[\'sqlFile\'][\'name\']) {\r\n	if (preg_match(\"/\\.sql$/i\", $_FILES[\'sqlFile\'][\'name\'])) {\r\n		$sqlContent = implode(\"\", file($_FILES[\'sqlFile\'][\'tmp_name\']));\r\n		if (!$sqlContent) {\r\n			logAlert(\'An error occurred during file transfer or the file was empty.\');\r\n		}\r\n	} else {\r\n		logAlert(\'Uploaded file must be a SQL file (.sql extension).\');\r\n	}\r\n} elseif ($_REQUEST[\'sqlFileOnServer\']) {\r\n	if (!preg_match(\"/\\.sql$/i\", $_REQUEST[\'sqlFileOnServer\'])) {\r\n		logAlert(\'File on server must be a SQL file.\');\r\n	} elseif (file_exists($_REQUEST[\'sqlFileOnServer\'])) {\r\n		$sqlContent = implode(\"\", file($_REQUEST[\'sqlFileOnServer\']));\r\n	} else {\r\n		logAlert(\'File not found: \'.$_REQUEST[\'sqlFileOnServer\']);\r\n	}\r\n} elseif ($_REQUEST[\'sqlQuery\']) {\r\n	$sqlContent = stripslashes($_REQUEST[\'sqlQuery\']);\r\n}\r\n\r\nif ($_REQUEST[\'isConvertMySQLtoMSSQL\']) {\r\n	$sqlContent = mysql_dump_to_mssql($sqlContent);\r\n\r\n}\r\n\r\nif ($sqlContent) {\r\n	$_REQUEST[\'sqlQuery\'] = $sqlContent;\r\n	if (!$_REQUEST[\'isConvertMySQLtoMSSQL\'] || $_REQUEST[\'isExecuteConverted\']) {\r\n		// EXECUTE the QUERY\r\n		$queryOutput = $dbObject->batchQuery($sqlContent);\r\n		\r\n		echo \'<b>Query Output:</b><hr noshade size=\"1\" />\';\r\n		if (is_array($queryOutput)) {\r\n			echo_table($queryOutput);\r\n		} else {\r\n			echo \'<pre>\'.$queryOutput.\'</pre>\';\r\n		}\r\n		echo \'<hr noshade size=\"1\" />\';\r\n	}\r\n}\r\n	\r\n\r\n?>\r\n\r\n<form name=\"freeQuery\" method=\"post\" action=\"index.php\" style=\"margin:0px;\" enctype=\"multipart/form-data\">\r\n<input type=\"hidden\" name=\"pg\" value=\"<?php echo $SPADE[\'page\'][\'name\']; ?>\">\r\n<input type=\"hidden\" name=\"editPreview\" value=\"<?php echo $_REQUEST[\'editPreview\']; ?>\">\r\n\r\n<b>SQL:</b><br />\r\nQuery:<br />\r\n<textarea name=\"sqlQuery\" rows=\"14\" cols=\"75\" wrap=\"off\"><?php echo htmlspecialchars($_REQUEST[\'sqlQuery\']); ?></textarea><br />\r\n<br />\r\n<i>or</i> path to SQL file on server:<br />\r\n<input type=\"text\" name=\"sqlFileOnServer\" size=\"40\" value=\"<?php echo $_REQUEST[\'sqlFileOnServer\']; ?>\"><br />\r\n<br />\r\n<i>or</i> SQL file to upload:<br />\r\n<input type=\"file\" name=\"sqlFile\"> &nbsp; <input type=\"submit\" value=\" &nbsp; Go! &nbsp; \"><br />\r\n<br />\r\n\r\n<table style=\"border:1px solid black;\"><tr><td>\r\n<span>\r\n<b>SQL Conversion:</b><br />\r\n<!-- I am not sure if we should have PHP save last input on this... after one conversion it\'s not likely you\'ll want to convert again, is it? -->\r\nConvert MySQL to MSSQL: <input type=\"radio\" name=\"isConvertMySQLtoMSSQL\" value=\"1\"<?php //if ($_REQUEST[\'isConvertMySQLtoMSSQL\']) echo \" checked\"; ?>> yes <input type=\"radio\" name=\"isConvertMySQLtoMSSQL\" value=\"\"<?php //if (!$_REQUEST[\'isConvertMySQLtoMSSQL\']) echo \" checked\"; ?> checked> no<br />\r\n<!--Show converted SQL: <input type=\"checkbox\" name=\"isShowConverted\" value=\"1\" checked><br /> -->\r\nExecute converted SQL: <input type=\"checkbox\" name=\"isExecuteConverted\" value=\"1\"<?php if ($_REQUEST[\'isExecuteConverted\']) echo \" checked\"; ?>><br />\r\n</td></tr></table>\r\n\r\n</span>\r\n</form>\r\n'),(254,48,0.10,'file','1','Page created.',1060900949,1,'127.0.0.1',''),(344,56,0.13,'smarty','0','Page created.',1061533033,1,'127.0.0.1','{assign var=\"pgLayout\" value=\"file:layouts/admin.tpl\"}\r\n\r\n{tablemanager\r\n	profile_group=\"bug_tracker\"\r\n	style_table=\"gray_bubble\"\r\n	login_required=\"false\"\r\n	heading_color=\"003366\"\r\n	color_1=\"E7E7FF\"\r\n	color_2=\"D7E4E0\"}'),(412,56,0.14,'smarty','0','Removed Template specification.',1061881464,2,'127.0.0.1','{tablemanager\r\n	profile_group=\"bug_tracker\"\r\n	style_table=\"gray_bubble\"\r\n	login_required=\"false\"\r\n	heading_color=\"003366\"\r\n	color_1=\"E7E7FF\"\r\n	color_2=\"D7E4E0\"}'),(589,54,0.29,'smarty','0','Copied source from HRCP.',1082495714,1,'208.187.110.149','{assign var=\"pgLayout\" value=\"file:layouts/default.tpl\"}\r\n\r\n<div align=\"center\">{style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px; align=center;\" \r\n	width=\"500\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n<span>\r\n<h2>Administrative Area Main Page</h2>\r\n\r\n<br>These are your site administrative tools.<br><br>\r\nIf you need help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}<br><br>\r\n\r\n<ul>\r\n	<!--\r\n	<li><a href=\"?pg=admin/tmTools\">Table Manager Tools</a></li>\r\n	<li><a href=\"?pg=admin/genEncPass\">Generate Encrypted Password</a></li>\r\n	<li><a href=\"?pg=admin/systeminfo\">SPADE System Info</a></li>\r\n	<li><a href=\"?pg=admin/phpinfo\">PHP Info</a></li>\r\n	-->\r\n\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n			<li><a href=\"?pg={$toc_pageName}\" style=\"color:#003366;\">{$toc_title}</a></li>\r\n		{/literal}\r\n	{/toc_display}\r\n<ul>\r\n\r\n</span>\r\n{/style_table}</div>\r\n'),(590,54,0.30,'smarty','0','Changed to admin layout.',1082496031,1,'208.187.110.149','{assign var=\"pgLayout\" value=\"file:layouts/admin.tpl\"}\r\n\r\n<div align=\"center\">{style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px; align=center;\" \r\n	width=\"500\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n<span>\r\n<h2>Administrative Area Main Page</h2>\r\n\r\n<br>These are your site administrative tools.<br><br>\r\nIf you need help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}<br><br>\r\n\r\n<ul>\r\n	<!--\r\n	<li><a href=\"?pg=admin/tmTools\">Table Manager Tools</a></li>\r\n	<li><a href=\"?pg=admin/genEncPass\">Generate Encrypted Password</a></li>\r\n	<li><a href=\"?pg=admin/systeminfo\">SPADE System Info</a></li>\r\n	<li><a href=\"?pg=admin/phpinfo\">PHP Info</a></li>\r\n	-->\r\n\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n			<li><a href=\"?pg={$toc_pageName}\" style=\"color:#003366;\">{$toc_title}</a></li>\r\n		{/literal}\r\n	{/toc_display}\r\n<ul>\r\n\r\n</span>\r\n{/style_table}</div>\r\n'),(322,50,0.59,'php','0','Page created.',1061380364,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	//echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		//echo \"file = $file\".BR;\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	//echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\n//exit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(325,50,0.62,'php','0','Bug found; added folder to error message.',1061381504,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction checkFolderAccess($folder) {\r\n	global $db, $oAcm;  // DB and ACM objects requireds\r\n\r\n	if (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n		return false;\r\n	}\r\n	\r\n	if (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n		return false;\r\n	}\r\n}\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n\r\n	if (!checkFolderAccess($path))  // Must assert access for each folder\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (@is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	if ($rootPath) {\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	if (!($fp = @fopen($path, \'r\')))\r\n		return;\r\n\r\n	if (!($curData = @fread($fp, filesize($path))))\r\n		return;\r\n	\r\n	fclose($fp);\r\n	$zip->addFile($curData, $zipFileName);\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!checkFolderAccess($folder))\r\n	die (\'Access denied. Path: \' . $folders);\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(345,54,0.14,'smarty','0','Added content...',1061533183,1,'127.0.0.1','{assign var=\"pgLayout\" value=\"file:layouts/admin.tpl\"}\r\n<u><i><b>Administrative Area Main Page</b></i></u>\r\n\r\n\r\n{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n	{literal}\r\n	{unless_first}{/unless_first}<a href=\"?pg={$toc_pageName}\" style=\"position:relative; top:5px; color:#3366CC; font-weight:bold;\">&gt; {$toc_title}</a><br />\r\n	{/literal}\r\n{/toc_display}'),(382,54,0.21,'smarty','0','Swapped back to default Layout, added some page content..',1061588515,3,'192.168.2.25','{assign var=\"pgLayout\" value=\"file:layouts/default.tpl\"}\r\n<h2>Administrative Area Main Page</h2>\r\n\r\n<br>These are your site administrative tools.<br><br>\r\nIf you need help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}\r\n\r\n{* style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px;\" \r\n	width=\"300\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n\r\n	<div> &nbsp; &nbsp; &nbsp; <i><u><b>Pages</b></u></i>:<br></div>\r\n\r\n	<span>\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n		<a href=\"?pg={$toc_pageName}\" style=\"color:#3366CC; font-weight:bold;\">{$toc_title}</a><br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n{/style_table *}'),(338,54,0.13,'smarty','0','Added content...',1061532869,1,'127.0.0.1','{assign var=\"pgLayout\" value=\"file:layouts/admin.tpl\"}\r\n<u><i><b>Administrative Area Main Page</b></i></u>'),(339,45,0.16,'smarty','0','Page created.',1061532882,1,'127.0.0.1','{assign var=\"pgLayout\" value=\"file:layouts/admin.tpl\"}\r\n\r\n{tablemanager\r\n	profile_group=\"admin_tools\"\r\n	style_table=\"gray_bubble\"\r\n	login_required=\"false\"\r\n	heading_color=\"003366\"\r\n	color_1=\"E7E7FF\"\r\n	color_2=\"D7E4E0\"}'),(588,92,0.12,'smarty','0','Page created.',1082493786,1,'24.10.220.247','\r\n<div id=\"chunk_container\" style=\"width:750px;\">\r\n	<h1 class=\"pageHead2\">Example Graph</h1>\r\n	<span class=\"pageIntro2\">Click the \'Next\' button to reload this page and see the graph re-plot itself randomly.</span>\r\n\r\n	<div id=\"chunk_0\" style=\"margin:10px 0px 0px 20px; float:left;\">\r\n		<a href=\"?pg=start_join\"><img src=\"{$skinFolder}images/btn_home.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"?pg=start\"><img src=\"{$skinFolder}images/btn_back.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"?pg=graph\"><img src=\"{$skinFolder}images/btn_next.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"javascript:showHelp();\"><img src=\"{$skinFolder}images/btn_help.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n	</div>\r\n	\r\n	<div id=\"chunk_4\" class=\"box1\" style=\"width:600px; height:200px; float:left;\">\r\n		<h2>Random Points</h2>\r\n		<br />\r\n		{swf src=\"$skinFolder/flash/graph.swf\" width=\"600\" height=\"150\" bgcolor=\"#FFFFFF\"}\r\n	</div>\r\n</div>\r\n\r\n<script language=\"javascript\">{literal}\r\n	function showHelp() {\r\n		alert(\"This is the help message for this page!\\n\\nI want to find something that will look suitable for a quick help note.\")\r\n	}\r\n{/literal}</script>'),(1151,45,0.27,'smarty','0','Hiding widgets.',1086051625,2,'24.2.64.190','{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{if $smarty.request.tm_style_table}\r\n	{session_write var=\"tm_style_table\" value=$smarty.request.tm_style_table}\r\n{/if}\r\n{if $smarty.request.tm_template}\r\n	{session_write var=\"tm_template\" value=$smarty.request.tm_template}\r\n{/if}\r\n\r\n<div align=\"right\">\r\n<form style=\"margin:0px;\" name=\"tmstyleform\" method=\"get\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\nBorder Styles:\r\n<select name=\"tm_style_table\" onchange=\"if(this.value != \'\')this.form.submit();\">\r\n	<option value=\"\">-Change-</option>\r\n	<option value=\"gray\">Gray</option>\r\n	<option value=\"gray_bubble\">Gray Bubble</option>\r\n	<option value=\"blue-white\">Blue-White</option>\r\n	<option value=\"blue-blue\">Blue-Blue</option>\r\n	<option value=\"chrome\">Chrome</option>\r\n	<option value=\"purple-white\">Purple-White</option>\r\n	<option value=\"redlava\">redlava</option>\r\n</select>\r\n&nbsp;&nbsp;\r\nTemplate:\r\n<select name=\"tm_template\" onchange=\"if(this.value != \'\')this.form.submit();\">\r\n	<option value=\"\">-Change-</option>\r\n	<option value=\"default\">Default</option>\r\n	<option value=\"slate\">Slate</option>\r\n</select>\r\n</form>\r\n</div>\r\n\r\n{assign var=\"template\" value=$smarty.session.safe.tm_template|default:\"slate\"}\r\n\r\n\r\n{tablemanager\r\n	Assign=\"tm\"\r\n	Group=\"admin_tools\"\r\n	Profile=\"manage_users\"\r\n	DeleteLogFile=\"tm-delete.log\"\r\n	TemplatePath=\"TM/templates/\"\r\n	StyleTablePath=\"systems/onai/img/st/\"\r\n	StyleTable=$smarty.session.safe.tm_style_table|default:\"gray\"\r\n	AddTemplate=$template|cat:\"_edit.tpl\"\r\n	MainTemplate=$template|cat:\"_main.tpl\"\r\n	ListTemplate=$template|cat:\"_list.tpl\"\r\n	EditTemplate=$template|cat:\"_edit.tpl\"\r\n	Action=\"list\"\r\n	LoginRequired=\"false\"\r\n	HeadingColor=\"90A9C4\"\r\n	HighlightColor=\"F6F9B5\"\r\n	ResultsPerPage=\"20\"\r\n	Color1=\"F7F7F7\"\r\n	Color2=\"E7E7E7\"\r\n	DataStyle=\"hideWrap\"\r\n	MaxStringLength=\"50\"\r\n	DateFormat=\"M j, Y h:i a \"\r\n	}\r\n\r\n'),(310,50,0.47,'php','0','Page created.',1061378146,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo \"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo \"ADDING FILE...\".BR.\"path = $path\".BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(324,50,0.61,'php','0','Added access-level assertion for all evaluated sub folders.',1061381399,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction checkFolderAccess($folder) {\r\n	global $db, $oAcm;  // DB and ACM objects requireds\r\n\r\n	if (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n		return false;\r\n	}\r\n	\r\n	if (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n		return false;\r\n	}\r\n}\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n\r\n	if (!checkFolderAccess($path))  // Must assert access for each folder\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (@is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	if ($rootPath) {\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	if (!($fp = @fopen($path, \'r\')))\r\n		return;\r\n\r\n	if (!($curData = @fread($fp, filesize($path))))\r\n		return;\r\n	\r\n	fclose($fp);\r\n	$zip->addFile($curData, $zipFileName);\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!checkFolderAccess($folder))\r\n	die (\'Access denied.\');\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(689,109,0.12,'smarty','0','Page created.',1083224505,2,'24.10.220.247','{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, fax, or regular 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>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<hr noshade size=\"1\">\r\n<table>\r\n<!--tr>\r\n	<td><span>E-Mail:</span></td>\r\n	<td></td>\r\n</tr-->\r\n<tr>\r\n	<td><span>Phone:</span></td>\r\n	<td><span><strong>1-801-555-5555</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>WeightLossWars, L.L.C. <br>\r\n			123 E Some Street<br>\r\n			Provo, UT 84604</strong></span></td>\r\n</tr>\r\n</table>\r\n\r\n'),(327,50,0.64,'php','0','Added some debugging to checkFolderAccess();',1061381680,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction checkFolderAccess($folder) {\r\n	global $db, $oAcm;  // DB and ACM objects requireds\r\n\r\n	echo \"folder = $folder\".BR;\r\n\r\n	if (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n		echo \"Failed on db query...\";\r\n		return false;\r\n	}\r\n	\r\n	if (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n		echo \"Failed on check Access...\";\r\n		return false;\r\n	}\r\n}\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n\r\n	if (!checkFolderAccess($path))  // Must assert access for each folder\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (@is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	if ($rootPath) {\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	if (!($fp = @fopen($path, \'r\')))\r\n		return;\r\n\r\n	if (!($curData = @fread($fp, filesize($path))))\r\n		return;\r\n	\r\n	fclose($fp);\r\n	$zip->addFile($curData, $zipFileName);\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!checkFolderAccess($folder))\r\n	die (\'Access denied. Path: \' . $folder);\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(326,50,0.63,'php','0','Fixed typo.',1061381546,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction checkFolderAccess($folder) {\r\n	global $db, $oAcm;  // DB and ACM objects requireds\r\n\r\n	if (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n		return false;\r\n	}\r\n	\r\n	if (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n		return false;\r\n	}\r\n}\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n\r\n	if (!checkFolderAccess($path))  // Must assert access for each folder\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (@is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	if ($rootPath) {\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	if (!($fp = @fopen($path, \'r\')))\r\n		return;\r\n\r\n	if (!($curData = @fread($fp, filesize($path))))\r\n		return;\r\n	\r\n	fclose($fp);\r\n	$zip->addFile($curData, $zipFileName);\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!checkFolderAccess($folder))\r\n	die (\'Access denied. Path: \' . $folder);\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(329,50,0.66,'php','1','Moved addFolderToZip() and addFileToZip() to the zip class.',1061410328,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction checkFolderAccess($folder) {\r\n	global $db, $oAcm;  // DB and ACM objects requireds\r\n\r\n	if (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n		return false;\r\n	}\r\n	\r\n	if (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n		return false;\r\n	}\r\n	return true;\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!checkFolderAccess($folder))\r\n	die (\'Access denied. Path: \' . $folder);\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(328,50,0.65,'php','0','Realized the function just needed to return TRUE on success.',1061381728,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction checkFolderAccess($folder) {\r\n	global $db, $oAcm;  // DB and ACM objects requireds\r\n\r\n	if (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n		return false;\r\n	}\r\n	\r\n	if (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n		return false;\r\n	}\r\n	return true;\r\n}\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n\r\n	if (!checkFolderAccess($path))  // Must assert access for each folder\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (@is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	if ($rootPath) {\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	if (!($fp = @fopen($path, \'r\')))\r\n		return;\r\n\r\n	if (!($curData = @fread($fp, filesize($path))))\r\n		return;\r\n	\r\n	fclose($fp);\r\n	$zip->addFile($curData, $zipFileName);\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!checkFolderAccess($folder))\r\n	die (\'Access denied. Path: \' . $folder);\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(602,90,0.13,'smarty','0','chad - change the spelling of Competition',1082501865,1,'128.187.243.81','<div id=\"chunk_container\" style=\"width:945px;\">\r\n	<h1 class=\"pageHead\">Start a Competition</h1>\r\n	<span class=\"pageIntro\">Choose the type of competition you would like to start, or type in the ID and passcode of an existing one you would like to join.</span>\r\n	<div id=\"chunk_1\" class=\"box1\" style=\"margin-left:30px; width:180px; height:200px; float:left;\">\r\n	<h2>Corporate</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=corp\"><img src=\"{$skinFolder}images/corp.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Climb higher on the ladder of success, all the way to the top of your coporation! \r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_2\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Family/Friends</h2>\r\n	<div align=\"center\" class=\"info\">\r\n		<a href=\"?pg=start&type=friends\"><img src=\"{$skinFolder}images/gold.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Dominate a challenge against your close family and friends, its every man for himself!\r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_3\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Partner/Spouse</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=partner\"><img src=\"{$skinFolder}images/gold2.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Face off in a grueling head to head smackdown against a partner or close friend. \r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_4\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Group/Club</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=group\"><img src=\"./img/blank.gif\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Team up with your homies for an ultimate all-out weight-loss rumble. word. \r\n	</div>\r\n	</div>\r\n</div>'),(2784,181,0.15,'smarty','1','Page created.',1103647219,2,'67.166.75.78','<h1>E-Mail Employees</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n{if $smarty.request.fromEmail neq \"\"}{include_php file=\"shared_handle:multiMail\"}{/if}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{select_query assign=\"aGroups\" return=\"array\"}\r\n	g.name, g.description \r\n	FROM _groups g \r\n	WHERE g.ownerId = {$smarty.session.company.userId|default:$user->id}\r\n{/select_query}\r\n\r\n<hr />\r\n\r\n<form name=\"emailForm\" 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<div style=\"width:700px;\">{assign var=\"userName\" value=\"`$user->firstName` `$user->lastName`\"}\r\n<b>From Name:&nbsp;</b><input type=\"text\" name=\"fromName\" value=\"{$smarty.request.fromName|stripslashes|default:$userName}\" /> &nbsp; \r\n<b>From Email:&nbsp;</b><input type=\"text\" name=\"fromEmail\" value=\"{$smarty.request.fromEmail|default:$user->email}\" /><br />\r\n<b>Subject Line:&nbsp;</b><input type=\"text\" name=\"mailSubject\" value=\"{$smarty.request.mailSubject|stripslashes}\" style=\"width:380px;\" /><br /><br />\r\n\r\n<b>Select the Email Groups:</b> <small>(hold <b>CTRL</b> key)</small><br />\r\n<select name=\"toGroups[]\" multiple>{foreach from=$aGroups item=\"row\"}\r\n	<option value=\"{$row.name}\">{$row.name} - {$row.description}</option>{/foreach}\r\n</select><br />\r\n<small><em>* Will not send message to addresses in the OPT-OUT database table.</em></small><br /><br />\r\n\r\n<b>Enter Additional Email Addresses: <small>(comma delimited)</small></b>\r\n<textarea style=\"width:700px;display:block;\" name=\"toAddresses\"></textarea>\r\n<small><em>* These addresses are not checked against the OPT-OUT database table.</em></small><br /><br />\r\n\r\n<b>Enter Plain Text Message Body:</b>\r\n<textarea style=\"width:700px;display:block;height:200px;\" name=\"plainText\">{$smarty.request.plainText|stripslashes}</textarea><br />\r\n\r\n<b>Enter/Paste HTML Message Body:</b>\r\n<textarea style=\"width:700px;display:block;height:200px;\" name=\"mailBody\">{$smarty.request.mailBody|stripslashes}</textarea><br />\r\n\r\n<div style=\"text-align:right;\"><input type=\"button\" value=\"Preview HTML\" onclick=\"previewHTML()\"><input type=\"submit\" name=\"submit\" value=\"Send Now\" /></div>\r\n</div>\r\n\r\n</form>\r\n\r\n<form name=\"previewForm\" method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"multiEmail/preview\">\r\n<input type=\"hidden\" name=\"mailBody\" value=\"\">\r\n</form>\r\n\r\n<script language=\"javascript\">{literal}\r\nfunction previewHTML() {\r\n	dF = document.previewForm;\r\n	dF.mailBody.value = document.emailForm.mailBody.value;	\r\n\r\n	webPreview = parent.window.open(\"index.php?pg=multiEmail/preview\", \"webPreview\", \"fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=640,height=480,left=10,top=10\");\r\n	dF.target = \'webPreview\';\r\n	dF.submit();\r\n	webPreview.focus();\r\n}\r\n{/literal}</script>'),(2785,98,1.49,'smarty','0','Changed group check to look for \'coordinators\' for \'competitions i have started\'',1103649399,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/myhome_layout2.tpl\"}\r\n{include_php file=\"shared_handle:acceptRejectRequests\"} \r\n{include_php file=\"shared_handle:myHome\"}\r\n\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"hideWLWLinks\" value=\"true\"}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{* getProfile is included by getStats *}\r\n{* include_php file=\"shared_handle:getStats\" *}\r\n\r\n{* Now getting only Profile because getStats does TONS of unneccesary processing *}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n\r\n{if $smarty.request.debug}\r\n	{display var=$competitions}\r\n{/if}\r\n\r\n<h1 class=\"underline\">My Home - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n<br />\r\n\r\n{$user->firstName}, this is your personal Wellness &quot;Home&quot;.\r\nFrom this page you can manage the competitions you are in, and update your wellness profile. \r\nClick on the \'Update Profile\' button to change your Motto, and other information about yourself, or \'Account Settings\' to change your password.<br />\r\n<br />\r\n<script language=\"javascript\">{literal}\r\nfunction goNewGraph() {\r\n	var obj = document.getElementById(\'graphDropdown\');\r\n	var url;\r\n\r\n	for (var x = 0; x < obj.options.length; x++) {\r\n		if (obj.options[x].selected)\r\n			url = obj.options[x].value;\r\n	}\r\n\r\n	graphwindow.location.replace(url);\r\n\r\n	obj.selectedIndex = 0;\r\n}{/literal}\r\n</script>\r\n\r\n<table border=\"0\">\r\n<tr>\r\n	<td 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}</span><br />\r\n			<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight}</span><br />\r\n			<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet}\'{$userProfile.heightInches}&quot;</span><br />\r\n			<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI}</span><br />\r\n			<span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight}</span><br />\r\n		<br />\r\n                {* <form name=\"notUsed\" style=\"margin:0px;\">\r\n		<select id=\"graphDropdown\" onchange=\"goNewGraph();\">\r\n			<option value=\"\">(Change Graph)</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&totalChange=1\">Change in Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0\" target=\"graphwindow\">Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</option>\r\n		</select>\r\n		</form> *}\r\n		<h2 class=\"withBG\">Links</h2>\r\n		<small>\r\n		&nbsp;&middot; <a href=\"?pg=tips\">Weight Loss Tips</a><br /> \r\n		&nbsp;&middot; <a href=\"?pg=calculators\">Calculators</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=recipes\">Recipes</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=nutrition\">Nutrition Data</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=ptinfo\">Customized Fitness Plan</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=dietitianinfo\">Personal Nutrition Coach</a><br />\r\n		</small>\r\n                </div>\r\n               	</td>\r\n	<td align=\"center\">\r\n		<div style=\"margin:0px 10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&type=weight&fillPrevious=1&precision=0&totalChange=0&userIds={$userProfile.id}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\r\n		<small>\r\n			<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&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=0\" 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</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</td>\r\n	<td valign=\"top\" width=\"100%\" style=\"padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<h2><i>\"{$userProfile.personalSaying|default:\"Your personal motto goes here.\"|replace:\'\"\':\'\'}\"</i></h2>\r\n		</td>\r\n</tr>\r\n</table>\r\n<br />\r\n{if $smarty.request.hideComps neq \"1\"}\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n{* ********************************* COMPETITIONS I AM IN ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'inComps\', \'\', \'showHide\');\"><img id=\"inComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Am In</h2>\r\nHere are the competitions you have signed up to participate in. If you have an ID of a competition you would like to join, enter it below.<br />\r\n<div id=\"inComps\" style=\"display:block;\">	\r\n	<div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\"><span>&nbsp;<b>ID</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Title</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Type</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Style</b></span></td>\r\n		{* <td class=\"underline2\"><span>&nbsp;<b>Rank</b></span></td> *}\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Time Remaining</b></span></td> *}\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Ends</b></span></td>\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Prize</b></span></td> *}\r\n	</tr>\r\n	{* Set up the warning period... 7 days from now (604800 = 7 days in seconds) *}\r\n	{math assign=\"endsSoon\" equation=\"x + y\" x=$smarty.now y=\"604800\"}\r\n	{foreach from=$competitions item=\"comp\"}\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.title|truncate:35:\"...\"}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{$comp.type|niceText}</small> &nbsp;</span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.style eq \"Group-vs-Group\"}Team{else}Individual{/if}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.rank ne \"N/A\"}{$comp.rank}/{$comp.rankOutOf}{else}N/A{/if}</small> &nbsp;</span></td> *}\r\n		{* <td nowrap><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.timeLeft}</small> &nbsp;</span></td> *}\r\n		<td nowrap=\"nowrap\"><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.endDate|date_format2:\"D n/j/y\"}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\" align=\"right\"><span><small>&nbsp;{if not $comp.potAmount and $comp.potDescription}(Special){else}{math assign=\"fontSizeFactor\" equation=\"x / y\" x=$comp.potAmount y=\"100\"}{math assign=\"fontSize\" equation=\"x + y\" x=\"11\" y=$fontSizeFactor|number_format:\"0\"}<span style=\"font-size:{$fontSize}px;\">${$comp.potAmount|number_format:\"0\"}</span>{/if}</small> &nbsp;</span></td> *}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"6\"><span><small>You have not joined any competitions.</small></span></td>\r\n	</tr>\r\n	{/foreach}\r\n	</table>\r\n	</div>\r\n	<span style=\"margin-left:65px;\"><small>(NOTE: <b>Bold Date</b> = Ended, <span style=\"color:#C00;\"><b>Red Date</b></span> = Ends Soon)</small></span>\r\n\r\n	<div style=\"text-align:right;\">\r\n	<form name=\"joinCompForm\" method=\"post\" style=\"margin:4px;\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"competition/join\" />\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n		<b>Competition ID#</b> <input type=\"text\" class=\"textInput\" name=\"cid\"> <a href=\"javascript:document.joinCompForm.submit();\" class=\"button\">Join</a><br />\r\n	</form>\r\n	</div>\r\n</div>\r\n</td><td valign=\"top\" style=\"margin-left:10px;\">\r\n{* ********************************* COMPETITIONS I HAVE STARTED ********************************** *}\r\n{if $user->inGroupName(\'coordinators\')}\r\n<form name=\"requestsForm\" action=\"index.php\" method=\"post\" 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<input type=\"hidden\" name=\"acceptReject\" value=\"\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myComps\', \'\', \'showHide\');\"><img id=\"myComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Have Started</h2>\r\n\r\n<div id=\"myComps\" style=\"display:block;\">\r\n{if $myCompetitions|@count gt 0}\r\n	<div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>ID</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Title</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Type</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>People wanting to join</b> &nbsp;</span></td>\r\n	</tr>\r\n	{foreach from=$myCompetitions item=\"comp\"}\r\n	<tr>\r\n		<td valign=\"top\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a></small></span></td>\r\n		<td valign=\"top\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.title}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\">&nbsp;<span><small>{$comp.type}</small></td>\r\n		<td valign=\"top\" style=\"border-left:1px solid #000;\"><span>{if $comp.requests|@count}{assign var=\"isRequests\" value=\"true\"}{/if}{foreach from=$comp.requests item=\"request\"}<div class=\"hangingIndent\"><input type=\"checkbox\" name=\"request[{$comp.id}][]\" value=\"{$request.id}\"><small>({$request.dateAdded|date_format2:\"n/j/y\"}) {$request.name} &lt;{mailto address=$request.email encode=\"javascript\"}&gt;: &quot;<i>{$request.comment|strip_tags}</i>&quot;</small></div>{foreachelse}&nbsp;None right now.{/foreach}</span></td>\r\n	</tr>\r\n	{/foreach}\r\n	{if $isRequests}\r\n	<tr>\r\n		<td colspan=\"4\" align=\"center\">\r\n			<span><br /><a href=\"javascript://\" onclick=\"acceptReject.value=\'accept\';requestsForm.submit();return false;\" class=\"button\">Accept Selected</a>\r\n			<a href=\"javascript://\" onclick=\"acceptReject.value=\'reject\';requestsForm.submit();return false;\" class=\"button\">Reject Selected</a><small><br /><br /></small></span></td>\r\n	</tr>\r\n	{/if}\r\n	</table>\r\n	</div>\r\n{else}\r\n	<div class=\"underline2\">&nbsp;</div>\r\n	<small>&nbsp; &nbsp; You have not created any competitions.</small>\r\n{/if}\r\n{/if}\r\n</div>\r\n<br />\r\n</form>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myIncentives\', \'\', \'showHide\');\"><img id=\"myIncentives_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	My Incentives Program</h2>\r\n\r\n<div id=\"myIncentives\" style=\"display:block;\">\r\n        <div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n        <table>\r\n           <tbody>\r\n           <tr><td>Survey #1 - Dec 20th 2004</td></tr>\r\n           <tr><td>Survey #2 - Dec 21st 2004</td></tr>\r\n           <tr><td>Survey #3 - Dec 22nd 2004</td></tr>\r\n           <tr><td>Survey #4 - Dec 23rd 2004</td></tr>\r\n           <tr><td>Survey #5 - Dec 24th 2004</td></tr>\r\n           </tbody>\r\n        </table>\r\n        </div>\r\n</div>\r\n</td></tr></table>\r\n{/if}'),(332,56,0.10,'smarty','0','Page created.',1061473981,1,'127.0.0.1',''),(333,56,0.11,'smarty','0','Page created.',1061474043,1,'127.0.0.1','<h2>Welcome to the Bug Tracker</h2>'),(334,56,0.12,'smarty','0','Page created.',1061474109,1,'127.0.0.1','\r\n{tablemanager\r\n	profile_group=\"bug_tracker\"\r\n	style_table=\"gray_bubble\"\r\n	login_required=\"false\"\r\n	heading_color=\"003366\"\r\n	color_1=\"E7E7FF\"\r\n	color_2=\"D7E4E0\"}'),(311,50,0.48,'php','0','Page created.',1061378185,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo \"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo \"ADDING FILE...\".BR.\"path = $path\".BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(312,50,0.49,'php','0','Page created.',1061378260,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo \"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		/*if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		*/\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo \"ADDING FILE...\".BR.\"path = $path\".BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(313,50,0.50,'php','0','Page created.',1061378374,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo \"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if (is_dir($path.$file))\r\n			; //addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo \"ADDING FILE...\".BR.\"path = $path\".BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(314,50,0.51,'php','0','Page created.',1061378432,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo \"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($path.$file))\r\n			; //addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo \"ADDING FILE...\".BR.\"path = $path\".BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(315,50,0.52,'php','0','Page created.',1061378484,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($path.$file))\r\n			; //addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(316,50,0.53,'php','0','Page created.',1061378503,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($path.$file))\r\n			; //addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(317,50,0.54,'php','0','Page created.',1061378544,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		echo \"file = $file\".BR;\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		echo \"file = $file\".BR;\r\n		if (is_dir($file)) {\r\n			echo \"is dir...\".BR;\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(318,50,0.55,'php','0','Page created.',1061378591,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		echo \"file = $file\".BR;\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file, $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(319,50,0.56,'php','0','Page created.',1061378660,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		echo \"file = $file\".BR;\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nexit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(320,50,0.57,'php','0','Page created.',1061378739,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	//echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		//echo \"file = $file\".BR;\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	//echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\ndisplay($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\n//exit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(321,50,0.58,'php','0','Page created.',1061378866,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	//echo BR.BR.\"ADDING FOLDER...\".BR.\"path = $path\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//return;\r\n	\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		//echo \"file = $file\".BR;\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n		\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	//echo BR.BR.\"ADDING FILE...\".BR.\"path = $path\".BR.BR;\r\n	if ($rootPath) {\r\n		//echo(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\').BR;\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	$fp = fopen($path, \'r\');\r\n	$curData = fread($fp, filesize($path));\r\n	fclose($fp);\r\n	//echo \"zipFileName = $zipFileName\".BR;\r\n	//echo \"rootPath = $rootPath\".BR;\r\n	//echo \"path = $path\".BR;\r\n	$zip->addFile($curData, $zipFileName);\r\n\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n		//$fp = fopen($folder.$file, \'r\');\r\n		//$curData = fread($fp, filesize($folder.$file));\r\n		//fclose($fp);\r\n		//$zipFile->addFile($curData, $file);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	//while ($curData .= fgets($fp)) {\r\n	//	;\r\n	//}\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	//$fileData = $curData;\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\n//exit();\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(323,50,0.60,'php','0','Stripped out debugging comments, suppressed error messages.',1061380987,1,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\n\r\nfunction addFolderToZip(&$zip, $path, $rootPath) {\r\n	if (!$fp = @opendir($path))\r\n		return false;\r\n	\r\n	while ($file = @readdir($fp)) {\r\n		if ($file == \'.\' || $file == \'..\')\r\n			continue;\r\n		if (@is_dir($path.$file))\r\n			addFolderToZip($zip, $path.$file.\'/\', $rootPath);\r\n		else\r\n			addFileToZip($zip, $path.$file, $rootPath);\r\n	}\r\n	closedir($fp);\r\n}\r\n\r\nfunction addFileToZip(&$zip, $path, $rootPath = \"\") {\r\n	if ($rootPath) {\r\n		eval(\'$zipFileName = preg_replace(\"/^\'.preg_replace(\"/([\\/\\\'\\\"\\.])/i\", \"\\\\\\\\$1\", $rootPath).\'/\", \"\", $path);\');\r\n	} else {\r\n		$zipFileName = $path;\r\n	}\r\n	\r\n	if (!($fp = @fopen($path, \'r\')))\r\n		return;\r\n\r\n	if (!($curData = @fread($fp, filesize($path))))\r\n		return;\r\n	\r\n	fclose($fp);\r\n	$zip->addFile($curData, $zipFileName);\r\n}\r\n\r\nif (!$_REQUEST[\'fileList\']) {\r\n	die(\'No files specified.\');\r\n}\r\n\r\n$files = split(\';;\', urldecode($_REQUEST[\'fileList\']));\r\n\r\n$folder = array_pop($files);\r\n\r\nif (!file_exists($folder) || !is_dir($folder)) {\r\n	die (\'Error: Invalid folder passed.\');\r\n}\r\n\r\nif (!$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'$folder\'\", DB_VAL)) {\r\n	die (\'Error: No rules for folder.\');\r\n}\r\n\r\n// Replace .\'s in folder path for root\r\n$folder = preg_replace(\"/^[\\.]{0,1}[\\/]?$/\", \"root/\", $folder);\r\n\r\nif (!$oAcm->checkAccess(\'view\', \'_folders\', $folderId)) {\r\n	die (\'Error: Access denied.\');\r\n}\r\n\r\nif (!$c[\'availableModules\'][\'zipfile\']) { // If zip class is not available, just download first file\r\n	$temp = $files;\r\n	unset($files);\r\n	$files = array($temp[0]);	\r\n} else {\r\n	include_once($c[\'availableModules\'][\'zipfile\']);\r\n}\r\n\r\nif (count($files) > 1 || is_dir($files[0])) {\r\n	// Create a zip file...\r\n	$zipFile = new Zipfile();\r\n	// Add the base files to zip, if a folder, call addFolderToZip();\r\n	// Looping through is neccessary (versus just zipping the folder)\r\n	//  because the entire folder contents may not have been requested\r\n	foreach($files as $file) {\r\n		if (!(file_exists($folder.$file) || is_dir($file))) {\r\n			continue;\r\n		}\r\n		if (is_dir($file)) {\r\n			addFolderToZip($zipFile, $file, $folder);\r\n			continue;\r\n		}\r\n		addFileToZip($zipFile, $folder.$file, $folder);\r\n	}\r\n	$fileData = $zipFile->file();	\r\n	// Replaces .\'s with -\'s and /\'s with _\'s in path\r\n	$fileName = str_replace(\'/\', \'_\', str_replace(\'.\', \'-\', $folder)).\'files.zip\';\r\n} else {\r\n	$file = array_pop($files);\r\n	if (!file_exists($folder.$file))\r\n		die(\'Error: File does not exist.\');\r\n	$fp = fopen($folder.$file, \'r\');\r\n	$fileData = fread($fp, filesize($folder.$file));\r\n	$fileName = $file;\r\n	fclose($fp);\r\n}\r\n\r\nunset($curData);\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\n\r\n\r\necho $fileData;\r\n\r\nexit();\r\n?>\r\n'),(3657,105,1.21,'php','0','tried to get the new layout on this page but couldn\'t',1115336222,16,'128.187.0.164','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n/*// If you want to make the [0] section active, delete this block!\r\nif (!$SPADE[\'acm\']->isDomainAdmin()) {\r\n	$FAQ[0] = $FAQ[1];\r\n	$FAQ[1] = $FAQ[2];\r\n	$FAQ[2] = $FAQ[3];\r\n	unset($FAQ[3]);\r\n}\r\n//Delete through this line*/\r\n\r\n?>\r\n\r\n\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(393,64,0.25,'php','0','Now passing the file to edit.',1061593578,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nforeach($currentConfig as $name=>$config) {\r\n	echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n	if (!$config)\r\n		echo $config.\' (<b>false</b>)\';\r\n	elseif ($config == 1)\r\n		echo $config.\' (<b>true</b>)\';\r\n	elseif (is_array($config))\r\n		display($config);\r\n	else\r\n		echo $config;\r\n	echo \'</td></tr>\'.\"\\n\";\r\n}\r\n?></table><?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(400,64,0.27,'php','0','Phase 1 of adding module details.',1061597491,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($modulePath);\r\n		echo \'<tr><td colspan=\"3\"><span><b><i>\'.niceText($moduleName).\'</i></b></span></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(401,64,0.28,'php','0','Finishing up module details.',1061598851,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><span><b><i>\'.niceText($moduleName).\'</i></b></span></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(1645,144,0.22,'smarty','0','Page created.',1087638098,2,'24.2.105.196','{assign var=\"pgLayout\" value=\"file:layouts/blank.tpl\"}\r\n\r\n{include_php file=\"shared_handle:updateStats\"}\r\n\r\n<h1>Update Stats</h1>\r\n\r\n<form name=\"updateForm\" 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<input type=\"hidden\" name=\"start\" value=\"{$smarty.request.start}\">\r\n<input type=\"hidden\" name=\"userId\" value=\"{$smarty.request.userId}\">\r\n\r\n<table align=\"center\" cellpadding=\"2\" cellspacing=\"1\">\r\n<tr>\r\n	{section loop=\"7\" name=\"day\"}{assign var=\"dayNo\" value=$smarty.section.day.iteration}\r\n		<td width=\"100\" align=\"right\" style=\"border-right:1px solid black; border-bottom:1px solid black;\"><b>{$dayInfo.$dayNo.timestamp|date_format2:\"l\"}</b><br />{$dayInfo.$dayNo.timestamp|date_format2:\"n/j/y\"}</td>\r\n	{/section}\r\n</tr>\r\n<tr>\r\n	{section loop=\"7\" name=\"day\"}{assign var=\"dayNo\" value=$smarty.section.day.iteration}\r\n		<td align=\"right\" style=\"border-right:1px solid black; border-bottom:1px solid black;\"><input type=\"text\" class=\"largeInput\" name=\"day[{$dayNo}][weight]\" value=\"{$dayInfo.$dayNo.weight}\" onfocus=\"this.className=\'largeInputSelected\';\" onblur=\"this.className=\'largeInput\';\"></td>\r\n	{/section}\r\n</tr>\r\n</table>\r\n\r\n</form>\r\n\r\nHere it is! <input type=\"text\" class=\"largeInput\" name=\"blah\" value=\"3\" onfocus=\"this.className=\'largeInputSelected\';\" onblur=\"this.className=\'largeInput\';\">\r\n'),(1646,144,0.23,'smarty','0','Page created.',1087638118,2,'24.2.105.196','{assign var=\"pgLayout\" value=\"file:layouts/blank.tpl\"}\r\n\r\n{include_php file=\"shared_handle:updateStats\"}\r\n\r\n<h1>Update Stats</h1>\r\n\r\n<form name=\"updateForm\" 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<input type=\"hidden\" name=\"start\" value=\"{$smarty.request.start}\">\r\n<input type=\"hidden\" name=\"userId\" value=\"{$smarty.request.userId}\">\r\n\r\n<table align=\"center\" cellpadding=\"2\" cellspacing=\"1\">\r\n<tr>\r\n	{section loop=\"7\" name=\"day\"}{assign var=\"dayNo\" value=$smarty.section.day.iteration}\r\n		<td width=\"85\" align=\"right\" style=\"border-right:1px solid black; border-bottom:1px solid black;\"><b>{$dayInfo.$dayNo.timestamp|date_format2:\"l\"}</b><br />{$dayInfo.$dayNo.timestamp|date_format2:\"n/j/y\"}</td>\r\n	{/section}\r\n</tr>\r\n<tr>\r\n	{section loop=\"7\" name=\"day\"}{assign var=\"dayNo\" value=$smarty.section.day.iteration}\r\n		<td align=\"right\" style=\"border-right:1px solid black; border-bottom:1px solid black;\"><input type=\"text\" class=\"largeInput\" name=\"day[{$dayNo}][weight]\" value=\"{$dayInfo.$dayNo.weight}\" onfocus=\"this.className=\'largeInputSelected\';\" onblur=\"this.className=\'largeInput\';\"></td>\r\n	{/section}\r\n</tr>\r\n</table>\r\n\r\n</form>\r\n\r\nHere it is! <input type=\"text\" class=\"largeInput\" name=\"blah\" value=\"3\" onfocus=\"this.className=\'largeInputSelected\';\" onblur=\"this.className=\'largeInput\';\">\r\n'),(1232,129,0.10,'smarty','0','Page created.',1086304261,2,'208.187.110.149',''),(1233,129,0.11,'smarty','0','Page created.',1086304282,2,'208.187.110.149','<h1>My Shopping Cart</h1>'),(1234,129,0.12,'smarty','0','Page created.',1086304639,2,'208.187.110.149','<h1>My Shopping Cart</h1>\r\n\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n{include_php file=\"shared_handle:cart\"}\r\n\r\n<h2 class=\"withBG\">My Shopping Cart Contents</h2>\r\n\r\n<table align=\"center\">\r\n<tr>\r\n	<td>Product</td>\r\n	<td>Each</td>\r\n	<td>Quantity</td>\r\n	<td>Subtotal</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" /></td>\r\n</tr>\r\n{foreach from=$cart item=\"lineItem\"}\r\n<tr>\r\n	<td>{$product.title}</td>\r\n	<td>${$product.each|number_format:\"2\"}</td>\r\n	<td>{$product.quantity}</td>\r\n	<td>${$product.subtotal|number_format:\"2\"}</td>\r\n</tr>\r\n{foreachelse}\r\n<tr>\r\n	<td colspan=\"4\" align=\"center\">You have no items in your shopping cart.</td>\r\n</tr>\r\n{/foreach}\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" /></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\" align=\"left\"><b>TOTAL:</b></td>\r\n	<td>${$cartTotal|number_format:\"2\"}</td>\r\n</tr>\r\n</table>\r\n'),(1235,129,0.13,'smarty','0','Page created.',1086306855,2,'208.187.110.149','{assign var=\"hideWidgets\" value=\"\"}\r\n{include_php file=\"shared_handle:cart\"}\r\n\r\n<h1>My Shopping Cart</h1>\r\n\r\n<br />\r\n\r\n<table align=\"center\" style=\"width:525px;border:1px solid black;\">\r\n<tr>\r\n	<td><b>Product</b></td>\r\n	<td align=\"right\"><b>Each</b></td>\r\n	<td align=\"right\"><b>Quantity</b></td>\r\n	<td align=\"right\"><b>Subtotal</b></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" color=\"#000000\" /></td>\r\n</tr>\r\n{foreach from=$cart.items item=\"lineItem\"}\r\n<tr>\r\n	<td nowrap=\"nowrap\">{$lineItem.title}</td>\r\n	<td align=\"right\">${$lineItem.each|number_format:\"2\"}</td>\r\n	<td align=\"right\">{$lineItem.quantity}</td>\r\n	<td align=\"right\">${$lineItem.subtotal|number_format:\"2\"}</td>\r\n</tr>\r\n{foreachelse}\r\n<tr>\r\n	<td colspan=\"4\" align=\"center\">You have no items in your shopping cart.</td>\r\n</tr>\r\n{/foreach}\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" color=\"#000000\" /></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\" align=\"left\"><b>TOTAL:</b></td>\r\n	<td align=\"right\">${$cart.total|number_format:\"2\"}</td>\r\n</tr>\r\n</table>\r\n'),(1236,129,0.14,'smarty','0','Page created.',1086306876,2,'208.187.110.149','{assign var=\"hideWidgets\" value=\"\"}\r\n{include_php file=\"shared_handle:cart\"}\r\n\r\n<h1>My Shopping Cart</h1>\r\n\r\n<br />\r\n\r\n<table align=\"center\" style=\"width:525px;border:1px solid black;\">\r\n<tr>\r\n	<td><b>Product</b></td>\r\n	<td align=\"right\"><b>Price</b></td>\r\n	<td align=\"right\"><b>Quantity</b></td>\r\n	<td align=\"right\"><b>Subtotal</b></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" color=\"#000000\" /></td>\r\n</tr>\r\n{foreach from=$cart.items item=\"lineItem\"}\r\n<tr>\r\n	<td nowrap=\"nowrap\">{$lineItem.title}</td>\r\n	<td align=\"right\">${$lineItem.each|number_format:\"2\"}</td>\r\n	<td align=\"right\">{$lineItem.quantity}</td>\r\n	<td align=\"right\">${$lineItem.subtotal|number_format:\"2\"}</td>\r\n</tr>\r\n{foreachelse}\r\n<tr>\r\n	<td colspan=\"4\" align=\"center\">You have no items in your shopping cart.</td>\r\n</tr>\r\n{/foreach}\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" color=\"#000000\" /></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\" align=\"left\"><b>TOTAL:</b></td>\r\n	<td align=\"right\">${$cart.total|number_format:\"2\"}</td>\r\n</tr>\r\n</table>\r\n'),(1237,129,0.15,'smarty','0','Page created.',1086307046,2,'208.187.110.149','{assign var=\"hideWidgets\" value=\"\"}\r\n{include_php file=\"shared_handle:cart\"}\r\n\r\n<h1>My Shopping Cart</h1>\r\n\r\n<br />\r\n\r\n<form name=\"cartUpdate\" 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<table align=\"center\" style=\"width:525px;border:1px solid black;\">\r\n<tr>\r\n	<td><b>Product</b></td>\r\n	<td align=\"right\"><b>Price</b></td>\r\n	<td align=\"right\"><b>Quantity</b></td>\r\n	<td align=\"right\"><b>Subtotal</b></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" color=\"#000000\" /></td>\r\n</tr>\r\n{foreach from=$cart.items key=\"productCode\" item=\"lineItem\"}\r\n<tr>\r\n	<td nowrap=\"nowrap\">{$lineItem.title}</td>\r\n	<td align=\"right\">${$lineItem.each|number_format:\"2\"}</td>\r\n	<td align=\"right\"><input type=\"text\" name=\"qty[{$productCode}]\" size=\"2\" value=\"{$lineItem.quantity}\" /></td>\r\n	<td align=\"right\">${$lineItem.subtotal|number_format:\"2\"}</td>\r\n</tr>\r\n{foreachelse}\r\n<tr>\r\n	<td colspan=\"4\" align=\"center\">You have no items in your shopping cart.</td>\r\n</tr>\r\n{/foreach}\r\n<tr>\r\n	<td colspan=\"4\"><hr noshade size=\"1\" color=\"#000000\" /></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\" align=\"left\"><b>TOTAL:</b></td>\r\n	<td align=\"right\">${$cart.total|number_format:\"2\"}</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"4\"><input type=\"submit\" name=\"submit\" value=\"Update Quantities\" /></td>\r\n</tr>\r\n</table>\r\n\r\n</form>'),(403,64,0.30,'php','0','Added HR\'s to separate the module listings.',1061599166,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(405,64,0.32,'php','0','Added License Year to display.',1061788659,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span><?php echo $temp_c[\'licenseYear\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(381,54,0.20,'smarty','0','Added content...',1061588270,3,'192.168.2.25','{assign var=\"pgLayout\" value=\"file:layouts/default.tpl\"}\r\n<h2>Administrative Area Main Page</h2>\r\n\r\nThese are your administrative tools, if you need any help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}\r\n\r\n{* style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px;\" \r\n	width=\"300\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n\r\n	<div> &nbsp; &nbsp; &nbsp; <i><u><b>Pages</b></u></i>:<br></div>\r\n\r\n	<span>\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n		<a href=\"?pg={$toc_pageName}\" style=\"color:#3366CC; font-weight:bold;\">{$toc_title}</a><br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n{/style_table *}'),(391,54,0.27,'smarty','0','Swapped back to default Layout, added some page content..',1061593222,3,'192.168.2.25','{assign var=\"pgLayout\" value=\"file:layouts/default.tpl\"}\r\n\r\n<div align=\"center\">{style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px; align=center;\" \r\n	width=\"500\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n<span>\r\n<h2>Administrative Area Main Page</h2>\r\n\r\n<br>These are your site administrative tools.<br><br>\r\nIf you need help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}\r\n</span>\r\n{/style_table}</div>\r\n\r\n{* style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px;\" \r\n	width=\"300\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n\r\n	<div> &nbsp; &nbsp; &nbsp; <i><u><b>Pages</b></u></i>:<br></div>\r\n\r\n	<span>\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n		<a href=\"?pg={$toc_pageName}\" style=\"color:#3366CC; font-weight:bold;\">{$toc_title}</a><br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n{/style_table *}'),(392,64,0.24,'php','0','Form was going to \'edit/main\'. Fixed to \'fm/main\'.',1061593405,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nforeach($currentConfig as $name=>$config) {\r\n	echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n	if (!$config)\r\n		echo $config.\' (<b>false</b>)\';\r\n	elseif ($config == 1)\r\n		echo $config.\' (<b>true</b>)\';\r\n	elseif (is_array($config))\r\n		display($config);\r\n	else\r\n		echo $config;\r\n	echo \'</td></tr>\'.\"\\n\";\r\n}\r\n?></table><?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(389,54,0.26,'smarty','0','Swapped back to default Layout, added some page content..',1061593125,3,'192.168.2.25','{assign var=\"pgLayout\" value=\"file:layouts/default.tpl\"}\r\n\r\n{style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px; align=center;\" \r\n	width=\"100%\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n<span>\r\n<h2>Administrative Area Main Page</h2>\r\n\r\n<br>These are your site administrative tools.<br><br>\r\nIf you need help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}\r\n</span>\r\n{/style_table}\r\n\r\n{* style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px;\" \r\n	width=\"300\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n\r\n	<div> &nbsp; &nbsp; &nbsp; <i><u><b>Pages</b></u></i>:<br></div>\r\n\r\n	<span>\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n		<a href=\"?pg={$toc_pageName}\" style=\"color:#3366CC; font-weight:bold;\">{$toc_title}</a><br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n{/style_table *}'),(407,64,0.34,'php','0','Another tweak to license term display (now says December 31,  +year)',1061791424,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span>December 31, <?php echo $c[licenseYear]; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(399,64,0.26,'php','0','Now passing the file to edit.',1061596974,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details. There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(402,64,0.29,'php','0','Added target=\"_blank\" on author-website details.',1061598977,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><span><b><i>\'.niceText($moduleName).\'</i></b></span></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(404,64,0.31,'php','0','Added License Year to display.',1061788596,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseYear\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(406,64,0.33,'php','0','Fixed bug with license year display.',1061789198,2,'127.0.0.1','<?php\r\n$t->_tpl_vars[\'pgLayout\'] = \"file:layouts/admin.tpl\";\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span><?php echo $c[licenseYear]; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(408,9,0.22,'php','1','Removed some unnecessary comments.',1061876303,2,'127.0.0.1','<?php\r\n// Cancel out the default layout.\r\n$t->assign(\"pgLayout\", \"don\'t use one\");\r\nif (!$_REQUEST[\'historyId\']) {\r\n	die(\'No id specified.\');\r\n}\r\n$Q = \"	SELECT\r\n		h.id, h.pageId, h.version, h.isActive, h.comment, h.dateModified, h.content, h.contentType,\r\n		t.pageName AS name, t.title, t.id AS tocId,\r\n		u.username\r\n	FROM\r\n		_page_history h\r\n		LEFT JOIN _users u ON (h.userId = u.id)\r\n		LEFT JOIN _pages p ON (p.id = h.pageId)\r\n		LEFT JOIN _toc t ON (t.pageId = p.id)\r\n	WHERE\r\n		h.id = \'\".$_REQUEST[\'historyId\'].\"\'\r\n	ORDER BY\r\n		h.version DESC\";\r\n\r\n$thisHistory = $db->query($Q, DB_ROW);\r\n\r\nif (!is_array($thisHistory)) {\r\n	die (\"Page history content not found.\");\r\n}\r\n\r\nif (!($oAcm->checkAccess(\'edit\', \'_toc\', $thisHistory[\'tocId\']) && $oAcm->checkAccess(\'changeVersions\', \'_toc\', $thisHistory[\'tocId\']))) {\r\n	die (\'Access denied.\');\r\n}\r\n\r\n$fileName = $aConstants[\'VANITY\'].\'-\'.$thisHistory[\'name\'].\'_v\'.str_replace(\'.\', \'-\', $thisHistory[\'version\']).\'.\';\r\nswitch($thisHistory[\'contentType\']) {\r\n	case \'php\' : $ext = \'php\'; break;\r\n	case \'file\' :\r\n	case \'smarty\' : $ext = \'tpl\'; break;\r\n	case \'text\' : $ext = \'txt\'; break;\r\n	case \'xml\' : $ext = \'xml\'; break;\r\n	default: $ext = \'txt\';\r\n}\r\n$fileName .= $ext;\r\n\r\nheader(\'Cache-Control: public\'); // no-cache, must-revalidate\');\r\nheader(\"Content-type: application/octet-stream\");\r\nheader(\"Content-Disposition: attachment; filename=\\\"\".$fileName.\"\\\"\");\r\necho $thisHistory[\'content\'];\r\n\r\n// Now send through the data...\r\nexit();\r\n?>\r\n'),(409,45,0.17,'smarty','0','Removed layout specification.',1061881254,2,'127.0.0.1','{tablemanager\r\n	profile_group=\"admin_tools\"\r\n	style_table=\"gray_bubble\"\r\n	login_required=\"false\"\r\n	heading_color=\"003366\"\r\n	color_1=\"E7E7FF\"\r\n	color_2=\"D7E4E0\"}'),(594,45,0.19,'smarty','0','Updated to version from Kevins Laptop (12.02.03)',1082497249,1,'208.187.110.149','{assign var=\"pgLayout\" value=\"file:layouts/admin.tpl\"}\r\n\r\n{tablemanager\r\n	Assign=\"tm\"\r\n	Group=\"admin_tools\"\r\n	Profile=\"manage_users\"\r\n	DeleteLogFile=\"tm-delete.log\"\r\n	TemplatePath=\"TM/templates/\"\r\n	StyleTablePath=\"systems/onai/img/st/\"\r\n	StyleTable=\"gray_bubble\"\r\n	AddTemplate=\"default_edit.tpl\"\r\n	Action=\"list\"\r\n	LoginRequired=\"false\"\r\n	HeadingColor=\"336699\"\r\n	HighlightColor=\"BBBBFF\"\r\n	ResultsPerPage=\"20\"\r\n	Color1=\"E7E7FF\"\r\n	Color2=\"E0E0F0\"\r\n	}'),(413,64,0.35,'php','0','Removed template specification.',1061881483,2,'127.0.0.1','<?php\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $currentConfig[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span>December 31, <?php echo $c[licenseYear]; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(415,65,0.10,'smarty','0','Page created.',1062047849,1,'127.0.0.1',''),(416,65,0.11,'smarty','1','Page created.',1062047932,1,'127.0.0.1','<span>This is the main page for core components.<br><b>DO NOT DELETE THIS PAGE OR ANY PAGES UNDERNEATH IT UNLESS YOU KNOW WHAT YOU ARE DOING.</b></span>'),(2914,98,1.85,'smarty','0','Made participation points area not show up if the company isn\'t using it.',1104407843,2,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/myhome_layout2.tpl\"}\r\n{include_php file=\"shared_handle:acceptRejectRequests\"} \r\n{include_php file=\"shared_handle:myHome\"}\r\n\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"hideWLWLinks\" value=\"true\"}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{* getProfile is included by getStats *}\r\n{* include_php file=\"shared_handle:getStats\" *}\r\n\r\n{* Now getting only Profile because getStats does TONS of unneccesary processing *}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n\r\n{if $smarty.request.debug}\r\n	{display var=$competitions}\r\n{/if}\r\n\r\n<h1 class=\"underline\">My Home - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n<br />\r\n\r\n{$user->firstName}, this is your personal Wellness &quot;Home&quot;.\r\nFrom this page you can manage the competitions you are in, and update your wellness profile. \r\nClick on the \'Update Profile\' button to change your Motto, and other information about yourself, or \'Account Settings\' to change your password.<br />\r\n<br />\r\n<script language=\"javascript\">{literal}\r\nfunction goNewGraph() {\r\n	var obj = document.getElementById(\'graphDropdown\');\r\n	var url;\r\n\r\n	for (var x = 0; x < obj.options.length; x++) {\r\n		if (obj.options[x].selected)\r\n			url = obj.options[x].value;\r\n	}\r\n\r\n	graphwindow.location.replace(url);\r\n\r\n	obj.selectedIndex = 0;\r\n}{/literal}\r\n</script>\r\n\r\n<table border=\"0\">\r\n<tr>\r\n	<td 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}</span><br />\r\n			<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight}</span><br />\r\n			<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet}\'{$userProfile.heightInches}&quot;</span><br />\r\n			<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI}</span><br />\r\n			<span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight}</span><br />\r\n		<br />\r\n                {* <form name=\"notUsed\" style=\"margin:0px;\">\r\n		<select id=\"graphDropdown\" onchange=\"goNewGraph();\">\r\n			<option value=\"\">(Change Graph)</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&totalChange=1\">Change in Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0\" target=\"graphwindow\">Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</option>\r\n		</select>\r\n		</form> *}\r\n		<h2 class=\"withBG\">Links</h2>\r\n		<small>\r\n		&nbsp;&middot; <a href=\"?pg=tips\">Weight Loss Tips</a><br /> \r\n		&nbsp;&middot; <a href=\"?pg=calculators\">Calculators</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=recipes\">Recipes</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=nutrition\">Nutrition Data</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=ptinfo\">Customized Fitness Plan</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=dietitianinfo\">Personal Nutrition Coach</a><br />\r\n		</small>\r\n                </div>\r\n               	</td>\r\n	<td align=\"center\">\r\n		<div style=\"margin:0px 10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&type=weight&fillPrevious=1&precision=0&totalChange=0&userIds={$userProfile.id}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\r\n		<small>\r\n			<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&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=0\" 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</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</td>\r\n	<td valign=\"top\" width=\"100%\" style=\"padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<h2><i>\"{$userProfile.personalSaying|default:\"Your personal motto goes here.\"|replace:\'\"\':\'\'}\"</i></h2>\r\n		</td>\r\n</tr>\r\n</table>\r\n<br />\r\n{if $smarty.request.hideComps neq \"1\"}\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n{* ********************************* COMPETITIONS I AM IN ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'inComps\', \'\', \'showHide\');\"><img id=\"inComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Am In</h2>\r\nHere are the competitions you have signed up to participate in. If you have an ID of a competition you would like to join, enter it below.<br />\r\n<div id=\"inComps\" style=\"display:block;\">	\r\n	<div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\"><span>&nbsp;<b>ID</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Title</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Type</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Style</b></span></td>\r\n		{* <td class=\"underline2\"><span>&nbsp;<b>Rank</b></span></td> *}\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Time Remaining</b></span></td> *}\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Ends</b></span></td>\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Prize</b></span></td> *}\r\n	</tr>\r\n	{* Set up the warning period... 7 days from now (604800 = 7 days in seconds) *}\r\n	{math assign=\"endsSoon\" equation=\"x + y\" x=$smarty.now y=\"604800\"}\r\n	{foreach from=$competitions item=\"comp\"}\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.title|truncate:35:\"...\"}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{$comp.type|niceText}</small> &nbsp;</span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.style eq \"Group-vs-Group\"}Team{else}Individual{/if}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.rank ne \"N/A\"}{$comp.rank}/{$comp.rankOutOf}{else}N/A{/if}</small> &nbsp;</span></td> *}\r\n		{* <td nowrap><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.timeLeft}</small> &nbsp;</span></td> *}\r\n		<td nowrap=\"nowrap\"><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.endDate|date_format2:\"D n/j/y\"}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\" align=\"right\"><span><small>&nbsp;{if not $comp.potAmount and $comp.potDescription}(Special){else}{math assign=\"fontSizeFactor\" equation=\"x / y\" x=$comp.potAmount y=\"100\"}{math assign=\"fontSize\" equation=\"x + y\" x=\"11\" y=$fontSizeFactor|number_format:\"0\"}<span style=\"font-size:{$fontSize}px;\">${$comp.potAmount|number_format:\"0\"}</span>{/if}</small> &nbsp;</span></td> *}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"6\"><span><small>You have not joined any competitions.</small></span></td>\r\n	</tr>\r\n	{/foreach}\r\n	</table>\r\n	</div>\r\n	<span style=\"margin-left:65px;\"><small>(NOTE: <b>Bold Date</b> = Ended, <span style=\"color:#C00;\"><b>Red Date</b></span> = Ends Soon)</small></span>\r\n\r\n	<div style=\"text-align:right;\">\r\n	<form name=\"joinCompForm\" method=\"post\" style=\"margin:4px;\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"competition/join\" />\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n		<b>Competition ID#</b> <input type=\"text\" class=\"textInput\" name=\"cid\"> <a href=\"javascript:document.joinCompForm.submit();\" class=\"button\">Join</a><br />\r\n	</form>\r\n	-<i>or</i>- see a list of all <a href=\"?pg=availableCompetitions\">Available Competitions</a>!\r\n	</div>\r\n</div>\r\n</td><td valign=\"top\" style=\"margin-left:10px;\">\r\n{* ********************************* COMPETITIONS I HAVE STARTED ********************************** *}\r\n{if $user->inGroupName(\'coordinators\')}\r\n<form name=\"requestsForm\" action=\"index.php\" method=\"post\" 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<input type=\"hidden\" name=\"acceptReject\" value=\"\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myComps\', \'\', \'showHide\');\"><img id=\"myComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Have Started</h2>\r\n\r\n<div id=\"myComps\" style=\"display:block;\">\r\n{if $myCompetitions|@count gt 0}\r\n	<div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>ID</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Title</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Type</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>People wanting to join</b> &nbsp;</span></td>\r\n	</tr>\r\n	{foreach from=$myCompetitions item=\"comp\"}\r\n	<tr>\r\n		<td valign=\"top\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\" style=\"overflow:hidden;\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.title}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\">&nbsp;<span><small>{$comp.type}</small></td>\r\n		<td valign=\"top\" style=\"border-left:1px solid #000;\"><span>{if $comp.requests|@count}{assign var=\"isRequests\" value=\"true\"}{/if}{foreach from=$comp.requests item=\"request\"}<div class=\"hangingIndent\"><input type=\"checkbox\" name=\"request[{$comp.id}][]\" value=\"{$request.id}\"><small>({$request.dateAdded|date_format2:\"n/j/y\"}) {$request.name} &lt;{mailto address=$request.email encode=\"javascript\"}&gt;: &quot;<i>{$request.comment|strip_tags}</i>&quot;</small></div>{foreachelse}&nbsp;None right now.{/foreach}</span></td>\r\n	</tr>\r\n	{/foreach}\r\n	{if $isRequests}\r\n	<tr>\r\n		<td colspan=\"4\" align=\"center\">\r\n			<span><br /><a href=\"javascript://\" onclick=\"acceptReject.value=\'accept\';requestsForm.submit();return false;\" class=\"button\">Accept Selected</a>\r\n			<a href=\"javascript://\" onclick=\"acceptReject.value=\'reject\';requestsForm.submit();return false;\" class=\"button\">Reject Selected</a><small><br /><br /></small></span></td>\r\n	</tr>\r\n	{/if}\r\n	</table>\r\n	</div>\r\n{else}\r\n	<div class=\"underline2\">&nbsp;</div>\r\n	<small>&nbsp; &nbsp; You have not created any competitions.</small>\r\n{/if}\r\n{/if}\r\n</div>\r\n<br />\r\n</form>\r\n\r\n{* ********************************* INCENTIVES PROGRAM ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myIncentives\', \'\', \'showHide\');\"><img id=\"myIncentives_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	My Incentives Program</h2>\r\n\r\n<div id=\"myIncentives\" style=\"display:block;\">\r\n        <div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	\r\n	{include_php file=\"shared_handle:company/participationPoints\"}\r\n\r\n	{if $scores|@count gt 0}\r\n	<h3>Participation Points</h3>\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           <thead>\r\n               <tr><td width=\"100%\"><u> Category </u></td><td><u> Points </u></td><td nowrap><u> Total </u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$scores item=\"score\" key=\"category\" name=\"loopScores\"}<tr><td nowrap>\r\n		<small>{$category|niceText}</small></td><td align=\"right\"><small>{$score}</small></td>\r\n		{if $smarty.foreach.loopScores.first}<td rowspan=\"999\" align=\"center\"><em>{$participationPointsEarned|default:0}</em></td>{/if}</tr>\r\n           {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n           {/foreach}\r\n           </tbody>\r\n        </table>\r\n	<div class=\"underline\"></div>\r\n	<br />\r\n	{/if}\r\n\r\n	<h3>Survey Points</h3>\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           {include_php file=\"shared_handle:company/surveyList\"}\r\n           <thead>\r\n               <tr><td width=\"100%\"><u> Survey Name </u></td><td><u> Available </u></td><td nowrap><u> Total </u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n		{if $item.dateAvailable gt 0}\r\n		<small>{$item.surveyName}</small></td><td align=\"center\"><small>{$item.dateAvailable|date_format2:\"m/d/y\"}</small></td>\r\n		{else}\r\n		<small><a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">{$item.surveyName}</a></small></td><td align=\"center\"><small>Now</small></td>\r\n		{/if}{if $smarty.foreach.loopSurveys.first}<td rowspan=\"999\" align=\"center\"><em>{$surveyPointsEarned|default:0}</em></td>{/if}</tr>\r\n                {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n               {/foreach}\r\n           </tbody>\r\n        </table>\r\n	<div class=\"underline\"></div>\r\n	<span><small><a href=\"javascript://\" onclick=\"viewSurveys();\">View My Survey History</a></small></span>\r\n	\r\n	<br /><br />\r\n	<div align=\"right\"><b>Your total points: </b><span style=\"font-size:18px;font-weight:bold;border:1px solid gray;padding:3px;\">{$surveyPointsEarned+$participationPointsEarned}</span></div>\r\n\r\n        </div>\r\n</div>\r\n</td></tr></table>\r\n{/if}'),(426,54,0.28,'smarty','0','Swapped back to default Layout, added some page content..',1062093316,1,'127.0.0.1','<div align=\"center\">{style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px; align=center;\" \r\n	width=\"500\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n<span>\r\n<h2>Administrative Area Main Page</h2>\r\n\r\n<br>These are your site administrative tools.<br><br>\r\nIf you need help or have any questions, you can contact us at: {mailto address=\"support@onai.net\" encode=\"javascript\" subject=\"Admin Help\"}\r\n</span>\r\n{/style_table}</div>\r\n\r\n{* style_table \r\n	folder=\"`$skinFolder`img/st/gray_bubble\" \r\n	cell_style=\"background-color:#E5E5E5; padding:10px;\" \r\n	table_style=\"margin:15px;\" \r\n	width=\"300\" \r\n	cell_align=\"left\" \r\n	cell_valign=\"middle\"}\r\n\r\n	<div> &nbsp; &nbsp; &nbsp; <i><u><b>Pages</b></u></i>:<br></div>\r\n\r\n	<span>\r\n	{toc_display start_id=$page.id level_limit=1 hide_start=1}\r\n		{literal}\r\n		<a href=\"?pg={$toc_pageName}\" style=\"color:#3366CC; font-weight:bold;\">{$toc_title}</a><br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n{/style_table *}'),(593,49,0.15,'php','0','Copied version with our formatting.',1082497227,1,'208.187.110.149','<style type=\"text/css\"><!--\r\nbody {background-color: #ffffff; color: #000000;}\r\nbody, td, th, h1, h2 {font-family: sans-serif;}\r\npre {margin: 0px; font-family: monospace;}\r\ntable {border-collapse: collapse;}\r\n.center {text-align: center;}\r\n.center table { margin-left: auto; margin-right: auto; text-align: left;}\r\n.center th { text-align: center; !important }\r\ntd, th { border: 0px solid #000000; font-size: 75%; vertical-align: baseline;}\r\n.phpinfo { border: 1px solid #999999; font-size: 11px; }\r\n.p {text-align: left;}\r\n.e {background-color: #ccccff; font-weight: bold;}\r\n.h {background-color: #9999cc; font-weight: bold;}\r\n.v {background-color: #cccccc;}\r\ni {color: #666666;}\r\nimg {float: right; border: 0px;}\r\n//--></style>\r\n<?php\r\n\r\n\r\n$SPADE[\'template\']->_tpl_vars[\'pgLayout\'] = \'file:layouts/admin.tpl\';\r\n\r\n\r\nob_start();\r\nphpinfo();\r\n$php_info = ob_get_contents();\r\nob_end_clean();\r\n\r\n$php_info = preg_replace(\"/<!doctype.*?[>].*?<body.*?[>]/is\", \'\', $php_info);\r\n$php_info = preg_replace(\"/<\\/body>.*/is\", \'\', $php_info);\r\n$php_info = preg_replace(\"/<(t[dh])/i\", \'<$1 class=\"phpinfo\"\', $php_info);\r\n\r\necho $php_info;\r\n//echo \'<pre>\'.htmlspecialchars($php_info).\'</pre>\';\r\n?>'),(592,64,0.37,'php','0','Removed template specification.',1082497212,1,'208.187.110.149','<?php\r\n\r\n$SPADE[\'template\']->_tpl_vars[\'pgLayout\'] = \'file:layouts/admin.tpl\';\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $c[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span>December 31, <?php echo $c[licenseYear]; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(439,64,0.36,'php','0','Removed template specification.',1062207144,1,'127.0.0.1','<?php\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $c[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span>December 31, <?php echo $c[licenseYear]; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(580,90,0.10,'smarty','0','Page created.',1082439320,1,'24.2.101.222',''),(581,90,0.11,'smarty','0','Page created.',1082439409,1,'24.2.101.222','{assign var=\"pgLayout\" value=\"file:layouts/content.tpl\"}\r\n<div id=\"chunk_container\" style=\"width:945px;\">\r\n	<h1 class=\"pageHead\">Start a Competetion</h1>\r\n	<span class=\"pageIntro\">Choose the type of competition you would like to start, or type in the ID and passcode of an existing one you would like to join.</span>\r\n	<div id=\"chunk_1\" class=\"box1\" style=\"margin-left:30px; width:180px; height:200px; float:left;\">\r\n	<h2>Corporate</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=corp\"><img src=\"{$skinFolder}images/corp.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Climb higher on the ladder of success, all the way to the top of your coporation! \r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_2\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Family/Friends</h2>\r\n	<div align=\"center\" class=\"info\">\r\n		<a href=\"?pg=start&type=friends\"><img src=\"{$skinFolder}images/gold.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Dominate a challenge against your close family and friends, its every man for himself!\r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_3\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Partner/Spouse</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=partner\"><img src=\"{$skinFolder}images/gold2.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Face off in a grueling head to head smackdown against a partner or close friend. \r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_4\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Group/Club</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=group\"><img src=\"./img/blank.gif\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Team up with your homies for an ultimate all-out weight-loss rumble. word. \r\n	</div>\r\n	</div>\r\n</div>'),(2781,120,0.21,'smarty','0','Page created.',1103588357,2,'67.166.75.78','{assign var=\"pgLayout\" value=\"00Null00\"}\r\n<html>\r\n<head><title>Calendar</title></head>\r\n<body style=\"margin:0px;\">\r\n{assign var=\"currentYear\" value=$smarty.now|date_format2:\"Y\"}\r\n{assign var=\"currentMonth\" value=$smarty.now|date_format2:\"m\"}\r\n{assign var=\"currentDay\" value=$smarty.now|date_format2:\"j\"}\r\n{assign var=\"url_format\" value=$blah|cat:\"?year=%Y&month=%m&day=%d\"|cat:\"&pg=`$page.name`\"}\r\n{assign var=\"year\" value=$smarty.request.year|default:$currentYear}\r\n{assign var=\"month\" value=$smarty.request.month|default:$currentMonth}\r\n{assign var=\"day\" value=$smarty.request.day|default:$currentDay}\r\n<table width=\"100%\" height=\"100%\">\r\n<tr><td align=\"center\" valign=\"top\"\r\n	>{calendar \r\n	url_format=$url_format\r\n	year=$year\r\n	month=$month\r\n	day=$day}{include file=\"file:./layouts/calendar.tpl\" parentForm=$smarty.request.parentForm targetName=$smarty.request.targetName targetViewableName=$smarty.request.targetViewableName}</td>\r\n</tr>\r\n</table>\r\n</body>\r\n</html>'),(2782,91,0.84,'smarty','0','Adding weekly winners category selection',1103588878,2,'67.166.75.78','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 1</h1>\r\n<p>In this first step you will select the competition arena, all the detials of your competition, and the type of invitation letter you want to send. Then click \'Next\'</p>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\', \'showHide\');\"><img id=\"selectComp_img\" src=\"./img/blank.gif\" width=\"48\" height=\"17\" class=\"showHide_{if $newcomp.hideSelectComp eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Select a Competition Arena:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\', \'showHide\');\"><img id=\"selectParams_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectParams eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Details:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Title:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[title]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Give your competition a title.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&parentForm=jelly&targetName=newcomp[startDate]&targetViewableName=newcomp[startDateViewable]&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Type:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Belly to Belly</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Award Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Each competitor Donates</option>\r\n			<option value=\"Individual Charity\">I will supply the prize</option>\r\n			<option value=\"Company Charity\">My Company will supply the prize</option>\r\n			<option value=\"Other-None\">Other-None</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>The Award can be pooled together by everyone, or you can supply it all yourself by selecting \"I will supply the prize\".</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Contribution Amount:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Enter the amount that each competitor will need to agree to pay to the winner, or if you are supplying it all yourself, enter that amount! (This amount is not collected by WeightLossWars, it is only displayed to provide motivation)</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Description:</div></td>\r\n		<td valign=\"middle\"><input type=\"text\" name=\"newcomp[potDescription]\" class=\"textInput\" size=\"22\" maxlength=\"255\" style=\"width:220px;\"  /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>(optional) Enter a brief description of the Award.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>The Judging Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Weekly Winners Method 1:</div></td>\r\n		<td><select name=\"newcomp[weeklyWinnersMethod1]\" size=\"1\" onchange=\"updateWeeklyWinnersMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"\">-- None --</option>\r\n			<option value=\"Weight Lost\"{if not $newcomp.weeklyWinnersMethod1} selected{/if}>Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Weekly winners will be displayed, based on this stat.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Weekly Winners Method 2:</span></td>\r\n		<td><select name=\"newcomp[weeklyWinnersMethod2]\" size=\"1\" onchange=\"updateWeeklyWinnersMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"\">-- None --</option>\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\"{if not $newcomp.weeklyWinnersMethod2} selected{/if}>Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Additional weekly winners category.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\', \'showHide\');\"><img id=\"selectInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send. You can smack talk them to get their blood boiling, send them a motivating challenge, or a friendly, inspiring invitation.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;Hey Blubber Butt,I challenge you to the battle of all battles...&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $100 that says I can take you down in a 6-week weight-loss competition...&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;A healthy weight loss challenge is what we all need to lose these extra pounds...&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex == 0) {\r\n				other.selectedIndex = 1;\r\n			} else {\r\n				other.selectedIndex = 0;\r\n			}\r\n		}		\r\n	}\r\n	\r\n	function updateWeeklyWinnersMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[weeklyWinnersMethod1]\') ? \'newcomp[weeklyWinnersMethod2]\' : \'newcomp[weeklyWinnersMethod1]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex > 0) {\r\n				other.selectedIndex--;\r\n			}/* else {\r\n				other.selectedIndex = 0;\r\n			}*/\r\n		}\r\n\r\n		if (name == \'newcomp[weeklyWinnersMethod2]\' && obj.selectedIndex > 0 && other.selectedIndex == 0) {\r\n			other.selectedIndex = obj.selectedIndex;\r\n			obj.selectedIndex = 0;\r\n		} else if (name == \'newcomp[weeklyWinnersMethod1]\' && obj.selectedIndex == 0 && other.selectedIndex > 0) {\r\n			obj.selectedIndex = other.selectedIndex;\r\n			other.selectedIndex = 0;\r\n		}\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(584,92,0.10,'smarty','0','Page created.',1082439463,1,'24.2.101.222',''),(585,92,0.11,'smarty','0','Page created.',1082439480,1,'24.2.101.222','{assign var=\"pgLayout\" value=\"file:layouts/content.tpl\"}\r\n<div id=\"chunk_container\" style=\"width:750px;\">\r\n	<h1 class=\"pageHead2\">Example Graph</h1>\r\n	<span class=\"pageIntro2\">Click the \'Next\' button to reload this page and see the graph re-plot itself randomly.</span>\r\n\r\n	<div id=\"chunk_0\" style=\"margin:10px 0px 0px 20px; float:left;\">\r\n		<a href=\"?pg=start_join\"><img src=\"{$skinFolder}images/btn_home.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"?pg=start\"><img src=\"{$skinFolder}images/btn_back.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"?pg=graph\"><img src=\"{$skinFolder}images/btn_next.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"javascript:showHelp();\"><img src=\"{$skinFolder}images/btn_help.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n	</div>\r\n	\r\n	<div id=\"chunk_4\" class=\"box1\" style=\"width:600px; height:200px; float:left;\">\r\n		<h2>Random Points</h2>\r\n		<br />\r\n		{swf src=\"$skinFolder/flash/graph.swf\" width=\"600\" height=\"150\" bgcolor=\"#FFFFFF\"}\r\n	</div>\r\n</div>\r\n\r\n<script language=\"javascript\">{literal}\r\n	function showHelp() {\r\n		alert(\"This is the help message for this page!\\n\\nI want to find something that will look suitable for a quick help note.\")\r\n	}\r\n{/literal}</script>'),(586,90,0.12,'smarty','0','Page created.',1082493555,1,'24.10.220.247','<div id=\"chunk_container\" style=\"width:945px;\">\r\n	<h1 class=\"pageHead\">Start a Competetion</h1>\r\n	<span class=\"pageIntro\">Choose the type of competition you would like to start, or type in the ID and passcode of an existing one you would like to join.</span>\r\n	<div id=\"chunk_1\" class=\"box1\" style=\"margin-left:30px; width:180px; height:200px; float:left;\">\r\n	<h2>Corporate</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=corp\"><img src=\"{$skinFolder}images/corp.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Climb higher on the ladder of success, all the way to the top of your coporation! \r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_2\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Family/Friends</h2>\r\n	<div align=\"center\" class=\"info\">\r\n		<a href=\"?pg=start&type=friends\"><img src=\"{$skinFolder}images/gold.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Dominate a challenge against your close family and friends, its every man for himself!\r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_3\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Partner/Spouse</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=partner\"><img src=\"{$skinFolder}images/gold2.jpg\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Face off in a grueling head to head smackdown against a partner or close friend. \r\n	</div>\r\n	</div>\r\n	\r\n	<div id=\"chunk_4\" class=\"box1\" style=\"width:180px; height:200px; float:left;\">\r\n	<h2>Group/Club</h2>\r\n	<div align=\"center\">\r\n		<a href=\"?pg=start&type=group\"><img src=\"./img/blank.gif\" width=\"130\" height=\"100\" alt=\"\" class=\"img1\" /></a><br />\r\n		Team up with your homies for an ultimate all-out weight-loss rumble. word. \r\n	</div>\r\n	</div>\r\n</div>'),(603,95,0.12,'smarty','0','Page created.',1082507721,1,'128.187.243.81','<b>Hi julie</b>'),(604,95,0.13,'smarty','0','Page created.',1082507744,1,'128.187.243.81','<h1><b>Hi </h1>julie</b>'),(605,95,0.14,'smarty','0','Page created.',1082507745,1,'128.187.243.81','<h1><b>Hi </h1>julie</b>'),(606,56,0.15,'smarty','0','Removed Template specification.',1082516235,1,'24.2.101.222','{assign var=\"pgLayout\" value=\"file:layouts/bugtracker.tpl\"}\r\n\r\n{if not $template}\r\n	{assign var=\"template\" value=\"slate\"}\r\n{/if}\r\n\r\n{include_php file=\"module:browser\"}\r\n\r\n{if not $user->isLoggedIn()}\r\n	{message type=\"error\" value=\"You must be logged in to view this page.\"}\r\n{else}\r\n	{tablemanager\r\n		Assign=\"tm\"\r\n		Group=\"bug_tracker\"\r\n		Profile=\"bug_track_active\"\r\n		DeleteLogFile=\"tm-delete.log\"\r\n		TemplatePath=\"TM/templates/\"\r\n		StyleTablePath=\"systems/onai/img/st/\"\r\n		StyleTable=$smarty.session.safe.tm_style_table|default:\"gray\"\r\n		AddTemplate=$template|cat:\"_edit.tpl\"\r\n		MainTemplate=$template|cat:\"_main.tpl\"\r\n		ListTemplate=$template|cat:\"_list.tpl\"\r\n		EditTemplate=$template|cat:\"_edit.tpl\"\r\n		CommitPrehandler=\"prehandle.commit-bugs.php\"\r\n		CommitPosthandler=\"posthandle.commit-bugs.php\"\r\n		EditPrehandler=\"prehandle.edit-bugs.php\"\r\n		Action=\"list\"\r\n		LoginRequired=\"true\"\r\n		HeadingColor=\"7089A4\"\r\n		HighlightColor=\"F6F9D5\"\r\n		ResultsPerPage=\"20\"\r\n		Color1=\"F7F7F7\"\r\n		Color2=\"E7E7E7\"\r\n		DataStyle=\"hideWrap\"\r\n		MaxStringLength=\"50\"\r\n		DateFormat=\"D m/d/y h:i a \"\r\n		}\r\n{/if}'),(454,71,0.10,'smarty','0','Page created.',1062274633,1,'127.0.0.1',''),(455,71,0.11,'smarty','0','Page created.',1062274817,1,'127.0.0.1','<span>The requested document was not found on this site.</span>'),(457,71,0.12,'smarty','0','Page created.',1062276661,1,'127.0.0.1','<h2>The requested document ({$requestedDocument|default:$smarty.session.last404} was not found on this site.</h2>'),(458,71,0.13,'smarty','0','Page created.',1062276677,1,'127.0.0.1','<h2>The requested document ({$requestedDocument|default:$smarty.session.last404}) was not found on this site.</h2>'),(459,71,0.14,'smarty','0','Second version, auto-search.',1062277290,1,'127.0.0.1','<h2>The requested document ({$requestedDocument|default:$smarty.session.last404}) was not found on this site.</h2>\r\n{assign var=\"docName\" value=$requestedDocument|default:$smarty.session.last404}\r\n{message type=\"error\" value=\"The page you requested ($docName) was not found. Attempting search...\"}\r\n{store_messages}\r\n<form name=\"AutoSearchForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"home\">\r\n<input type=\"hidden\" name=\"showSearch\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"showSearch\">\r\n<input type=\"hidden\" name=\"searchQuery\" value=\"{$docName}\">\r\n</form>\r\n<script language=\"JavaScript\">\r\ndocument.forms.AutoSearchForm.submit();\r\n</script>\r\n'),(3658,105,1.22,'php','0','tried to get the new layout on this page but couldn\'t',1115336288,16,'128.187.0.164','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n/*// If you want to make the [0] section active, delete this block!\r\nif (!$SPADE[\'acm\']->isDomainAdmin()) {\r\n	$FAQ[0] = $FAQ[1];\r\n	$FAQ[1] = $FAQ[2];\r\n	$FAQ[2] = $FAQ[3];\r\n	unset($FAQ[3]);\r\n}\r\n//Delete through this line*/\r\n\r\n?>\r\n\r\n\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(712,90,0.31,'smarty','0','Changed the contents of each arena',1083365944,16,'64.85.253.211','<h1>Are you ready for the challenge?</h1>\r\n<hr noshade size=\"1\" />\r\nToo many hours in front of a computer screen got you out of shape?<br />\r\nHere’s your chance to lose those extra pounds, make a few bucks, and have fun doing it. WeightLossWars allows you to create a competition among your friends and provides creative tools you need to monitor your progress and the progress of your competitors.<br />\r\n<div align=\"right\"><a href=\"?pg=howitworks\">Click here to find out more.</a></div>\r\n<br />\r\n\r\n<h2>Are you ready for WeightLossWars?</h2>\r\n<hr noshade size=\"1\" />\r\nSelect an Arena below and discover just how much fun losing weight can be.<br />\r\n<br />\r\n				\r\n<table cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n	<td><div id=\"chunk_1\" class=\"chunk\">\r\n			<h2>Corporate</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2>Family/Friends</h2>\r\n			<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2>Partner/Spouse</h2>\r\n			<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			\r\n		<div id=\"chunk_4\" class=\"chunk\">\r\n			<h2>Group/Club</h2>\r\n			<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Team up with your homies and battle another group for an ultimate all-out weight-loss rumble</div></td>\r\n</tr>\r\n</table>'),(713,90,0.32,'smarty','0','Changed the contents of each arena',1083366259,16,'64.85.253.211','<h1>Are you ready for the challenge?</h1>\r\n<hr noshade size=\"1\" />\r\nToo many hours in front of a computer screen got you out of shape?<br />\r\nHere’s your chance to lose those extra pounds, make a few bucks, and have fun doing it. WeightLossWars allows you to create a competition among your friends and provides creative tools you need to monitor your progress and the progress of your competitors.<br />\r\n<div align=\"right\"><a href=\"?pg=howitworks\">Click here to find out more.</a></div>\r\n<br />\r\n\r\n<h2>Are you ready for WeightLossWars?</h2>\r\n<hr noshade size=\"1\" />\r\nSelect an Arena below and discover just how much fun losing weight can be.<br />\r\n<br />\r\n				\r\n<table cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n	<td><div id=\"chunk_1\" class=\"chunk\">\r\n			<h2>Corporate</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2>Family/Friends</h2>\r\n			<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2>Partner/Spouse</h2>\r\n			<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			\r\n		<div id=\"chunk_4\" class=\"chunk\">\r\n			<h2>Group/Club</h2>\r\n			<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Team up with your homies to battle another group for an ultimate all-out weight loss rumble</div></td>\r\n</tr>\r\n</table>'),(714,90,0.33,'smarty','0','Changed the contents of each arena',1083366317,16,'64.85.253.211','<h1>Are you ready for the challenge?</h1>\r\n<hr noshade size=\"1\" />\r\nToo many hours in front of a computer screen got you out of shape?<br />\r\nHere’s your chance to lose those extra pounds, make a few bucks, and have fun doing it. WeightLossWars allows you to create a competition among your friends and provides creative tools you need to monitor your progress and the progress of your competitors.<br />\r\n<div align=\"right\"><a href=\"?pg=howitworks\">Click here to find out more.</a></div>\r\n<br />\r\n\r\n<h2>Are you ready for WeightLossWars?</h2>\r\n<hr noshade size=\"1\" />\r\nSelect an Arena below and discover just how much fun losing weight can be.<br />\r\n<br />\r\n				\r\n<table cellspacing=\"0\" cellpadding=\"0\">\r\n<tr>\r\n	<td><div id=\"chunk_1\" class=\"chunk\">\r\n			<h2>Corporate</h2>\r\n			<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2>Family/Friends</h2>\r\n			<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2>Partner/Spouse</h2>\r\n			<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			\r\n		<div id=\"chunk_4\" class=\"chunk\">\r\n			<h2>Group/Club</h2>\r\n			<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" /><br />\r\n			 Team up with your homies to battle another group in an all-out weight loss rumble</div></td>\r\n</tr>\r\n</table>'),(468,71,0.15,'smarty','1','Second version, auto-search.',1062280930,1,'127.0.0.1','<h2>The requested document ({$requestedDocument|default:$smarty.session.last404}) was not found on this site.</h2>\r\n{if $requestedDocument}\r\n{assign var=\"docName\" value=$requestedDocument|default:$smarty.session.last404}\r\n{message type=\"error\" value=\"The page you requested ($docName) was not found. Attempting search...\"}\r\n{store_messages}\r\n<form name=\"AutoSearchForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"home\">\r\n<input type=\"hidden\" name=\"showSearch\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"showSearch\">\r\n<input type=\"hidden\" name=\"searchQuery\" value=\"{$docName}\">\r\n</form>\r\n<script language=\"JavaScript\">\r\ndocument.forms.AutoSearchForm.submit();\r\n</script>\r\n{/if}'),(2100,131,0.74,'smarty','0','Replaced distanceRun with distanceExercised.',1089864251,16,'64.85.237.174','{* getProfile is included by getStats *}\r\n{include_php file=\"shared_handle:getStats\"}\r\n\r\n<h1 class=\"underline\">My Statistics - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n<br />\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n<script language=\"javascript\">{literal}\r\nfunction goNewGraph() {\r\n	var obj = document.getElementById(\'graphDropdown\');\r\n	var url;\r\n\r\n	for (var x = 0; x < obj.options.length; x++) {\r\n		if (obj.options[x].selected)\r\n			url = obj.options[x].value;\r\n	}\r\n\r\n	graphwindow.location.replace(url);\r\n\r\n	obj.selectedIndex = 0;\r\n}{/literal}\r\n</script>\r\n\r\n<table border=\"0\">\r\n<tr>\r\n	<td valign=\"middle\">\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}</span><br />\r\n			<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight}</span><br />\r\n			<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet}\'{$userProfile.heightInches}&quot;</span><br />\r\n			<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI}</span><br />\r\n			<span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight}</span><br />\r\n		</div>\r\n	</td>\r\n	<td align=\"center\">\r\n		<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&type=weight&fillPrevious=1&precision=0&totalChange=0&userIds={$userProfile.id}\" frameborder=\"0\" width=\"425\" height=\"220\" scrollbars=\"no\"></iframe><br />\r\n		<form name=\"notUsed\" style=\"margin:0px;\">\r\n		<select id=\"graphDropdown\" onchange=\"goNewGraph();\">\r\n			<option value=\"\">(Change Graph)</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&totalChange=1\">Change in Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0\" target=\"graphwindow\">Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</option>\r\n		</select>\r\n		</form>\r\n	<td valign=\"middle\" align=\"center\">\r\n		<h2 style=\"text-align:center;\"><i>\"{$userProfile.personalSaying|default:\"Your personal motto goes here.\"|replace:\'\"\':\'\'}\"</i></h2>\r\n	</td>\r\n</tr>\r\n</table>\r\n<br />\r\n\r\n<h2 class=\"withBG\">Weekly Overview and Updates</h2>\r\n<div>This is your Weight Loss Journal. To update your stats for the day or week, click on the appropriate week (column heading) below and a new window will open for you to enter your daily data.</div><br />\r\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr><td valign=\"top\" align=\"right\">\r\n	<div style=\"text-align:right;width:120px;height:39px;border-right:#000 1px solid;border-bottom:#000 1px solid;\">Click&nbsp;to&nbsp;Update&nbsp;-&gt;&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Weight</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Weight&nbsp;Lost</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>BMI</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Calories</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Carbs</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Fat</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Exercise</b>&nbsp;</div>\r\n	<div style=\"text-align:right;width:120px;height:29px;border-right:1px solid black;border-bottom:1px solid black;\"><b>Distance&nbsp;Exercised</b>&nbsp;</div>\r\n	</td>\r\n	<td valign=\"top\" align=\"left\">\r\n	<div style=\"width:569px;text-align:left;\"><iframe src=\"?pg=myprofile/statsframe&cid={$smarty.get.cid}&userId={$userProfile.id}#recent\" frameborder=\"0\" width=\"569\" height=\"302\" scrollbars=\"auto\"></iframe></div></td>\r\n</tr>\r\n</table>\r\n<br />\r\n(Note: The daily weight loss journal opens up in a new window so if you have a popup blocker you may need to disable it. &nbsp; Once you are finished and have returned to this page, you will need to click your browsers refresh button in order to see these values updated.)\r\n\r\n<br />\r\n<div class=\"hBox\" style=\"text-align:right;\">\r\n	<a href=\"?pg=myhome\" class=\"link\">Back To My Home</a>\r\n</div>\r\n\r\n\r\n\r\n\r\n'),(3684,105,1.24,'php','0','tried to get the new layout on this page but couldn\'t',1115363140,3,'24.10.217.227','<?php\r\n\r\nglobal $SPADE;\r\n\r\nif ($SPADE[\'user\']->isLoggedIn()) {\r\n	$SPADE[\'template\']->assign (\'pgLayout\', \'layouts/withLeftNav.tpl\');\r\n}\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n/*// If you want to make the [0] section active, delete this block!\r\nif (!$SPADE[\'acm\']->isDomainAdmin()) {\r\n	$FAQ[0] = $FAQ[1];\r\n	$FAQ[1] = $FAQ[2];\r\n	$FAQ[2] = $FAQ[3];\r\n	unset($FAQ[3]);\r\n}\r\n//Delete through this line*/\r\n\r\n?>\r\n\r\n\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(501,74,0.21,'smarty','0','Fixed a typo.',1062892635,1,'127.0.0.1','{if $smarty.request.showExtendedToc}\r\n	{assign var=\"start_id\" value=\"0\"}\r\n	{assign var=\"show_root\" value=\"true\"}\r\n{else}\r\n	{assign var=\"start_id\" value=\"1\"}\r\n{/if}\r\n<table border=\"0\" align=\"center\">\r\n<tr><td>\r\n	<div align=\"center\">\r\n	To build the entire Table of Contents for this site, <a href=\"./?pg=admin/toc/execute-build&doBuildToc=true\">click here</a>.<br>\r\n	(Building the Table of Contents may take a few moments, please be patient.)<br>\r\n	<br>\r\n	</div>\r\n	<div>\r\n	<u>The current Table of Contents</u>: {if $start_id gt 0}(<a href=\"./?pg={$page.name}&showExtendedToc=true\">Click here</a> to see the extended TOC){/if}<br>\r\n	<br>\r\n	{toc_display start_id=$start_id level_indent=\"&nbsp; &nbsp; &nbsp; &nbsp;\" show_root=$show_root}\r\n		{literal}\r\n		{$toc_indent}<a href=\"./?pg={$toc_pageName}\" onmouseover=\"window.status=\'{$toc_description}\'; return true;\" onmouseout=\"window.status=\'\';\">{$toc_title}</a> (id:{$toc_id})<br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n</td></tr>\r\n</table>'),(503,74,0.23,'smarty','0','Underlined title.',1062894088,1,'127.0.0.1','{if $smarty.request.showExtendedToc}\r\n	{assign var=\"start_id\" value=\"0\"}\r\n	{assign var=\"show_root\" value=\"true\"}\r\n{else}\r\n	{assign var=\"start_id\" value=\"1\"}\r\n{/if}\r\n<script language=\"JavaScript\">\r\n{literal}\r\nfunction editTarget(tocId)\r\n{\r\n	var winHeight = (preferredEditorHeight) ? preferredEditorHeight : 550;\r\n	var winWidth = (preferredEditorWidth) ? preferredEditorWidth : 700;\r\n	var options = \'\';\r\n	\r\n	options = \'height=\' + winHeight + \',width=\' + winWidth + \',top=\' + ((screen.availHeight / 2) - (winHeight / 2)) + \',left=\' + (screen.availWidth - winWidth - 25) + \',location=no,resizable=yes,toolbar=no,scrollbars=yes,status=yes\';\r\n	\r\n	{/literal} \r\n	editWin = window.open(\'index.php?pg=pm/main&tocId=\'+tocId+\'&newWindow=true\', \'{$vanity|replace:\".\":\"\"}{$domain|replace:\".\":\"\"}_editWindow\', options);\r\n	{literal} \r\n	editWin.focus();\r\n	\r\n	windowClosed = false;\r\n}\r\n\r\nfunction goTocLink(name, id) {\r\n	var action = \'goto\';\r\n	var df = document.forms[\'tocLinks\'];\r\n	for (var x = 0; x < df.linkAction.length; x++)\r\n		if (df.linkAction[x].checked)\r\n			action = df.linkAction[x].value;\r\n	if (action == \'goto\')\r\n		location.replace(\'./?pg=\'+name);\r\n	else if (action == \'edit\')\r\n		editTarget(id);\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<form name=\"tocLinks\" style=\"margin:0px;\">\r\n<table border=\"0\" align=\"center\">\r\n<tr><td>\r\n	<div align=\"center\">\r\n		To build the entire Table of Contents for this site, <a href=\"./?pg=admin/toc/execute-build&doBuildToc=true\">click here</a>.<br>\r\n		(Building the Table of Contents may take a few moments, please be patient.)<br>\r\n		<br>\r\n	</div>\r\n	<h2><u>The current Table of Contents:</u> {if $start_id gt 0}<span> (<a href=\"./?pg={$page.name}&showExtendedToc=true\">Click here</a> to see the extended TOC){/if}</span></h2>\r\n	<div>\r\n		Link action: <input type=\"radio\" name=\"linkAction\" value=\"goto\" checked> Go To Page <input type=\"radio\" name=\"linkAction\" value=\"edit\"> Edit Page<br>\r\n		<br>\r\n		{toc_display start_id=$start_id level_indent=\"&nbsp; &nbsp; &nbsp; &nbsp;\" show_root=$show_root}\r\n			{literal}\r\n			{$toc_indent}<a href=\"javascript://\" onclick=\"goTocLink(\'{$toc_pageName}\', \'{$toc_id}\'); return false;\" onmouseover=\"window.status=\'{$toc_description}\'; return true;\" onmouseout=\"window.status=\'\';\">{$toc_title}</a> (id:{$toc_id})<br>\r\n			{/literal}\r\n		{/toc_display}\r\n	</div>\r\n</td></tr>\r\n</table>\r\n</form>'),(476,75,0.10,'php','0','Page created.',1062787695,1,'127.0.0.1',''),(477,75,0.11,'php','0','Page created.',1062787872,1,'127.0.0.1','<?php\r\n\r\nif ($_REQUEST[\'doBuildToc\'])\r\n{\r\n	buildToc();\r\n} else {\r\n	logError(\'No confirmation was submitted to build the Table of Contents. Please return to the Builder page.\');\r\n}\r\n\r\n?>\r\n\r\n'),(504,74,0.24,'smarty','0','Added another space..',1062894135,1,'127.0.0.1','{if $smarty.request.showExtendedToc}\r\n	{assign var=\"start_id\" value=\"0\"}\r\n	{assign var=\"show_root\" value=\"true\"}\r\n{else}\r\n	{assign var=\"start_id\" value=\"1\"}\r\n{/if}\r\n<script language=\"JavaScript\">\r\n{literal}\r\nfunction editTarget(tocId)\r\n{\r\n	var winHeight = (preferredEditorHeight) ? preferredEditorHeight : 550;\r\n	var winWidth = (preferredEditorWidth) ? preferredEditorWidth : 700;\r\n	var options = \'\';\r\n	\r\n	options = \'height=\' + winHeight + \',width=\' + winWidth + \',top=\' + ((screen.availHeight / 2) - (winHeight / 2)) + \',left=\' + (screen.availWidth - winWidth - 25) + \',location=no,resizable=yes,toolbar=no,scrollbars=yes,status=yes\';\r\n	\r\n	{/literal} \r\n	editWin = window.open(\'index.php?pg=pm/main&tocId=\'+tocId+\'&newWindow=true\', \'{$vanity|replace:\".\":\"\"}{$domain|replace:\".\":\"\"}_editWindow\', options);\r\n	{literal} \r\n	editWin.focus();\r\n	\r\n	windowClosed = false;\r\n}\r\n\r\nfunction goTocLink(name, id) {\r\n	var action = \'goto\';\r\n	var df = document.forms[\'tocLinks\'];\r\n	for (var x = 0; x < df.linkAction.length; x++)\r\n		if (df.linkAction[x].checked)\r\n			action = df.linkAction[x].value;\r\n	if (action == \'goto\')\r\n		location.replace(\'./?pg=\'+name);\r\n	else if (action == \'edit\')\r\n		editTarget(id);\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<form name=\"tocLinks\" style=\"margin:0px;\">\r\n<table border=\"0\" align=\"center\">\r\n<tr><td>\r\n	<div align=\"center\">\r\n		To build the entire Table of Contents for this site, <a href=\"./?pg=admin/toc/execute-build&doBuildToc=true\">click here</a>.<br>\r\n		(Building the Table of Contents may take a few moments, please be patient.)<br>\r\n		<br>\r\n	</div>\r\n	<h2><u>The current Table of Contents:</u> &nbsp; {if $start_id gt 0}<span> (<a href=\"./?pg={$page.name}&showExtendedToc=true\">Click here</a> to see the extended TOC){/if}</span></h2>\r\n	<div>\r\n		Link action: <input type=\"radio\" name=\"linkAction\" value=\"goto\" checked> Go To Page <input type=\"radio\" name=\"linkAction\" value=\"edit\"> Edit Page<br>\r\n		<br>\r\n		{toc_display start_id=$start_id level_indent=\"&nbsp; &nbsp; &nbsp; &nbsp;\" show_root=$show_root}\r\n			{literal}\r\n			{$toc_indent}<a href=\"javascript://\" onclick=\"goTocLink(\'{$toc_pageName}\', \'{$toc_id}\'); return false;\" onmouseover=\"window.status=\'{$toc_description}\'; return true;\" onmouseout=\"window.status=\'\';\">{$toc_title}</a> (id:{$toc_id})<br>\r\n			{/literal}\r\n		{/toc_display}\r\n	</div>\r\n</td></tr>\r\n</table>\r\n</form>'),(480,75,0.12,'php','0','Page created.',1062788818,1,'127.0.0.1','<?php\r\n\r\nif ($_REQUEST[\'doBuildToc\'])\r\n{\r\n	buildToc();\r\n	?>\r\n	<div align=\"center\">Table of Contents build complete. <a href=\"./?pg=admin/buildtoc\">Click here</a> to return to the Table of Contents build page.</div>\r\n	<?php\r\n} else {\r\n	logError(\'No confirmation was submitted to build the Table of Contents. Please return to the Builder page.\');\r\n}\r\n\r\n?>\r\n\r\n'),(482,75,0.13,'php','0','Page created.',1062790376,1,'127.0.0.1','<?php\r\n\r\nif ($_REQUEST[\'doBuildToc\'])\r\n{\r\n	buildToc();\r\n	?>\r\n	<div align=\"center\">Table of Contents build complete. <a href=\"./?pg=admin/toc\">Click here</a> to return to the Table of Contents page.</div>\r\n	<?php\r\n} else {\r\n	logError(\'No confirmation was submitted to build the Table of Contents.\');\r\n}\r\n\r\n?>\r\n\r\n'),(2986,105,1.12,'php','0','Replaced some weird character.',1106560344,2,'67.166.75.78','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"See above.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n?>\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(1154,75,0.14,'php','1','Hiding Widgets.',1086051704,2,'24.2.64.190','<?php\r\n\r\n$GLOBALS[\'SPADE\'][\'template\']->_tpl_vars[\'hideWidgets\'] = \'true\';\r\n\r\nif ($_REQUEST[\'doBuildToc\'])\r\n{\r\n	buildToc();\r\n	?>\r\n	<div align=\"center\">Table of Contents build complete. <a href=\"./?pg=admin/toc\">Click here</a> to return to the Table of Contents page.</div>\r\n	<?php\r\n} else {\r\n	logError(\'No confirmation was submitted to build the Table of Contents.\');\r\n}\r\n\r\n?>\r\n\r\n'),(1155,64,0.38,'php','1','Hiding widgets.',1086051727,2,'24.2.64.190','<?php\r\n\r\n$SPADE[\'template\']->_tpl_vars[\'hideWidgets\'] = \'true\';\r\n\r\n// Like the load.config.php, figure out what config file we are using\r\n//........ Be aware that any domains with \"www.\" will be trimmed out.\r\n$domain = strtolower (str_replace (\'www.\', \'\', $_SERVER[\'HTTP_HOST\']));\r\n\r\n//........ Prevent any hack attempts to override configuration values.\r\n$temp_c = $c;\r\n\r\nunset ($c);\r\n\r\n//........ Find which Config file to use, if not found use default.\r\nwhile (strstr ($domain, \'.\')) {\r\n	if (file_exists ($file = SPADE_CONFIGS_PATH.$domain.\'.php\')) {\r\n		include ($file);\r\n		break;\r\n	}\r\n	elseif (strlen ($domain) < 5 ) {\r\n		$file = SPADE_CONFIGS_PATH.\'default.config.php\';\r\n		break;\r\n	}\r\n	else\r\n		$domain = substr (strchr ($domain, \'.\'), 1);\r\n}\r\n\r\n$currentConfig = $c;\r\nunset($c);\r\n$c = $temp_c;\r\nunset($temp_c);\r\n\r\n$folderId = $db->query(\"SELECT id FROM _folders WHERE path=\'\".SPADE_CONFIGS_PATH.\"\' OR path=\'\".preg_replace(\"/^[\\.]?[\\/]/\", \'\', SPADE_CONFIGS_PATH).\"\'\", DB_VAL);\r\n\r\n$stPath = SPADE_SYSTEM_PATH.$GLOBALS[\'c\'][\'system\'].\'/img/st/\';\r\n\r\n?><div align=\"center\"><?php\r\necho openStyleTable($stPath.\'chrome\', \'\', \'\', \'\', 500);\r\n?>\r\n<table border=\"0\" align=\"center\" width=\"500\">\r\n<tr>\r\n	<td colspan=\"3\"><h2>Engine Info: </h2></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Engine: </b></span></td>\r\n	<td><span><?php echo ENGINE_NAME; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Version: </b></span></td>\r\n	<td><span><?php echo ENGINE_VERSION; ?> rev <?php echo ENGINE_MINOR_VERSION; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>Revision Date: </b></span></td>\r\n	<td><span>\r\n		<?php\r\n		list($rev_month, $rev_day, $rev_year) = explode(\'.\', ENGINE_REVISION_DATE);\r\n		echo date(\"n/j/Y\", mktime(0, 0, 0, intval($rev_month), intval($rev_day), (intval($rev_year) + 2000)));\r\n		?>\r\n	</span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Key: </b></span></td>\r\n	<td><span><?php echo $c[\'licenseKey\']; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td><span><b>License Good Through: </b></span></td>\r\n	<td><span>December 31, <?php echo $c[licenseYear]; ?></span></td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config File: </h2></td>\r\n</tr>\r\n<tr>\r\n	<td>&nbsp;</td>\r\n	<td colspan=\"2\">\r\n		<span><b><?php echo basename($file); ?></b></span>\r\n		<?php\r\n		if ($folderId) { ?>\r\n		<form name=\"editConfigForm\" action=\"index.php\" method=\"post\" target=\"fm\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"fm/main\">\r\n		<input type=\"hidden\" name=\"isChanged\" value=\"true\">\r\n		<input type=\"hidden\" name=\"filesAction\" value=\"store\">\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n		<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"tab\">\r\n		<input type=\"hidden\" name=\"tab\" value=\"3\">\r\n		<input type=\"hidden\" name=\"folderId\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectFolder\" value=\"<?php echo $folderId; ?>\">\r\n		<input type=\"hidden\" name=\"selectedFiles[]\" value=\"<?php echo basename($file); ?>\">\r\n		<input type=\"submit\" name=\"submitEditConfig\" value=\"Edit This Configuration\" class=\"btn\">\r\n		</form>\r\n		<?php\r\n		}\r\n		?>\r\n	</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Current Config Settings: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($currentConfig)) {\r\n	foreach($currentConfig as $name=>$config) {\r\n		echo \'<tr><td width=\"20\">&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($name).\'</b> : </span></td><td><span>\';\r\n		if (!$config)\r\n			echo $config.\' (<b>false</b>)\';\r\n		elseif ($config == 1)\r\n			echo $config.\' (<b>true</b>)\';\r\n		elseif (is_array($config))\r\n			display($config);\r\n		else\r\n			echo $config;\r\n		echo \'</td></tr>\'.\"\\n\";\r\n	}\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve the current Config settings. The file may be empty or the \\\'paths.config.php\\\' file may be improperly configured.</span></td></tr>\';\r\n}\r\n?>\r\n<tr>\r\n	<td colspan=\"3\">&nbsp;</td>\r\n</tr>\r\n<tr>\r\n	<td colspan=\"3\"><h2>Available Modules: </h2></td>\r\n</tr>\r\n<?php\r\nif (is_array($c[\'availableModules\'])) {\r\n	foreach($c[\'availableModules\'] as $moduleName=>$modulePath) {\r\n		$moduleInfo = getModuleInfo($moduleName);\r\n		echo \'<tr><td colspan=\"3\"><hr noshade size=\"1\"/><span><b><i>\'.niceText($moduleName).\'</i></b></span><hr noshade size=\"1\"/></td></tr>\'.\"\\n\";\r\n		if (is_array($moduleInfo)) {\r\n			foreach($moduleInfo as $subject=>$info) {\r\n				echo \'<tr><td>&nbsp;</td><td valign=\"top\" nowrap=\"nowrap\"><span><b>\'.niceText($subject).\'</b></span></td><td><span>\';\r\n				if ($subject == \'author-contact\') {\r\n					echo \'<a href=\"mailto:\'.$info.\'\">\'.$info.\'</a>\';\r\n				} elseif ($subject == \'author-website\') {\r\n					if (!preg_match(\"/^http\\:\\/\\//\", $info))\r\n						echo \'<a href=\"http://\';\r\n					else\r\n						echo \'<a href=\"\';\r\n					echo $info.\'\" target=\"_blank\">\'.$info.\'</a>\';\r\n				} else {\r\n					echo $info;\r\n				}\r\n				echo \'</span></td></tr>\'.\"\\n\";\r\n			}\r\n		} else {\r\n			echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not get the details for this module.<br>The .mod file (<b>\'.MODULES_DIR.$moduleName.\'</b>) may be improperly configured.</span></td></tr>\';\r\n		}\r\n	}\r\n\r\n} else {\r\n	echo \'<tr><td>&nbsp;</td><td colspan=\"2\"><span>Could not retrieve available modules details.<br>There may not be any modules available or the \\\'paths.config.php\\\' file may be improperly configured.</td></tr>\';\r\n}\r\n?>\r\n</table>\r\n<?php\r\necho closeStyleTable($stPath.\'chrome\');\r\n?></div>'),(485,74,0.18,'smarty','0','Page created.',1062790747,1,'127.0.0.1','<table border=\"0\" align=\"center\">\r\n<tr><td>\r\n	<div align=\"center\">\r\n	To build the entire Table of Contents for this site, <a href=\"./?pg=admin/toc/execute-build&doBuildToc=true\">click here</a>.<br>\r\n	(Building the Table of Contents may take a few moments, please be patient.)<br>\r\n	<br>\r\n	</div>\r\n	<div>\r\n	<u>The current Table of Contents</u>:<br>\r\n	<br>\r\n	{toc_display level_indent=\"&nbsp; &nbsp; &nbsp; &nbsp;\" show_root=\"true\"}\r\n		{literal}\r\n		{$toc_indent}<a href=\"./?pg={$toc_pageName}\" onmouseover=\"window.status=\'{$toc_description}\'; return true;\" onmouseout=\"window.status=\'\';\">{$toc_title}</a> (id:{$toc_id})<br>\r\n		{/literal}\r\n	{/toc_display}\r\n	</div>\r\n</td></tr>\r\n</table>'),