

DROP TABLE IF EXISTS `admin_menus`;
CREATE TABLE `admin_menus` (
  `menu_id` int(11) unsigned NOT NULL auto_increment,
  `parent_id` int(11) unsigned NOT NULL default '0',
  `admin_groups_id` varchar(255) NOT NULL default '1',
  `menu_pos` int(11) unsigned NOT NULL default '1',
  `filename` varchar(100) NOT NULL default '',
  `params` varchar(255) NOT NULL default '',
  `menu_item_type` char(1) NOT NULL,
  PRIMARY KEY  (`menu_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `admin_menus_description`;
CREATE TABLE `admin_menus_description` (
  `menu_id` int(11) unsigned NOT NULL default '0',
  `menu_text` varchar(255) NOT NULL default '',
  `language_id` int(11) unsigned NOT NULL default '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `quick_links`;
CREATE TABLE `quick_links` (
  `links_id` int(11) NOT NULL auto_increment,
  `login_group_id` int(11) default '0',
  `filename` varchar(255) default NULL,
  `params` varchar(255) NOT NULL default '',
  `count` int(11) NOT NULL default '0',
  `title` text,
  `sort_order` int(11) NOT NULL default '0',
  PRIMARY KEY  (`links_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

INSERT INTO `admin_menus` (`menu_id`, `parent_id`, `admin_groups_id`, `menu_pos`, `filename`, `params`, `menu_item_type`) VALUES 
  (1,0,'1',1,'customers_mainpage.php','',''),
  (2,0,'1',2,'events_mainpage.php','','E'),
  (3,0,'1',3,'services_mainpage.php','','V'),
  (4,0,'1',4,'products_mainpage.php','','P'),
  (5,0,'1',5,'subscriptions_mainpage.php','','S'),
  (6,0,'1',6,'cms_homepage.php','',''),
  (7,0,'1',7,'','',''),
  (8,0,'1',8,'','',''),
  (9,0,'1',9,'','',''),
  (10,0,'1',10,'reports_mainpage.php','',''),
  (11,0,'1',11,'','',''),
  (12,0,'1',12,'myaccount_update_account.php','',''),
  (13,1,'1',13,'customers_create.php','',''),
  (14,1,'1',14,'customers_order_create.php','',''),
  (15,1,'1',15,'configuration.php','',''),
  (16,15,'1',16,'customers_groups.php','',''),
  (17,15,'1',17,'customers_subscription_groups.php','','S'),
  (19,2,'1',19,'events_check_in.php','','E'),
  (20,2,'1',20,'events_mainpage.php','',''),
  (21,2,'1',21,'events_bookings_search.php','','E'),
  (22,2,'1',22,'events_waitlists.php','','E'),
  (23,2,'1',23,'events_locations.php','','E'),
  (24,2,'1',24,'events_instructors.php','tests',''),
  (25,2,'1',25,'configuration.php','gID=915','E'),
  (26, 20, '1', 26, 'events_mainpage.php', 'create_category=new', 'E'),
  (27,24,'1',27,'events_instructor_messages.php','','E'),
  (28,24,'1',27,'events_instructors_options.php','','E'),
  (29,24,'1',29,'events_instructor_view.php','','E'),
  (30,25,'1',30,'events_pop_questions.php','',''),
  (31,3,'1',31,'services_mainpage.php','',''),
  (32,3,'1',32,'services_resources.php','','V'),
  (33,3,'1',33,'services_locations.php','','V'),
  (34,3,'1',34,'services_attributes.php','','V'),
  (35,3,'1',35,'services_bookings.php','','V'),
  (36,31,'1',36,'services_mainpage.php', 'create_category=new','V'),
  (37,4,'1',1,'products_mainpage.php','','P'),
  (38,4,'1',2,'products_attributes.php','','P'),
  (39,4,'1',3,'products_manufacturers.php','','P'),
  (40,4,'1',4,'modules.php','set=shipping',''),
  (41,4,'1',5,'modules.php','set=fulfiller',''),
  (42,4,'1',6,'products_reviews.php','','P'),
  (43,4,'1',8,'products_specials.php','','P'),
  (44,4,'1',9,'products_expected.php','','P'),
  (45,4,'1',10,'products_easypopulate.php','',''),
  (46,4,'1',11,'configuration.php','',''),
  (47,37,'1',1,'products_create.php','create_category=new','P'),
  (180,4,'1',180,'products_featured.php','',''),
  (179,40,'1',1,'configuration.php','',''),
  (51,5,'1',51,'subscriptions_mainpage.php','',''),
  (52,51,'1',52,'subscriptions_create.php','create_category=new','S'),
  (53,6,'1',1,'cms_mainpage.php','',''),
  (54,6,'1',54,'cms_level_pages.php','level=1',''),
  (55,6,'1',55,'cms_level_pages.php','level=2',''),
  (56,6,'1',56,'','',''),
  (57,6,'1',57,'marketing_email_messages.php','flag=open',''),
  (58,7,'1',58,'marketing_email_messages.php','',''),
  (59,7,'1',59,'configuration.php','',''),
  (60,7,'1',60,'','',''),
  (61,7,'1',61,'','',''),
  (62,7,'1',62,'marketing_affiliate_affiliates.php','',''),
  (63,7,'1',63,'marketing_seo.php','',''),
  (200,7,'1',200,'marketing_wallet.php','',''),
  (65,7,'1',65,'marketing_newsletters.php','',''),
  (67,59,'1',2,'marketing_survey_events.php','','E'),
  (68,59,'1',3,'marketing_survey_services.php','','V'),
  (69,60,'1',69,'marketing_events_messages.php','','E'),
  (70,60,'1',70,'marketing_services_messages.php','','V'),
  (71,60,'1',71,'marketing_products_message.php','','P'),
  (72,60,'1',72,'marketing_subscription_messages.php','','S'),
  (73,60,'1',73,'configuration.php','',''),
  (75,61,'1',1,'configuration.php','',''),
  (76,61,'1',2,'marketing_events_sms_messages.php','','E'),
  (77,61,'1',77,'marketing_services_sms_messages.php','',''),
  (78,61,'1',4,'marketing_subscription_sms_messages.php','','S'),
  (79,62,'1',79,'configuration.php','',''),
  (185,62,'1',2,'marketing_affiliate_payment.php','',''),
  (184,62,'1',1,'marketing_affiliate_summary.php','',''),
  (182,61,'1',5,'modules.php','set=sms',''),
  (85,8,'1',85,'','',''),
  (86,8,'1',86,'','','P'),
  (87,8,'1',87,'sales_coupon.php','',''),
  (88,85,'1',88,'sales_events_discounts.php','','E'),
  (89,85,'1',89,'sales_maker.php','','P'),
  (90,86,'1',90,'sales_xsell_products.php','type=P','P'),
  (91,9,'1',91,'modules.php','set=payment',''),
  (93,9,'1',93,'configuration.php','',''),
  (94,9,'1',94,'payment_currencies.php','',''),
  (95,9,'1',95,'','',''),
  (96,9,'1',96,'','',''),
  (97,9,'1',99,'','',''),
  (98,95,'1',98,'payment_general_templates.php','action=create_template&type=TIC','E'),
  (99,95,'1',99,'payment_services_templates.php','action=create_template&type=TICS','V'),
  (100,96,'1',100,'payment_general_templates.php','action=create_template&type=ICD','E'),
 (101,96,'1',101,'payment_services_templates.php','action=create_template&type=ICDS','V'),
  (102,10,'1',102,'','',''),
  (103,10,'1',103,'','','E'),
  (104,10,'1',104,'','','P'),
  (105,10,'1',105,'','','V'),
  (106,10,'1',106,'','','S'),
  (107,10,'1',107,'','',''),
  (108,102,'1',108,'reports_sales_products.php','',''),
  (109,102,'1',109,'reports_sales_referral_sources.php','',''),
  (110,102,'1',110,'reports_sales_direct_deposit.php','',''),
  (111,103,'1',111,'reports_events_surveys_summary.php','','E'),
  (112,103,'1',112,'reports_events_viewed.php','','E'),
  (113,103,'1',113,'reports_events_waitlist.php','','E'),
  (114,103,'1',114,'reports_events_progress.php','','E'),
  (115,103,'1',115,'reports_events_birthday_list.php','','E'),
  (116,103,'1',116,'reports_events_daily_reservations.php','','E'),
  (117,103,'1',117,'reports_events_unpaid_payments.php','','E'),
  (118,103,'1',118,'reports_events_call_centre_orders.php','','E'),
  (119,103,'1',119,'reports_events_customer_details.php','','E'),
  (120,103,'1',120,'reports_events_non_returns.php','','E'),
  (121,103,'1',121,'reports_events_attendees.php','','E'),
  (122,103,'1',122,'reports_events_attendance_analysis.php','','E'),
  (123,103,'1',123,'reports_events_mailing_labels.php','','E'),
  (124,103,'1',124,'reports_events_instructor_payments.php','','E'),
  (125,103,'1',125,'reports_events_pending_payments.php','','E'),
  (126,103,'1',126,'reports_event_tickets.php','','E'),
  (127,103,'1',127,'reports_events_idcards.php','','E'),
  (128,104,'1',128,'reports_products_viewed.php','','P'),
  (129,104,'1',129,'reports_products_inventory.php','','P'),
  (130,104,'1',130,'reports_products_cart_drop.php','','P'),
  (131,104,'1',131,'reports_products_fulfiller.php','','P'),
  (132,105,'1',132,'reports_services_bookings.php','','V'),
  (133,105,'1',133,'reports_services_attendees.php','','V'),
  (134,105,'1',134,'reports_services_util.php','','V'),
  (135,105,'1',135,'reports_services_surveys_summary.php','','V'),
  (136,105,'1',136,'reports_services_viewed.php','','V'),
  (137,105,'1',137,'reports_services_forsale.php','','V'),
  (138,105,'1',138,'reports_services_pending_orders.php','','V'),
  (139,105,'1',139,'reports_services_callc_orders.php','','V'),
  (140,105,'1',140,'reports_services_customer_details.php','','V'),
  (141,105,'1',141,'reports_services_non_returns.php','','V'),
  (142,105,'1',142,'reports_services_resources_view.php','','V'),
  (143,105,'1',143,'reports_services_idcarts.php','','V'),
  (144,105,'1',144,'reports_services_tickets.php','','V'),
  (145,106,'1',145,'reports_subscription_details.php','','S'),
  (146,106,'1',146,'reports_subscription_renewals.php','','S'),
  (147,106,'1',147,'reports_subscription_non_renewals.php','','S'),
  (148,106,'1',148,'reports_subscription_viewed.php','','S'),
  (149,106,'1',149,'reports_subscription_unpaid_payments.php','','S'),
  (150,106,'1',150,'reports_subscription_packing_slip.php','','S'),
  (151,107,'1',151,'reports_wallet.php','',''),
  (152,11,'1',152,'configuration.php','',''),
  (153,11,'1',153,'shop_template_configuration.php','',''),
  (154,11,'1',154,'shop_zones.php','',''),
  (155,11,'1',155,'configuration.php','',''),
  (156,11,'1',156,'shop_languages.php','',''),
  (157,11,'1',157,'shop_file_manager.php','',''),
  (158,11,'1',158,'shop_admin_members.php','',''),
  (159,11,'1',159,'configuration.php','',''),
  (160,11,'1',160,'configuration.php','',''),
  (161,155,'1',161,'configuration.php','',''),
  (162,159,'1',162,'configuration.php','',''),
  (163,159,'1',163,'configuration.php','',''),
  (165,160,'1',2,'configuration.php','gID=2',''),
  (166,160,'1',3,'configuration.php','',''),
  (168,160,'1',6,'configuration.php','',''),
  (169,160,'1',7,'configuration.php','',''),
  (170,160,'1',170,'configuration.php','',''),
  (171,160,'1',10,'shop_backup.php','',''),
  (172,160,'1',11,'shop_whos_online.php','',''),
  (173,160,'1',12,'shop_compat_test.php','',''),
  (183,12,'1',1,'myaccount_update_account.php','action=check_account',''),
  (176,11,'1',176,'account.php','',''),
  (201,93,'1',1,'shop_geo_zones.php','',''),
  (223,7,'1',223,'marketing_events_messages_log.php','',''),
  (178,2,'1',177,'events_pending_waitlist_payments.php','','E'),
  (186,62,'1',3,'marketing_affiliate_sales.php','',''),
  (187,62,'1',4,'marketing_affiliate_clicks.php','',''),
  (188,62,'1',5,'marketing_affiliate_banners.php','',''),
  (189,62,'1',6,'marketing_affiliate_contact.php','',''),
  (190,87,'1',1,'sales_gv_queue.php','',''),
  (191,87,'1',2,'sales_gv_mail.php','',''),
  (192,87,'1',3,'sales_gv_sent.php','',''),
  (194,46,'1',1,'configuration.php','',''),
  (195,46,'1',2,'configuration.php','',''),
  (196,46,'1',3,'configuration.php','',''),
  (197,59,'1',4,'marketing_survey_referrals.php','',''),
  (198,59,'1',5,'marketing_survey_customer_options.php','type=O',''),
  (199,59,'1',6,'marketing_survey_customer_options.php','type=I',''),
  (202,93,'1',2,'payment_tax_classes.php','',''),
  (203,93,'1',2,'payment_tax_rates.php','',''),
  (204,46,'1',204,'configuration.php','',''),
  (208,97,'1',208,'configuration.php','',''),
  (207,97,'1',207,'modules.php','set=ordertotal',''),
  (209,160,'1',209,'configuration.php','',''),
  (210,56,'1',1,'cms_news.php','',''),
  (211,56,'1',2,'cms_news_reviews.php','',''),
  (212,56,'1',3,'cms_news_configuration.php','gID=3',''),
  (213,56,'1',5,'cms_news_configuration.php','gID=2',''),
  (214,56,'1',6,'cms_news_configuration.php','gID=4',''),
  (215,56,'1',4,'cms_news_configuration.php','gID=1',''),
  (216,6,'1',216,'cms_faq.php','',''),
  (217,216,'1',1,'cms_faq_reviews.php','',''),
  (218,216,'1',2,'cms_faq_configuration.php','gID=1',''),
  (219,216,'1',5,'cms_faq_configuration.php','gID=2',''),
  (220,216,'1',4,'cms_faq_configuration.php','gID=3',''),
  (221,216,'1',4,'cms_faq_configuration.php','gID=4',''),
  (222,216,'1',6,'cms_faq_configuration.php','gID=5',''),
  (224,223,'1',1,'marketing_events_messages_log.php','','E'),
  (225,223,'1',2,'marketing_services_messages_log.php','','V'),
  (226,223,'1',3,'marketing_subscription_messages_logs.php','','S'),
  (227,11,'1',227,'shop_orders_status.php','',''),
  (228,11,'1',228,'quick_links.php','',''),
  (229,24,'1',229,'events_instructor_payments.php','','E'),
  (230,9,'1',97,'configuration.php','',''),
  (231,7,1,231,'configuration.php','',''),
  (232,8,1,1,'customers_order_create.php','',''),
  (233,62,1,8,'marketing_affiliate_emarketing.php','action=new_message&type=FAQ',''),
  (234,62,1,9,'marketing_affiliate_emarketing.php','action=new_message&type=TRM',''),
  (235,62,1,10,'marketing_affiliate_emarketing.php','action=new_message&type=AIM',''),
  (236,153,1,2,'shop_infobox_configuration.php','',''),
  (237, 51, '1', 324, 'subscriptions_mainpage.php', 'create_subscription=new', 'S'),
  (238, 37, '1', 325, 'products_mainpage.php', 'create_product=new', 'P'),
  (239, 31, '1', 326, 'services_mainpage.php', 'create_service=new', 'V'),
  (240, 20, '1', 327, 'events_mainpage.php', 'create_event=new', 'E');


INSERT INTO `admin_menus_description` (`menu_id`, `menu_text`, `language_id`) VALUES 
  (1,'Customers',1),
  (2,'Events',1),
  (3,'Services',1),
  (4,'Products',1),
  (5,'Subscriptions',1),
  (6,'CMS',1),
  (7,'Marketing',1),
  (8,'Sales',1),
  (9,'Payment',1),
  (10,'Reports',1),
  (11,'Shop Settings',1),
  (12,'My Account',1),
  (13,'Create Customer',1),
  (14,'Create Order',1),
  (15,'Advanced',1),
  (16,'Customer Groups',1),
  (17,'Subscription Groups',1),
  (209,'Download',1),
  (19,'Check In',1),
  (20,'Manage Events',1),
  (21,'Bookings',1),
  (22,'Wait Lists',1),
  (23,'Locations',1),
  (24,'Instructors',1),
  (25,'Advanced',1),
  (26,'Create Event',1),
  (27,'Messages',1),
  (28,'Advanced',1),
  (29,'View Events',1),
  (30,'Custom Questions',1),
  (31,'Manage Services',1),
  (32,'Resources',1),
  (33,'Locations',1),
  (34,'Attributes',1),
  (35,'Bookings',1),
  (36,'Create Service',1),
  (37,'Manage Products',1),
  (38,'Attributes',1),
  (39,'Manufacturers',1),
  (40,'Shipping',1),
  (41,'Fulfillers',1),
  (42,'Reviews',1),
  (43,'Specials',1),
  (44,'Expected Products',1),
  (45,'Quick Uploads',1),
  (46,'Advanced',1),
  (47,'Create Product',1),
  (204,'Listing',1),
  (180,'Featured',1),
  (179,'Options',1),
  (51,'Manage Subscriptions',1),
  (52,'Create Subscription',1),
  (53,'Homepage',1),
  (54,'Level1',1),
  (55,'Level2',1),
  (56,'News',1),
  (57,'Contact Us',1),
  (58,'General',1),
  (59,'Surveys',1),
  (60,'eMarketing',1),
  (61,'SMS Marketing',1),
  (62,'Affiliates',1),
  (63,'SEO',1),
  (200,'Wallet',1),
  (65,'Newsletters',1),
  (203,'Rates',1),
  (67,'Events',1),
  (68,'Services',1),
  (69,'Events',1),
  (70,'Services',1),
  (71,'Products',1),
  (72,'Subscriptions',1),
  (73,'Advanced',1),
  (202,'Classes',1),
  (75,'Advanced',1),
  (76,'Events',1),
  (77,'Services',1),
  (78,'Subscriptions',1),
  (79,'Advanced',1),
  (188,'Banners',1),
  (187,'Clicks',1),
  (186,'Sales',1),
  (185,'Payment',1),
  (182,'SMS Gateways',1),
  (85,'Discounts',1),
  (86,'Cross Sales',1),
  (87,'Vouchers/Coupons',1),
  (88,'Events',1),
  (89,'Products',1),
  (90,'Products',1),
  (91,'Payment Gateways',1),
  (201,'Zones',1),
  (93,'Tax',1),
  (94,'Currencies',1),
  (95,'Tickets',1),
  (96,'ID Cards',1),
  (97,'Advanced',1),
  (98,'Events',1),
  (99,'Services',1),
  (100,'Events',1),
  (101,'Services',1),
  (102,'General',1),
  (103,'Events',1),
  (104,'Products',1),
  (105,'Services',1),
  (106,'Subscriptions',1),
  (107,'Wallet',1),
  (108,'Sales',1),
  (109,'Referral Sources',1),
  (110,'Bank Deposits',1),
  (111,'Surveys',1),
  (112,'Events Viewed',1),
  (113,'Waitlists',1),
  (114,'Events Progress',1),
  (115,'Birthday List',1),
  (116,'Daily Reservations',1),
  (117,'Unpaid Payments',1),
  (118,'Call Centre Orders',1),
  (119,'Customer Details',1),
  (120,'Events Non Returns',1),
  (121,'Events Attendees',1),
  (122,'Attendance Analysis',1),
  (123,'Mailing Labels',1),
  (124,'Instructor Payments',1),
  (125,'Pending Payments',1),
  (126,'Tickets',1),
  (127,'ID Cards',1),
  (128,'Products Viewed',1),
  (129,'Inventory',1),
  (130,'Dropped Cart',1),
  (131,'Fulfiller',1),
  (132,'Bookings',1),
  (133,'Services Attendees',1),
  (134,'Services Utilization',1),
  (135,'Surveys',1),
  (136,'Services Viewed',1),
  (137,'Services for sale',1),
  (138,'Pending Orders',1),
  (139,'Call Center Orders',1),
  (140,'Customer Details',1),
  (141,'Services Non Returns',1),
  (142,'Resources View',1),
  (143,'ID Cards',1),
  (144,'Tickets',1),
  (145,'Subscriptions',1),
  (146,'Renewals',1),
  (147,'Non Renewals',1),
  (148,'Subscription Viewed',1),
  (149,'Unpaid Payments',1),
  (150,'Packing Slip',1),
  (151,'Wallet Uploads',1),
  (152,'General',1),
  (153,'Template',1),
  (154,'Zones',1),
  (155,'Images',1),
  (156,'Languages',1),
  (157,'Files',1),
  (158,'Admin User Groups',1),
  (159,'Emergency Processes',1),
  (160,'Advanced',1),
  (161,'Advanced',1),
  (162,'Site Maintenance Wizard',1),
  (163,'Emergency Support',1),
  (223,'Logs',1),
  (165,'Values',1),
  (166,'Logging',1),
  (210,'Article Management',1),
  (168,'Sessions',1),
  (169,'Reports',1),
  (170,'HTMLArea',1),
  (171,'Backups',1),
  (172,'Who''s Online',1),
  (173,'Compatability Test',1),
  (184,'Summary',1),
  (183,'Update Account',1),
  (178,'Waitlist Payments',1),
  (189,'Contact',1),
  (190,'Gift Voucher Queue',1),
  (191,'Mail Gift Voucher',1),
  (192,'Gift Vouchers sent',1),
  (194,'Stock',1),
  (195,'Orders',1),
  (196,'GZip Compression',1),
  (197,'Customer Referral',1),
  (198,'Customer Occupation',1),
  (199,'Customer Interest',1),
  (208,'Wallet',1),
  (207,'Order Totals',1),
  (211,'Reviews Management',1),
  (212,'Reviews Settings',1),
  (213,'Frontpage Settings',1),
  (214,'Sticky Settings',1),
  (215,'Listing Settings',1),
  (216,'FAQ',1),
  (217,'Reviews Management',1),
  (218,'Listing Settings',1),
  (219,'Frontpage Settings',1),
  (220,'Reviews Settings',1),
  (221,'Sticky Settings',1),
  (222,'Other Settings',1),
  (224,'Events',1),
  (225,'Services',1),
  (226,'Subscriptions',1),
  (227,'Orders Status',1),
  (228,'Quick Links',1),
  (229,'Payments',1),
  (230,'General',1),
  (231,'Options',1),
  (232,'Create Order',1),
  (233,'FAQ',1),
  (234,'Terms',1),
  (235,'Information',1),
  (236,'Infoboxes',1),
  (237, 'Create Subscription', 1),
  (238, 'Create Product', 1),
  (239, 'Create Service', 1),
  (240, 'Create Event', 1);

insert into configuration (configuration_title,configuration_key,configuration_value,configuration_description,configuration_group_id,sort_order,last_modified,date_added,use_function,set_function)	values('Customers Password Strength','MODULE_CUSTOMERS_PASSWORD_STRENGTH','2','Password Strength: 1 = no checking, 2 = alphanumeric, 3 = alphanumeric + symbols','2','1','0000-00-00','0000-00-00','tep_get_password_option_title','tep_cfg_password_option(array(\'1\',\'2\',\'3\'),');
insert into configuration (configuration_title,configuration_key,configuration_value,configuration_description,configuration_group_id,sort_order,last_modified,date_added,use_function,set_function)values('Admin Password Strength','MODULE_ADMIN_PASSWORD_STRENGTH','2','Password Strength: 1 = no checking, 2 = alphanumeric, 3 = alphanumeric + symbols','2','1','0000-00-00','0000-00-00','tep_get_password_option_title','tep_cfg_password_option(array(\'1\',\'2\',\'3\'),');
INSERT INTO admin_files ( admin_files_name, admin_files_is_boxes, admin_files_to_boxes, admin_groups_id) VALUES ( 'marketing_affiliate_emarketing.php', 1, 1, '1');

alter table orders add date_paid  datetime default '0000-00-00 00:00:00';
Alter table affiliate_affiliate Add affiliate_username varchar(32) Not Null;
Update orders_status set orders_status_name='Processed' where orders_status_id=2;


insert into email_messages(message_send,message_subject,
message_reply_to,message_text,message_format,message_type) 
values('','Contact Us','','<p>%%Continue Button%%  %%Reset Button%%</p><p>Name %%Name Text Box%%</p><p>Email %%Email Text Box%%</p><p>Messages:</p><p>%%Comments Text Box%%<br /></p>','','CON');

Alter Table affiliate_banners add affiliate_products_type char(1);
Alter table affiliate_affiliate add affiliate_payment_type char(1);
update configuration set configuration_value='43200' where configuration_key='AFFILIATE_COOKIE_LIFETIME';

insert into email_messages(message_send,message_subject,message_reply_to,message_text,message_format,message_type) values('','','','<strong>Affiliate Terms<br>Terms, Conditions and Acceptable Use </strong><p>You must read, agree to, and accept the terms and conditions in this agreement before participating in the Freeway Affiliate Programme.</p><p>In this agreement, the term &quot;Affiliate&quot; refers to you (the applicant). Wherever the agreement refers to &quot;you&quot; or &quot;your&quot;, it means &quot;the Affiliate.&quot; The terms &quot;we&quot;, &quot;our&quot;, and &quot;us&quot; throughout this user agreement refers to the company ZacWare Pty. Ltd., the company that has created the programme.</p><p><strong>Payment</strong></p><p>ZacWare will send payment via Cheque, Direct Bank deposit or PayPal for the applicable commissions on or about the 1st of the month for the previous month\'s commissions when your balance exceeds $50. If a sale that generated a commission is cancelled by the customer or us, or charged back, the commission amount will be deducted from the next monthly payment. If there is no subsequent payment, the Affiliate will be invoiced. </p> <p>ZacWare will be solely responsible for processing every order placed by a customer on the website.</p><p><strong>Customers</strong></p><p>Customers who purchase products and services through the Affiliate Programme are customers of ZacWare. All ZacWare rules, policies, and operating procedures concerning customer orders and service apply to those customers. We may change our shop conditions and rules at any time. ZacWare policies determine the price paid by the customer.</p><p><strong>Qualifying Sites</strong></p><p>ZacWare reserves the right to refuse Affiliate Programme applications. All sites will be reviewed and sites on certain content topics will not be accepted. Prohibited site content includes, but is not limited to:</p><ul><li> Pornography of any kind, including but not limited to online subscription pornography. Anything that falls into the category of &quot;adult entertainment&quot; is prohibited.</li><li> Any form of &quot;hate&quot; oriented site.</li><li> Animal cruelty or procedures deemed harmful, unnecessary or unnatural to animals.</li><li> Any type of firearms, fireworks or pyrotechnic devices or supplies.</li><li> The sale of alcoholic beverages, tobacco products, live animals, prescription drugs or other controlled substances, hazardous materials, combustibles, corrosives.</li><li> Unsolicited email services of any kind.</li><li> Gambling transactions of any kind, including lottery, raffles, contest sites.</li><li> Money making, work at home, home mailing, multi level marketing, pyramid schemes, or similar products.</li><li> Phone chat lines or psychic readings.</li><li> Any form of sex product (viagra, penis, breast enlargement) growth hormones, nutrients, wonder drugs, or human growth hormone.</li></ul><p><strong>Additionally, sites may not:</strong></p><ul><li> Violate the privacy, publicity or personal rights of others.</li><li> Infringe on the intellectual property rights of others, i.e., copyrights, trademarks, trade secrets, plagarism, software piracy, patents, music, images, or other proprietary or property right. Materials that infringe on the intellectual property rights may not be distributed to others.</li><li> Include Defamatory or Abusive Language. Sites may not contain any material that is unlawful, harmful, fraudulent, abusive, vulgar, hateful, racial or otherwise objectionable, including, without limitation, any material that encourages conduct that would constitute a criminal offense, give rise to civil liability, or otherwise violate any applicable local, state, national or international law. Sites with defamatory, abusive or threatening language will be shut down.</li><li> Distribute viruses or worms or provide information on how to send them. Any site promoting any form of cyber crime or other illegal computer activities will be shut down.</li><li> Any illegal activities. ZacWare reserves the right to shut down your Affiliate Programme if any activities are found to be harmful in any way.</li><li> You may not use your Affiliate link as an entryway to pay for your own purchases.</li></ul><p><strong>No Spam</strong></p><p>ZacWare has a zero tolerance policy for spam. Spam is defined as any unsolicited email whether commercial or non-commercial in nature. Spam includes, but is not limited to, the sending of ANY unsolicited information to a person or group that has not specifically asked to receive that particular information or is not a personal acquaintance of the individual sending the information. All Affiliates are expected to adhere to ZacWare\'s no spam policy. Affiliates may promote ZacWare to &quot;opt-in&quot; lists only. If you run a newsletter, ezine, or other kind of bulk email service, you must maintain evidence that people signed up to receive email from you. Any and all spam complaints will be investigated thoroughly. If you spam, we will terminate your Affiliate status.</p><p>Part of the no spam policy means, you may NOT:</p><p> Send any email to any type of &quot;lead&quot; or &quot;prospect&quot; before you have received a request for more information.<br> Fax any message to any recipient that has not requested the information first.<br>Send inappropriate postings to any newsgroup or forum that violates their anti-spam regulations.</p><p>ZacWare reserves the right to terminate the Affiliate status or refuse service of any person or organisation at any time for any reason, or no reason at all. An Affiliate that engages spam or in promoting prohibited products or services in connection with their site in any way shall have their Affiliate contract terminated and lose any or all Affiliate commissions due to them. The site owner also shall be held liable for any and all damages and/or losses that may result as a consequence.</p><p><strong>Relationship of Parties</strong></p><p>ZacWare and the Affiliate are independent contractors, and nothing in this Agreement will create any partnership, joint venture, agency, franchise, sales representative, or employment relationship between the parties. You will have no authority to make or accept any offers or representations on our behalf. You will not make any statement, whether on your site or otherwise, that reasonably would contradict this statement.<br>No Warranties</p><p>ZacWare makes no warranties of any kind, whether express or implied, with respect to the Affiliate Programme. ZacWare is not be responsible for damages suffered by any customer, including incidental damages or lost profits. ZacWare makes no representation that the operation of our site or the Affiliate Sites will be uninterrupted or error-free, and we will not be liable for the consequences of any interruptions or errors. All content in the ZacWare software and Affiliate Programme is provided &quot;as is&quot; without warranty of any kind either express or implied including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose, title, non-infringement, security or accuracy.</p><p>Additionally, ZacWare in no way guarantees financial success through the Affiliate Programme or that any users of the Affiliate Programme or our products will make money in any amount. We are not offering you a guaranteed business opportunity of any sort.</p><p><strong>Governing Law/Severability</strong></p><p>This agreement between you and ZacWare will be governed by and construed in accordance with the laws of the Queensland (Australia). You agree that any litigation or arbitration between the parties will take place in Queensland (Australia). If any provision of this Agreement is held by a Court of competent jurisdiction to be invalid, void or unenforceable, the remaining provisions shall nevertheless continue in full force and effect without being impaired or invalidated in any way. </p><p><strong>Complete Understanding/Modification</strong></p><p>These Terms &amp; Conditions constitute the full and complete understanding and agreement between you and ZacWare relating to the subject matter hereof, and supersede all prior understandings, agreements, representations and warranties relating to such subject matter. Any waiver, modification, or amendment of any provision of this Terms &amp; Conditions, initiated by you will be effective only if accepted in writing and signed by ZacWare.<br></p>
','','TRM');


insert into email_messages (message_send,message_subject,message_reply_to,message_text,message_format,message_type)values('','Affiliate FAQ','','<br /><a name="top"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="main" colspan="2">We hope this info answers the questions you have about the Freeway affiliate program.<br />If you have any questions please <a href="affiliate_contact.php"> Contact Us </a> for more information.</td></tr><tr><td width="10" height="10" colspan="2"></td></tr><tr><td width="10" height="45"></td><td class="main"><p><font size="4" color="#000000"><b>FrequentlyAsked Questions</b></font></p><ul><li><strong>What is the commission payout for the Freeway Affiliate Program? </strong><font color="maroon">&nbsp;</font><a name="1"></a></li><li><strong>How do I join the Freeway Affiliate Program? </strong><a name="2"></a></li><li><strong>Why should I join the Affilate programme? </strong><a name="3"></a></li><li><strong>What are the Affiliate terms? </strong><a name="4"></a></li><li><strong>Does the Affiliate programme have multiple tiers? </strong><a name="5"></a></li><li><strong>Can I see a record of the clicks that come from my site? </strong><a name="6"></a></li><li><strong>Is there a minimum commission value which must be reached before an Affiliate will be paid out? </strong><a name="7"></a></li><li><strong>How are Affiliates paid? </strong><a name="8"></a></li><li><strong>What is the cookie duration for the Freeway Affiliate Program? </strong><a name="9"></a></li><li><strong>When will I get paid for affiliate commissions?</strong><a name="10" id="10"></a></li><li><strong>How do I check reports on the Freeway Affiliate Program? </strong><a name="11" id="11"></a></li><li><strong>How often are reports updated? </strong><a name="12" id="12"></a></li><li><strong>Who do I contact if I have questions regarding the Freeway Affiliate Program? </strong><a name="13" id="13"></a></li><li><strong>When How soon will my affiliate application be processed by Freeway?</strong><a name="14" id="14"></a></li></ul></td></tr><tr><td width="10"></td><td><table width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td class="main"><strong>What is the commission payout for the Freeway Affiliate Program? </strong><font color="maroon">&nbsp;</font></td></tr><tr><td class="main">The base commission rate is 20%. Affiliates that generate greater than $10,000 / month in revenue should contact <a href="mailto: affiliates@zac-ware.com"> affiliates@zac-ware.com</a> to learn if you qualify for a higher commission rate </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>How do I join the Freeway Affiliate Program? </strong></td></tr><tr><td class="main">To join the Freeway Affiliate Program:</td></tr><tr><td class="main"><ol><li>Go here</li><li>Create an affiliate account or login to your affiliate account</li><li>Click the Get Links Tab</li><li>Create banners for your site.</li><li>Add the banner code to your site.</li><li>It\'s that easy.</li></ol></td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>Why should I join the Affilate programme? </strong></td></tr><tr><td class="main">You can make money when your website visitors click through to the Freeway site and purchase support agreements. Simply add our banners to your site. Need any other reasons? .</td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>What are the Affiliate terms? </strong></td></tr><tr><td class="main">All the Afilliate terms can be found<a href="affiliate_terms.php"> here</a> </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>Does the Affiliate programme have multiple tiers? </strong></td></tr><tr><td class="main">No, we only have one tier in our programme. </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>Can I see a record of the clicks that come from my site? </strong></td></tr><tr><td class="main">Yes, you can see your affiliate clickthroughs at any time. </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>Is there a minimum commission value which must be reached before an Affiliate will be paid out? </strong></td></tr><tr><td class="main">Yes, an Affiliate must have reached $50.00 USD in commissions before the Affiliate will be paid out.</td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>How are Affiliates paid? </strong></td></tr><tr><td class="main">Affiliates are paid via Cheque, Direct Bank deposits or PayPal. CafePress Affiliate Program powered by Commission JunctionProgram Benefits for Affiliates </td></tr><tr><td class="main"><ul type="disc"><li>Real time tracking and reporting of affiliate sales and commissions.</li><li>Monthly payment </li><li>Flash and HTML banner availability. </li><li>Seasonal and holiday banner creative.</li></ul></td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>What is the cookie duration for the Freeway Affiliate Program? </strong></td></tr><tr><td class="main">The cookie duration for the Freeway Affiliate Program 30 days. This means that you will earn a commission on orders for users you refer to Freeway that do not make a purchase immediately but return to the site within 30 days of the initial visit. If the visitor returns to Freeway via another affiliate link or a Freeway marketing campaign within that 30-day period, the most recent referrer earns credit for the sale. </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>When will I get paid for affiliate commissions?</strong></td></tr><tr><td class="main">The Freeway transaction life cycle is 45 days. This means orders and commissions reported in your affiliate account may potentially get reversed if an order is cancelled or returned within the 45 day life cycle period. After 45 days, the transaction &quot;locks&quot; for payment. Commission payments are made on or about the first day of each month. </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>How do I check reports on the Freeway Affiliate Program?</strong></td></tr><tr><td class="main"><ul type="circle"><li>Login to your affiliate account.</li><li>Review your reports </li><li>If you have specific questions about reports available, please contact Freeway for help or email <a href="mailto: affiliates@zac-ware.com"> affiliates@zac-ware.com</a></li></ul></td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>How often are reports updated? </strong></td></tr><tr><td class="main">Traffic, order revenue, and commissions are submitted real-time. Freeway has a 45-day transaction life cycle. This means orders that are returned or cancelled may be corrected and commissions reversed anytime within 45 days of the order date. After 45 days, the transaction &quot;locks&quot; for payment. </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>Who do I contact if I have questions regarding the Freeway Affiliate Program? </strong></td></tr><tr><td class="main">Please email us at affiliates@cafepress.com and we would be happy to help you with questions regarding joining the CJ affiliate program and migrating your existing CafePress affiliate links to the new CJ format. </td></tr><tr><td align="right" class="main"><a href="affiliate_faq.php?#top">top</a></td></tr><tr><td class="main"><strong>When How soon will my affiliate application be processed by Freeway?</strong></td></tr><tr><td class="main">Due to our application review process, please allow 4-5 business days for your affiliate application to be processed. </td></tr><tr><td align="right" class="main">&nbsp;</td></tr></tbody></table></td></tr></tbody></table>','H','FAQ');


update template set template_image='freeway.png' where template_name='Freeway';

Alter Table orders add ip_address varchar(15);

update affiliate_affiliate set affiliate_payment_type='C' where affiliate_id='3';

INSERT into sql_queries values('freeway_v1_0_1.sql',now());
