-- Add default affiliate comission settings
INSERT INTO `tblaffiliatesettings` ( `sCommissionType`, `nPercentage`, `nPaypal`, `nCheck`, `nHideAffiliateProgram`) VALUES( 'Percentage', 40, 1, 1, 0);


-- Add defualt directories
INSERT INTO `tbldirectories` ( `nDirectory_ID`,`sDirectoryName`, `sDirectoryPath`, `nLevel_ID`, `bDisplay`, `nSortOrder`, `nParent_ID`) VALUES
(0, 'main', 'main', 0, 1, 0, -1);
INSERT INTO `tbldirectories` (`nDirectory_ID`, `sDirectoryName`, `sDirectoryPath`, `nLevel_ID`, `bDisplay`, `nSortOrder`, `nParent_ID`) VALUES
(1, 'member', 'member', 0, 1, 0, -1);
INSERT INTO `tbldirectories` (`nDirectory_ID`, `sDirectoryName`, `sDirectoryPath`, `nLevel_ID`, `bDisplay`, `nSortOrder`, `nParent_ID`) VALUES
(1001, 'Affiliates', 'Affiliates', 1, 1, 0, 1);
INSERT INTO `tbldirectories` (`nDirectory_ID`, `sDirectoryName`, `sDirectoryPath`, `nLevel_ID`, `bDisplay`, `nSortOrder`, `nParent_ID`) VALUES
(1002, 'Support', 'Support', 1, 1, 0, 1);


-- Add email templates


INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Thank you for your request to join [[SITE NAME]].', 'Dear [[NAME]],\r\n\r\nThank you for your request to join [[SITE NAME]].\r\n\r\nSo that we know it really was you that requested to join us, we require you to click on the link below to confirm your subscription.\r\n\r\nClick here to confirm\r\n\r\nThank you.\r\n\r\n[[OWNER]]', 'MEMBER_PREREGISTRATION', 'Member - Pre-registration', '2007-03-31 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'You are now a member of [[SITE NAME]]!', 'Dear [[NAME]],\r\n\r\nYou are now a member of [[SITE NAME]]!\r\n\r\nPlease login with these details:\r\n\r\nUsername: [[EMAIL ADDRESS]]\r\nPassword: [[PASSWORD]]\r\n\r\nThank you.\r\n\r\n[[OWNER]]', 'MEMBER_REGISTRATION_CONFIRMATION', 'Member - Registration Confirmation', '2007-03-31 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'New free user registered at [[SITE NAME]].', 'Dear [[NAME]], \r\n\r\nA new free user registered at [[SITE NAME]] with your reference. \r\n\r\nYou will be paid for it for sure!\r\n\r\nThank you very much for promoting our business.\r\n\r\n[[OWNER]]', 'AFFILIATE_NEW_REGISTRATION', 'Affiliate - New Registration', '2007-04-05 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Important - Your subscription at [[SITE NAME]] will be expiring soon', 'Dear [[FIRST NAME]] [[SURNAME]],\r\n\r\nWe have received your request to cancel your subscription at our site [[SITE NAME]].\r\n\r\nYour account with our site will be cancelled on [[DATE]] and you will not be billed again.\r\n\r\nIf you change your mind and would like to re-join, please click the following link.\r\n\r\n[[SITE URL]]\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n\r\n[[SITE NAME]]', 'MEMBER_RENEWAL_NOTIFICATION', 'Member - Notification Renewal', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Contact Form Submission', 'Dear Administrator,\r\n\r\nThe following message was left on [[SITE NAME]]:\r\n\r\nName: [[NAME]]\r\n\r\nEmail: [[EMAIL]]\r\n\r\nMessage: [[MESSAGE]]\r\n\r\nKind Regards,\r\n\r\n[[SITE NAME]]', 'ADMIN_CONTACT', 'Admin - New Contact Message', '0000-00-00 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Your membership expires in 7 days', 'Dear [[FIRST NAME]]Â [[SURNAME]],\r\n\r\nWe have received your request to cancel your subscription at [[SITE NAME]]. \r\n\r\nYour account will be closed on [[EXPIRY DATE]].\r\n\r\nIf you are still interested in continuing the subscription please click the following link.\r\n\r\n[[SITE URL]]\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]', 'MEMBER_EXPIRY_REMINDER', 'Member - Expiry Reminder', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Forgotten Password Reminder', 'Dear [[FIRST NAME]]\r\n\r\nYour login details to access [[SITE NAME]] are below:\r\n\r\nUsername: [[EMAIL]]\r\nPassword: [[PASSWORD]]\r\n\r\nYou may login to the site here:\r\n\r\n[[SITE URL]]/index.php?page=login\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n[[SITE NAME]]', 'MEMBER_PASSWORD_REMINDER', 'Member - Password Reminder', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'You''ve made a sale (page purchase)', 'Dear Administrator,\r\n\r\n[[FIRST NAME]] [[SURNAME]] has just purchased access to a page on [[SITE NAME]]\r\n\r\nKind Regards \r\n\r\n[[SITE NAME]]', 'ADMIN_NEW_SALEPAGE', 'Admin - New Sale', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'You''ve Made A Sale!', 'Dear [[AFFILIATE FIRST NAME]],\r\n\r\n[[FIRST NAME]] [[SURNAME]] has either joined or renewed their subscription at [[SITE NAME]] and a commission of [[COMMISSION]] has been added to your account.\r\n\r\nYou can view your commission details at :\r\n\r\n[[SITE URL]]/index.php?page=login\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n\r\n[[SITE NAME]]', 'AFFILIATE_NEW_SALE', 'Affiliate - New Sale', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Support Form Submission', 'Dear Administrator,\r\n\r\nA support form has been submitted on [[SITE NAME]]. \r\n\r\nDetails are below:\r\n\r\nName: [[FIRST NAME]] [[SURNAME]]\r\n\r\nEmail: [[EMAIL]] \r\n\r\nMessage:[[MESSAGE]] \r\n\r\nKind regards,\r\n\r\n[[SITE NAME]]', 'ADMIN_SUPPORT', 'Admin - Support Message', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Pay Affiliates', 'Dear [[NAME]],\r\n\r\nAs today is the end of the month Affiliates Pay has been generated. \r\n\r\nPlease take a look at it in the admin panel\r\n\r\nKind Regards \r\n\r\n[[SITE NAME]]', 'MEMBER_AFFILIATE_PAY', 'Member - Affiliate Payment', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Subscription Cancelled', 'Dear [[FIRST NAME]] [[SURNAME]],\r\n\r\nWe have received your request to cancel your subscription and your account at [[SITE NAME]] has been closed.\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n[[SITE NAME]]', 'MEMBER_SUBSCRIPTION_CANCELLED', 'Mamber - Subscription Cancelled', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Subscription Renewal', 'Dear [[FIRST NAME]] [[SURNAME]], \r\n\r\nThank you for renewing your account with [[SITE NAME]]\r\n\r\nUSERNAME: [[EMAIL]]\r\nPASSWORD: [[PASSWORD]]\r\n\r\nYou may login here:\r\n\r\n<a href="[[SITE URL]]/index.php?page=login">[[SITE URL]]/index.php?page=login</a>\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n\r\n[[SITE NAME]]', 'MEMBER_SUBSCRIPTION_RENEWAL', 'Member - Subscription Renewal', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Login Details', 'Dear [[FIRST NAME]] [[SURNAME]],\r\n\r\nThank you  for joining [[SITE NAME]]\r\n\r\nLogin Details :\r\n\r\nPlease use the details below to login\r\n\r\nUsername: [[EMAIL]]\r\nPassword: [[PASSWORD]]\r\n\r\n<a href="[[SITE URL]]">Click here to enter the members area.</a>\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n\r\n[[SITE NAME]]', 'MEMBER_LOGIN_DETAIL', 'Member - Login Details', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` (`sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES 
('New Subscription', 'Dear [[ADMIN NAME]],\r\n\r\n[[FIRST NAME]] [[SURNAME]] has just joined your membership site.\r\n\r\n[[ADDITIONAL]]\r\n\r\nYou can view their account at :\r\n\r\n[[SITE URL]]/admin/\r\n\r\nKind Regards \r\n\r\n[[SITE NAME]]', 'ADMIN_NEW_SUBSCRIPTION', 'Admin - New Subscription', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Subscription Renewal', 'Dear [[ADMIN NAME]],\r\n\r\n[[FIRST NAME]] [[SURNAME]] has just renewed their account with [[SITE NAME]] \r\n\r\nYou can view the details at :\r\n\r\n[[SITE URL]]/admin\r\n\r\nKind Regards, \r\n\r\n[[SITE NAME]]', 'ADMIN_SUBSCRIPTION_RENEWAL', 'Admin - Subscription Renewal', '2007-04-07 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Welcome to the [[SITE NAME]] Affiliate Program!', 'Dear [[FIRST NAME]],\r\n\r\nThank you for registering as an affiliate at [[SITE NAME]]\r\n\r\nPlease confirm your email address by following this link:\r\n\r\n[[LINK]]\r\n\r\nYour commission percentage is currently set at [[X]] and you will receive an email when any sales are made.\r\n\r\nYou can also check your affiliate stats at any time by logging in to the member''s area below and checking the affiliate menu.\r\n\r\nUsername: [[EMAIL]]\r\nPassword: [[PASSWORD]]\r\n\r\n<a href=\"[[SITE URL]]\">Click here to enter the members area.</a>\r\n\r\nThank you again for your help promoting [[SITE NAME]]!\r\n\r\nKind regards,\r\n\r\n[[OWNER]]', 'AFFILIATE_WELCOME', 'Affiliate - Welcome to affiliates system', '0000-00-00 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Upgrade Confirmation', 'Dear [[FIRST NAME]] [[SURNAME]],\r\n\r\nThank you for upgrading your membership. You now have access to "[[LEVEL]]".\r\n\r\nWhen you next login to the member''s area, you''ll see that you have a new menu in your navigation bar.\r\n\r\nKind Regards,\r\n\r\n[[OWNER]]\r\n\r\n[[SITE NAME]]', 'MEMBER_UPGRADE', 'Member - Upgrade Confirmation', '0000-00-00 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'A member has upgraded their account!', 'Dear [[ADMIN NAME]],\r\n\r\n[[FIRST NAME]] [[SURNAME]] has just upgraded their account. They now have access to "[[LEVEL]]":\r\n\r\nKind Regards,\r\n\r\n[[SITE NAME]]', 'ADMIN_UPGRADE', 'Admin - Member Upgrade', '0000-00-00 00:00:00');
INSERT INTO `tblemailtemplates` ( `sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES
( 'Please verify your subscription to [[SITE NAME]]', 'Dear [[FIRST NAME]],\r\n\r\nYou recently signed up as a free member on [[SITE NAME]] at [[SITE URL]].\r\n\r\nTo verify that you are a real person, please click on the link below:\r\n\r\n [[LINK]] \r\n\r\nIf you did not sign up for an account, please ignore this email.\r\n\r\nThank you,\r\n\r\n[[SITE NAME]]', 'FREE_SIGNUP_VERIFY', 'Free Signup Email Verify', '0000-00-00 00:00:00');
INSERT INTO `tblemailtemplates` (`sSubject`, `sBody`, `sType`, `sTitle`, `dEventDate`) VALUES 
( 'Your membership has expired at [[SITE NAME]].', 'Dear [[NAME]],\r\n\r\nThis is just a courtesy email to let you know that your access to [[LEVEL]] has expired at [[SITE NAME]].\r\n\r\nIf you would like to re-join, please click on the link below:\r\n\r\n<a href=\"[[SITE URL]]\">[[SITE URL]]</a>\r\n\r\nThank you.\r\n\r\n[[OWNER]]', 'MEMBER_MANUALEXPIRED', 'Member - Manually Added Expired', '0000-00-00 00:00:00');

-- Add default membership levels
INSERT INTO `tblmembershiplevels` (`nLevel_ID`, `nOrder`, `sLevel`, `nActive`, `nDisplayFront`) VALUES
(1, 1, 'Free', '1', '1');

INSERT INTO `tblmembershiplevels` (`nLevel_ID`, `nOrder`, `sLevel`, `nActive`, `nDisplayFront`) VALUES
(2, 2, 'Paid', '1', '1');


-- Add levels for admin

INSERT INTO `tbluserlevels` (`nUser_ID` , `nLevel_ID`) VALUES ('1', '1');
INSERT INTO `tbluserlevels` (`nUser_ID` , `nLevel_ID`) VALUES ('1', '2');

--Add defualt pages

INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1, 'Home', 'home', 0, 1, 0, 'top', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Home Page</h1><p>Here is the home page of your membership site. Just edit this content using the Page Management section in your admin control panel.</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1001, 'One Time Offer', 'onetimeoffer', 1, 0, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>One Time Offer</h1><p>Text here</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1002, 'Join', 'join', 0, 1, 1, 'top', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Join Page</h1><p>Simply complete the form below to create your member account.</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1003, 'FAQ', 'faq', 0, 1, 2, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>FAQ Page</h1><p>Here is a list of frequently asked questions and their answers.</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1004, 'Recommended Links', 'links', 0, 1, 0, 'bottom', '', 0, 0, '', '', '', '', '', 0, '<h1>Recommended Links</h1><p>Here are some websites which we feel you may also be interested in.</p><p><a href="http://www.google.com" target="_blank">google.com</a></p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1005, 'Privacy', 'privacy', 0, 1, 0, 'bottom', '', 0, 0, '', '', '', '', '', 0, '<h1>Privacy Policy</h1><p>We respect your privacy and we are committed to safeguarding your privacy while online at our site http://www.yoursite.com. The following discloses the information gathering and dissemination practices for this Web site.</p><h2><b>Log Files</b></h2><p> Like most standard Web site servers we use log files. This includes internet protocol (IP) addresses, browser type, internet service provider (ISP), referring/exit pages, platform type, date/time stamp, and number of clicks to analyze trends, administer the site, track user''s movement in the aggregate, and gather broad demographic information for aggregate use. IP addresses, etc. are not linked to personally identifiable information.</p><h2><b>Cookies</b></h2><p> A cookie is a piece of data stored on the user''s computer tied to information about the user. Our site don''t use cookies. However, Some of our business partners use cookies on our site (for example, advertisers). However, we have no access to or control over these cookies, once we have given permission for them to set cookies for advertising. If you wish to disable cookies, you may do so through your individual browser options.</p><h2><b>Links</b></h2><p> This Web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every Web site that collects personally identifiable information. This privacy statement applies solely to information collected by this Web site.</p><h2><b>Advertisers</b></h2><p> We use outside ad companies to display ads on our site. These ads may contain cookies and/or web beacons to collect data in the ad serving process and are collected by our ad companies, and we do not have access to this information. </p><h2><b>Contact Information</b></h2><p> If users have any questions or suggestions regarding our privacy policy, please <a href="../index.php?page=contact">contact us</a>.</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1006, 'Forgotten Password', 'forgot', 0, 0, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Forgotten Password</h1><p>Please enter your email address below and we will send you your password instantly!</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1007, 'Contact Us', 'contact', 0, 1, 3, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Contact Us</h1><p>Please contact us using the form below</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1008, 'Login', 'login', 0, 1, 4, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Member Login</h1><p>Current members, please login below</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1009, 'Affiliates', 'affiliates', 0, 1, 5, 'bottom', '', 0, 0, '', '', '', '', '', 0, '<h1>Affiliate Program</h1><p>Join us as an affiliate and earn 40% recurring commissions on any members you refer!</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1010, 'Edit Details', 'affiliate-edit', 1001, 1, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Affiliate Details</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1011, 'Promotional Emails', 'affiliateemails', 1001, 1, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Promo Email Subject Lines</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1012, 'Commission Report', 'creport', 1001, 1, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Affiliate Commissions Report</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1013, 'Promotional Graphics', 'graphics', 1001, 1, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Promo Graphics</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1014, 'Contact Us', 'contact', 1002, 1, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Customer Support</h1><p>Please complete the form below to contact our support department</p>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1015, 'Change Password', 'changepassword', 1002, 1, 0, 'top', '', 0, 0, '', '', '', '', '', 0, '<h1>Change Password</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1016, 'Thank you page (2Checkout)', 'thankyou_2checkout', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Thank you for signing up!</h1>\r\n<p>You have now successfully signed up as a member and you may login using the link below.</p>\r\n<h3><a href="index.php?page=login">Click here to login</a></h3>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1017, 'Thank you page (Authorize.Net)', 'thankyou_authorize', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Thank you for signing up!</h1>\r\n<p>You have now successfully signed up as a member and you may login using the link below.</p>\r\n<h3><a href="index.php?page=login">Click here to login</a></h3>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1018, 'Thank you page (Clickbank)', 'thankyou_clickbank', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Thank you for signing up!</h1>\r\n<p>You have now successfully signed up as a member and you may login using the link below.</p>\r\n<h3><a href="index.php?page=login">Click here to login</a></h3>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1019, 'Thank you page (Paypal)', 'thankyou_paypal', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Thank you for signing up!</h1>\r\n<p>You have now successfully signed up as a member and you may login using the link below.</p>\r\n<h3><a href="index.php?page=login">Click here to login</a></h3>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1020, 'Home', 'home', 1, 1, 0, 'top', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Member''s Home Page</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1021, 'Upgrade', 'upgrade', 1, 0, 0, 'top', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Upgrade</h1>', 0);
INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1022, 'Thank you page (Free)', 'thankyou_free', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Thank you for joining!</h1>\r\n<p>You have now successfully signed up as a free member and you may login using the link below.</p>\r\n<h3><a href="index.php?page=login">Click here to login</a></h3>', 0);

INSERT INTO `tblpages` (`nPage_ID`, `sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
(1023, 'Thank you page (Affiliate Join)', 'thankyou_affiliate', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Thank you for joining!</h1>\r\n<p>You have now successfully signed up as an affiliate and you may login using the link below.</p>\r\n<h3><a href=\"index.php?page=login\">Click here to login</a></h3>', 0);
INSERT INTO `tblpages` (`sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
('Verify message (free signup)', 'free_verify', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Please Confirm Your Email</h1>\r\n<p>Before we can activate your account, you must verify your email address so we know you''re a real person.
<br /><br />
We''ve sent a special link to your email address and you''ll need to click on that to activate your account.
<br /><br />
Thank you!
</p>', 0);

INSERT INTO `tblpages` (`sPageName`, `sFileName`, `nDirectory_ID`, `nDisplay`, `nSortOrder`, `sNavBarLocation`, `sItemName`, `nPrice`, `nDownloadPage`, `s2COProductID`, `s1ShoppingCartPID`, `sClickBankItem`, `sMonth`, `sYear`, `cre`, `sContent`, `nAccessDays`) VALUES
('Verify message (Affiliate Join)', 'affiliate_verify', 0, 0, 0, '', '', 0, 0, NULL, NULL, NULL, NULL, NULL, 0, '<h1>Please Confirm Your Email</h1>\r\n<p>Before we can activate your account, you must verify your email address so we know you''re a real person.
<br /><br />
We''ve sent a special link to your email address and you''ll need to click on that to activate your account.
<br /><br />
Thank you!
</p>', 0);



-- Add default FREE payment plan
INSERT INTO `tblpaymentplans` (nPaymentProcessor_ID, sPlanName, nRegularAmount, nTrialAmount1, nTrialAmount2, nRegularPeriod, sRegularPeriod, nTrial1Period, sTrial1Period, nTrial2Period, sTrial2Period, nOneTimePayment, sItemNumber, nRecurTimes, nActive, nMembershipLevel_ID, nCoupon_ID) 
VALUES (6, 'Free Signup', 0, 0, 0, 0, '', 0, '', 0, '', 0, '', 0, 1, 1, NULL);

--Add payment processors

INSERT INTO `tblpaymentprocessors` (`nPaymentProcessor_ID`, `sProcessorName`, `sProcessorDetails`, `nActive`, `sParam1`, `sParam2`, `sParam3`, `sParam4`, `nAllowTrial`, `nTrialPeriods`) VALUES
(1, 'Paypal', 'Accepts Credit/Debit Cards or Paypal Payments', 0, '', '', '0', '', 1, 2);
INSERT INTO `tblpaymentprocessors` (`nPaymentProcessor_ID`, `sProcessorName`, `sProcessorDetails`, `nActive`, `sParam1`, `sParam2`, `sParam3`, `sParam4`, `nAllowTrial`, `nTrialPeriods`) VALUES
(2, 'Clickbank', 'Accepts Credit/Debit Cards', 0, '', '', '', '', 1, 1);
INSERT INTO `tblpaymentprocessors` (`nPaymentProcessor_ID`, `sProcessorName`, `sProcessorDetails`, `nActive`, `sParam1`, `sParam2`, `sParam3`, `sParam4`, `nAllowTrial`, `nTrialPeriods`) VALUES
(3, '2Checkout', 'Accepts Credit/Debit Cards', 0, '', '', '', '', 1, 1);
INSERT INTO `tblpaymentprocessors` (`nPaymentProcessor_ID`, `sProcessorName`, `sProcessorDetails`, `nActive`, `sParam1`, `sParam2`, `sParam3`, `sParam4`, `nAllowTrial`, `nTrialPeriods`) VALUES
(4, 'Authorize.Net', 'Accepts Credit/Debit Cards', 0, '', '', '', '', 1, 1);
INSERT INTO `tblpaymentprocessors` (`nPaymentProcessor_ID`, `sProcessorName`, `sProcessorDetails`, `nActive`, `sParam1`, `sParam2`, `sParam3`, `sParam4`, `nAllowTrial`, `nTrialPeriods`) VALUES
(6, 'Free', 'Free', 1, '', '', '', '', 0, 0);

-- Add payment settings

INSERT INTO `tblsitesettings` (`sSiteName`, `sSiteURL`, `nDateFormat`, `sCurrencyFormat`, `nCookieExpiry`, `nCookieNeverExpires`, `sSiteOwner`, `sAdminEmail`, `sSupportEmail`, `nOneTimeOffer`, `nDailyBackup`, `nFreeMembership`, `nFreeOnlyMembership`, `sForumLink`, `nTOS`, `sTOS`, `nLogQueries`, `sEmailFooter`) VALUES
('Easy Member Pro', 'Your site url', 2, 'USD', 90, 0, '', '', '', 0, 0, 0, 0, '', 0, '', 0, '');

-- Add default template

INSERT INTO `tbltemplatesettings` (`nTemplateSetting_ID`, `nHeaderTextBold`, `nFooterTextBold`, `sHeaderNavAlign`, `sFooterNavAlign`, `nHideHeaderNav`, `nHideFooterNav`, `nHideFooterGraphic`, `nHidePoweredByLink`, `nHideBorder`, `btmcolor1`, `bodybackground`, `headerpath`, `footerpath`, `mheaderpath`, `mfooterpath`, `headimgwidth`, `mheadimgwidth`, `mbackcolor`, `mhovercolor`, `mtextcolor`, `sFrontEndTemplateFile`, `sMemberTemplateFile`, `sLanguageFile`) VALUES
(1, 0, 0, 'right', 'right', 0, 0, 0, 0, 0, '#333399', '#999999', 'template_pic/head1.jpg', 'template_pic/footer1.jpg', 'template_pic/head2.jpg', 'template_pic/footer2.jpg', '770', '775', '#FFFFFF', '#99CCFF', '#000000', 'template.html', 'member_template.html', 'English');

-- Add default transaction types

INSERT INTO `tbltransactiontypes` (`nTransactionType_ID`, `sType`) VALUES
(1, 'Sale');
INSERT INTO `tbltransactiontypes` (`nTransactionType_ID`, `sType`) VALUES
(2, 'Refund');
INSERT INTO `tbltransactiontypes` (`nTransactionType_ID`, `sType`) VALUES
(3, 'Cancellation');
INSERT INTO `tbltransactiontypes` (`nTransactionType_ID`, `sType`) VALUES
(4, 'Affiliate Commission');


-- 
-- Added data for custom fields to database files
-- 

INSERT INTO `tblcustomfieldsettings` VALUES (1, 'Field Name 1', 1, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (2, 'Field Name 2', 2, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (3, 'Field Name 3', 3, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (4, 'Field Name 4', 4, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (5, 'Field Name 5', 5, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (6, 'Field Name 6', 6, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (7, 'Field Name 7', 7, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (8, 'Field Name 8', 8, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (9, 'Field Name 9', 9, 0);
INSERT INTO `tblcustomfieldsettings` VALUES (10, 'Field Name 10', 10, 0);

-- Set the current script version number
UPDATE `tblsitesettings` SET `nScriptVersion`='2.20' WHERE nSiteSetting_ID=1;


