#1.11.15 UPDATE BEGIN
ALTER TABLE `sevence`.`bt_product` ADD COLUMN `description` TEXT NULL  AFTER `desc` ;
#RC 12.18.14 M2332: Add column to bt_product TABLE

ALTER TABLE `sevence`.`bt_product` ADD COLUMN `billing_calc` INT(11) NULL  AFTER `active` , 
  ADD CONSTRAINT `billing_calc`
  FOREIGN KEY (`billing_calc` )
  REFERENCES `sevence`.`billing_calc` (`billing_calc` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `billing_calc_idx` (`billing_calc` ASC) ;
#RC 12.18.14 M2331: Add column to bt_product TABLE

CREATE TABLE `sevence`.`advisor_performance` (
  `advisor_performance` INT NOT NULL AUTO_INCREMENT,
  `advisor` INT NULL,
  `date` DATE NULL,
  `calls` INT NULL,
  `set_presentation` INT NULL,
  `presentations_scheduled` INT NULL,
  `presentations_completed` INT NULL,
  `presentations_completed_one_week` INT NULL,
  `schedule_followup` INT NULL,
  `schedule_followup_2_days` INT NULL,
  `follow_up_pres_comp` INT NULL,
  `follow_up_pres_comp_7_days` INT NULL,
  `sold` INT NULL,
  `sold_in_14` INT NULL,
  PRIMARY KEY (`advisor_performance`),
  INDEX `advisor_idx` (`advisor` ASC),
  CONSTRAINT `advisor_idx_10`
    FOREIGN KEY (`advisor`)
    REFERENCES `sevence`.`prof` (`prof`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#MT 12.18.14 0002330: The Advisor performance report

CREATE TABLE `sevence`.`dp_memberships` (
  `dp_memberships` INT NOT NULL AUTO_INCREMENT,
  `dp_design` INT NULL,
  `membership_descr` TEXT NULL,
  PRIMARY KEY (`dp_memberships`),
  INDEX `dp_design_idx_idx` (`dp_design` ASC),
  CONSTRAINT `dp_design_idx`
    FOREIGN KEY (`dp_design`)
    REFERENCES `sevence`.`dp_design` (`dp_design`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#MT 01.05.15 0002349: Design Package DB, UI and API for memberships

CREATE TABLE `sevence`.`web_tools` (
  `web_tools` INT NOT NULL AUTO_INCREMENT,
  `web_tools_name` VARCHAR(100) NULL,
  `web_tools_descr` TEXT NULL,
  `active` INT NULL,
  PRIMARY KEY (`web_tools`));
#MT 01.05.15 0002348: web tools GET

ALTER TABLE `sevence`.`dp_web_tools` 
DROP COLUMN `web_tool_name`,
ADD COLUMN `web_tools` INT NULL AFTER `dp_design`,
ADD INDEX `fk_web_tools_idx` (`web_tools` ASC);
ALTER TABLE `sevence`.`dp_web_tools` 
ADD CONSTRAINT `fk_web_tools`
  FOREIGN KEY (`web_tools`)
  REFERENCES `sevence`.`web_tools` (`web_tools`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.05.15 0002348: web tools GET

ALTER TABLE `sevence`.`dp_category` 
ADD COLUMN `selling` TINYINT(3) NULL DEFAULT 0 COMMENT '1 = Products Only 2 = Services Only 3 = Memberships Only 4 = Products and Services 5 = Products and Memberships 6 = Services and Memberships 7 = Products, Services and Memberships' AFTER `dp_design`;
ALTER TABLE `sevence`.`dp_ad_hoc` 
ADD COLUMN `selling` TINYINT(3) NULL DEFAULT 0 COMMENT '1 = Products Only 2 = Services Only 3 = Memberships Only 4 = Products and Services 5 = Products and Memberships 6 = Services and Memberships 7 = Products, Services and Memberships' AFTER `name`;
#KA 01.05.2015 M2350: Design Package - Accounting for Products, Services & Memberships for a category selected

ALTER TABLE `sevence`.`website` 
ADD COLUMN `logo_transparency` INT(11) NOT NULL DEFAULT 0 AFTER `logo_font_size`;
#MT 01.06.15 0002193: Text logo transparency

ALTER TABLE `sevence`.`dp_subcategory` 
ADD COLUMN `dp_category` INT NULL AFTER `dp_design`,
ADD INDEX `fk_dp_category_idx` (`dp_category` ASC);
ALTER TABLE `sevence`.`dp_subcategory` 
ADD CONSTRAINT `fk_dp_category`
  FOREIGN KEY (`dp_category`)
  REFERENCES `sevence`.`dp_category` (`dp_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.06.15 0002344: changes to the dp_subcategory table

ALTER TABLE `sevence`.`dp_design` ADD COLUMN `design_date` DATETIME NULL  AFTER `provide_photos`;
#DCS 01.06.2015 0002352: dp_design date field

ALTER TABLE `sevence`.`dp_product` 
ADD COLUMN `dp_category` INT(11) NULL AFTER `dp_design`,
ADD INDEX `fk_dp_category_idx` (`dp_category` ASC);
ALTER TABLE `sevence`.`dp_product` 
ADD CONSTRAINT `fk_dp_category1`
  FOREIGN KEY (`dp_category`)
  REFERENCES `sevence`.`dp_category` (`dp_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.06.15 0002279: Design package DB, UI and API changes

ALTER TABLE `sevence`.`dp_brand` 
ADD COLUMN `dp_category` INT NULL AFTER `dp_design`,
ADD INDEX `fk_dp_category2_idx` (`dp_category` ASC);
ALTER TABLE `sevence`.`dp_brand` 
ADD CONSTRAINT `fk_dp_category2`
  FOREIGN KEY (`dp_category`)
  REFERENCES `sevence`.`dp_category` (`dp_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.06.15 0002279: Design package DB, UI and API changes

ALTER TABLE `sevence`.`dp_service` 
ADD COLUMN `dp_category` INT NULL AFTER `dp_design`,
ADD INDEX `fk_dp_category3_idx` (`dp_category` ASC);
ALTER TABLE `sevence`.`dp_service` 
ADD CONSTRAINT `fk_dp_category3`
  FOREIGN KEY (`dp_category`)
  REFERENCES `sevence`.`dp_category` (`dp_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.06.15 0002279: Design package DB, UI and API changes

ALTER TABLE `sevence`.`dp_memberships` 
ADD COLUMN `dp_category` INT NULL AFTER `membership_descr`,
ADD INDEX `fk_dp_category4_idx` (`dp_category` ASC);
ALTER TABLE `sevence`.`dp_memberships` 
ADD CONSTRAINT `fk_dp_category4`
  FOREIGN KEY (`dp_category`)
  REFERENCES `sevence`.`dp_category` (`dp_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.06.15 0002279: Design package DB, UI and API changes

ALTER TABLE `sevence`.`dp_ad_hoc` ADD COLUMN `dp_cat` INT(11) NULL  AFTER `selling` , ADD COLUMN `ad_hoc_cat` INT(11) NULL  AFTER `dp_cat` ;
ALTER TABLE `sevence`.`dp_ad_hoc` CHANGE COLUMN `dp_cat` `dp_cat` INT(11) NULL DEFAULT '0'  , CHANGE COLUMN `ad_hoc_cat` `ad_hoc_cat` INT(11) NULL DEFAULT '0'  ;
#RC 01.07.15 M2357: Add column to dp_ad_hoc TABLE

ALTER TABLE `sevence`.`sample_website` ADD COLUMN `image_url` TEXT NULL  AFTER `URL`;
#DCS 01.09.15 0002382: changes to sample_website (add a text column for image_url)

ALTER TABLE `sevence`.`web_tools` ADD COLUMN `image_url` TEXT NULL  AFTER `web_tools_descr`;
#DCS 01.09.15 0002383: changes to web_tools (add a text column for image_url)

CREATE  TABLE `sevence`.`dp_category_recordings` (
  `dp_category_recordings` INT NOT NULL AUTO_INCREMENT ,
  `dp_design` INT(11) NULL ,
  `dp_cat` INT(11) NULL ,
  `business_org` INT(11) NULL ,
  `recording_type` VARCHAR(20) NULL ,
  `url` TEXT NULL ,
  PRIMARY KEY (`dp_category_recordings`) );
#RC 01.09.15 M2363: create table `dp_category_recordings`

ALTER TABLE `sevence`.`dp_category_recordings` CHANGE COLUMN `dp_cat` `dp_category` INT(11) NULL DEFAULT NULL  ;
#RC 01.09.15 M2363: ALTER table `dp_category_recordings`

CREATE TABLE `sevence`.`dp_website_pages` (
  `dp_website_pages` INT NOT NULL AUTO_INCREMENT,
  `dp_design` INT NULL,
  `business_org` INT NULL,
  `page_name` VARCHAR(50) NULL,
  `recording_url` TEXT NULL,
  PRIMARY KEY (`dp_website_pages`));
#DCS 01.09.15 0002381: Design Package: pages (new table: dp_website_pages)

ALTER TABLE `sevence`.`dp_design` ADD COLUMN `provide_logo` INT(11) NULL DEFAULT '0'  AFTER `design_date` ;
#RC 01.09.15 M2379: ALTER table `dp_design`

ALTER TABLE `sevence`.`dp_design` ADD COLUMN `match_color` INT(11) NULL DEFAULT '0'  AFTER `provide_logo` ;
#RC 01.09.15 M2384: ALTER table `dp_design`

ALTER TABLE `sevence`.`dp_design_examples`
CHANGE COLUMN `dp_design_examples` `dp_design_selection` INT(11) NOT NULL AUTO_INCREMENT,
CHANGE COLUMN `dp_design` `dp_design` INT(11) NULL DEFAULT NULL AFTER `business_org`,
DROP COLUMN `site_url`,
ADD COLUMN `sample_website` INT NULL AFTER `business_org`,
ADD COLUMN `fave` INT NOT NULL DEFAULT 0 AFTER `recording_url`,
ADD INDEX `fk_sample_website_idx` (`sample_website` ASC), RENAME TO  `sevence`.`dp_design_selection` ;
ALTER TABLE `sevence`.`dp_design_selection` 
ADD CONSTRAINT `fk_sample_website`
  FOREIGN KEY (`sample_website`)
  REFERENCES `sevence`.`sample_website` (`sample_website`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 01.09.15 0002380: changes to dp_design_example
#The business_review and claim_problem ID emails were created manually on boomtime defaults.
#1.11.15 UPDATE END

#1.25.15 UPDATE BEGIN
INSERT INTO `sevence`.`dt_category` (`dt_category`, `category_name`) VALUES ('32', 'Generic');
#SLOW 1.20.15 generic category

CREATE TABLE `sevence`.`brand_keywords` (
  `brand_keywords` INT NOT NULL AUTO_INCREMENT,
  `keyword` VARCHAR(50) NULL,
  `keyword_group` VARCHAR(50) NULL,
  `active` INT NULL,
  PRIMARY KEY (`brand_keywords`));
#MT 01.14.15 0002396: Brand Key Words source

CREATE TABLE `sevence`.`header_font` (
  `header_font` INT NOT NULL AUTO_INCREMENT,
  `font_class` VARCHAR(20) NULL,
  `header_font_name` VARCHAR(50) NULL,
  `image_url` TEXT NULL,
  `active` INT NULL,
  PRIMARY KEY (`header_font`));

CREATE TABLE `sevence`.`body_font` (
  `body_font` INT NOT NULL AUTO_INCREMENT,
  `body_font_name` VARCHAR(50) NULL,
  `image_url` TEXT NULL,
  `active` INT NULL,
  PRIMARY KEY (`body_font`));

CREATE TABLE `sevence`.`header_body_font_combo` (
  `header_body_font_combo` INT NOT NULL AUTO_INCREMENT,
  `header_font` INT NULL,
  `body_font` INT NULL,
  PRIMARY KEY (`header_body_font_combo`),
  INDEX `header_font_idx` (`header_font` ASC),
  INDEX `body_font_idx` (`body_font` ASC),
  CONSTRAINT `header_font`
    FOREIGN KEY (`header_font`)
    REFERENCES `sevence`.`header_font` (`header_font`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `body_font`
    FOREIGN KEY (`body_font`)
    REFERENCES `sevence`.`body_font` (`body_font`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

INSERT INTO body_font (body_font_name, active) VALUES ('Belganos', 1), ('Brawler', 1), ('Coda', 1), ('Crushed', 1), ('Droid Sans', 1), ('Droid Serif', 1), ('Francoise One', 1), ('Lato', 1), ('Lora', 1), ('Luisitana', 1), ('Medieval sharp', 1), ('Merriweather', 1), ('Merriweather Sans', 1), ('Open Sans', 1), ('Oswald', 1), ('Play', 1), ('Playball', 1), ('Quicksand', 1), ('R0pa Sans', 1), ('Raleway', 1), ('Roboto', 1), ('Russo one', 1), ('Special elite', 1), ('Ubuntu', 1), ('Wallpoet', 1), ('Wireone', 1);
INSERT INTO header_font (font_class, header_font_name, active) VALUES ('Energy', 'Lobster 1', 1), ('Energy', 'Sansita 1', 1), ('Energy', 'Playball', 1), ('Energy', 'Damion', 1), ('Energy', 'Baumans', 1), ('Energy', 'Mrs Sheppards', 1), ('Energy', 'Mr Dafoe', 1), ('Energy', 'Pacifico', 1), ('Elegance', 'Josephin Sans', 1), ('Elegance', 'Cinzel Decorative', 1), ('Elegance', 'Lato', 1), ('Elegance', 'Monsieur La Doulaise', 1), ('Elegance', 'Open Sans Condensed', 1), ('Elegance', 'Tangerine', 1), ('Elegance', 'Noto Serif', 1), ('Elegance', 'Engagement', 1), ('Order', 'PT Serif', 1), ('Order', 'Ubuntu', 1), ('Order', 'Oswald', 1), ('Order', 'Robot Slab', 1), ('Order', 'Open Sans Condensed', 1), ('Order', 'Cabin Condensed', 1), ('Order', 'Lato', 1), ('Order', 'Abel', 1), ('Rebellion', 'Metal Mania', 1), ('Rebellion', 'Permanent Marker', 1), ('Rebellion', 'Nosifer', 1), ('Rebellion', 'Luckiest Guy', 1), ('Rebellion', 'Rock salt', 1), ('Rebellion', 'Frijole', 1), ('Rebellion', 'Vast Shadow', 1), ('Rebellion', 'Knewave', 1), ('Technology', 'Oswald', 1), ('Technology', 'Droid Sans', 1), ('Technology', 'Raleway', 1), ('Technology', 'Cinzel', 1), ('Technology', 'Arimo', 1), ('Technology', 'Merriweather Sans', 1), ('Technology', 'News Cycle', 1), ('Technology', 'Sixcaps', 1), ('Organic', 'Miltonian tattoo', 1), ('Organic', 'Finger paint', 1), ('Organic', 'Freckle face', 1), ('Organic', 'Chango', 1), ('Organic', 'Kavoon', 1), ('Organic', 'Slackey', 1), ('Organic', 'Frederika the Great', 1), ('Organic', 'Cabin Sketch', 1);
INSERT INTO header_body_font_combo (header_font, body_font) VALUES ('1', '5'), ('1', '20'), ('1', '16'), ('2', '5'), ('2', '14'), ('2', '15'), ('3', '8'), ('3', '14'), ('3', '5'), ('4', '8'), ('4', '14'), ('4', '5'), ('5', '1'), ('5', '2'), ('5', '26'), ('6', '8'), ('6', '14'), ('6', '5'), ('7', '8'), ('7', '14'), ('7', '5'), ('8', '5'), ('8', '14'), ('8', '15'), ('9', '5'), ('9', '20'), ('9', '16'), ('10', '21'), ('10', '14'), ('10', '20'), ('23', '8'), ('23', '14'), ('23', '5'), ('12', '8'), ('12', '3'), ('12', '5'), ('21', '15'), ('21', '7'), ('21', '12'), ('14', '12'), ('14', '14'), ('14', '5'), ('15', '8'), ('1 5', '14'), ('15', '5'), ('16', '5'), ('16', '14'), ('16', '15'), ('17', '8'), ('17', '20'), ('17', '17'), ('18', '21'), ('18', '5'), ('18', '20'), ('33', '8'), ('33', '14'), ('33', '15'), ('20', '8'), ('20', '21'), ('20', '15'), ('22', '8'), ('22', '14'), ('22', '5'), ('24', '5'), ('24', '14'), ('24', '15'), ('25', '8'), ('25', '14'), ('25', '15'), ('26', '14'), ('26', '6'), ('26', '20'), ('27', '25'), ('27', '22'), ('28', '14'), ('28', '6'), ('28', '20'), ('29', '6'), ('29', '23'), ('29', '15'), ('30', '21'), ('30', '14'), ('30', '15'), ('31', '15'), ('31', '9'), ('31', '18'), ('32', '8'), ('32', '14'), ('32', '15'), ('34', '14'), ('34', '15'), ('34', '21'), ('35', '14'), ('35', '15'), ('35', '5'), ('36', '14'), ('36', '15'), ('36', '13'), ('37', '14'), ('37', '15'), ('37', '13'), ('38', '21'), ('38', '14'), ('38', '8'), ('39', '14'), ('39', '15'), ('39', '5'), ('40', '20'), ('40', '14'), ('40', '15'), ('41', '11'), ('41', '4'), ('41', '21'), ('42', '14'), ('42', '5'), ('42', '24'), ('43', '14'), ('43', '13'), ('43', '5'), ('44', '14'), ('44', '15'), ('44', '21'), ('45', '14'), ('45', '19'), ('45', '8'), ('46', '21'), ('46', '14'), ('46', '8'), ('47', '14'), ('47', '15'), ('47', '21'), ('48', '20'), ('48', '14'), ('48', '15');
#MT 01.15.15  0002400: font selection API

ALTER TABLE `sevence`.`todo_type` CHANGE COLUMN `todo_type` `todo_type` VARCHAR(50) NOT NULL  ;
ALTER TABLE `sevence`.`todo` DROP FOREIGN KEY `todo_type` ;
ALTER TABLE `sevence`.`todo` CHANGE COLUMN `todo_type` `todo_type` VARCHAR(50) NOT NULL, 
  ADD CONSTRAINT `todo_type`
  FOREIGN KEY (`todo_type` )
  REFERENCES `sevence`.`todo_type` (`todo_type` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#RC 01.16.15 M2406: ALTER tables(todo_type,todo) CHANGE field `todo_type` stucture varchar(50)

INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`) VALUES ('get_credentials', 'get_credentials');
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_bing';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_facebook';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_foursquare';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_google';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_sp';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_yahoo';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_yelp';
UPDATE `sevence`.`todo_type` SET `days`='3' WHERE `todo_type`='verify_yp';
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_google', 'Check for confirmation email from Google', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_facebook', 'Check for confirmation email for Facebook', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_yelp', 'Check for confirmation email for Yelp', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_yahoo', 'Check for confirmation email for Yahoo', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_yp', 'Check for confirmation email for YP', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_bing', 'Check for confirmation email for Bing', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_twitter', 'Check for confirmation email for Twitter', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('confirm_email_superpages', 'Check for confirmation email for Super Pages', '0');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_google', 'Did the Google postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_bing', 'Did the Bing postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_facebook', 'Did the Facebook postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_yelp', 'Did the Yelp postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_yp', 'Did the YP postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_yahoo', 'Did the Yahoo postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_superpages', 'Did the Superpages postcard arrive?', '5');
INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`, `days`) VALUES ('postcard_twitter', 'Did the twitter postcard arrive?', '5');
#SLOW 1.15.15 More claiming and verification to-dos. 

DROP TABLE `sevence`.`dp_memberships`;
ALTER TABLE `sevence`.`dp_ad_hoc` 
ADD COLUMN `description` VARCHAR(255) NULL AFTER `ad_hoc_cat`;
#MT 01.19.15 0002349: Design Package DB, UI and API for memberships

ALTER TABLE `sevence`.`body_font` 
DROP COLUMN `image_url`;
ALTER TABLE `sevence`.`header_body_font_combo` 
ADD COLUMN `image_url` TEXT NULL AFTER `body_font`;
#MT 01.22.15  0002400: font selection API

ALTER TABLE `sevence`.`dp_design` CHANGE COLUMN `headline_font` `headline_font` INT(11) NULL DEFAULT NULL  , CHANGE COLUMN `body_font` `body_font` INT(11) NULL DEFAULT NULL  , 
  ADD CONSTRAINT `fk1_headline_font`
  FOREIGN KEY (`headline_font` )
  REFERENCES `sevence`.`header_font` (`header_font` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION, 
  ADD CONSTRAINT `fk1_body_font`
  FOREIGN KEY (`body_font` )
  REFERENCES `sevence`.`body_font` (`body_font` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `fk1_headline_font_idx` (`headline_font` ASC) 
, ADD INDEX `fk1_body_font_idx` (`body_font` ASC) ;
#RC 01.23.15 M2211: ALTER table dp_design
#1.25.15 UPDATE END

#2.1.15 UPDATE BEGIN
CREATE TABLE `sevence`.`dp_current_site` (
  `dp_current_site` INT NOT NULL AUTO_INCREMENT,
  `dp_design` INT NULL,
  `annotation` TEXT NULL,
  PRIMARY KEY (`dp_current_site`),
  INDEX `fk_dp_design_idx` (`dp_design` ASC),
  CONSTRAINT `fk_dp_design`
    FOREIGN KEY (`dp_design`)
    REFERENCES `sevence`.`dp_design` (`dp_design`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#MT 01.26.15  0002441: Design Package: Current site annotation

ALTER TABLE `sevence`.`dp_design` 
DROP COLUMN `fave_3`,
DROP COLUMN `fave_2`,
DROP COLUMN `fave_1`;
#MT 01.26.15 0002452: dp_design table

ALTER TABLE `sevence`.`prof` 
ADD COLUMN `is_design_manager` TINYINT(1) NOT NULL DEFAULT 0 AFTER `territory`,
ADD COLUMN `is_designer` TINYINT(1) NOT NULL DEFAULT 0 AFTER `is_design_manager`;
CREATE TABLE `sevence`.`dp_note` (
  `dp_note` INT(100) NOT NULL AUTO_INCREMENT,
  `business` INT(100) NOT NULL,
  `page` VARCHAR(45) NULL,
  `type` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '1= design manager note 2 = designer note',
  `note` TEXT NULL,
  PRIMARY KEY (`dp_note`));
ALTER TABLE `sevence`.`dp_note` 
DROP COLUMN `dp_note`,
CHANGE COLUMN `page` `page` VARCHAR(45) NOT NULL ,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`business`, `page`, `type`);
#KA 01.26.15 0002462: Design manager/Designer notes on the design package

ALTER TABLE `sevence`.`body_font` 
ADD COLUMN `font_url` VARCHAR(100) NULL AFTER `body_font_name`;

ALTER TABLE `sevence`.`body_font` 
ADD COLUMN `font_family` VARCHAR(100) NULL AFTER `font_url`

ALTER TABLE `sevence`.`headline_font` 
ADD COLUMN `font_url` VARCHAR(100) NULL AFTER `ref`;

ALTER TABLE `bim_production`.`business` ADD COLUMN `BSC_billing_signup` INT(11) NULL  AFTER `billing_signup` , ADD COLUMN `BEP_billing_signup` INT(11) NULL  AFTER `BSC_billing_signup` , ADD COLUMN `Advisor_billing_signup` INT(11) NULL  AFTER `BEP_billing_signup` ;
#RC 01.27.15 M2470: ALTER table bim.business

ALTER TABLE `sevence`.`dp_collateral` 
ADD COLUMN `thumbnail_url` TEXT NULL AFTER `url`;
#MT 01.28.15 0002474: changes to dp_collateral

ALTER TABLE `sevence`.`bt_product` 
ADD COLUMN `bt_app` INT NULL DEFAULT 0 AFTER `monthly_price`;
#MT 01.28.15 0002484: bt_product table and GET call

ALTER TABLE `sevence`.`dp_current_site` 
ADD COLUMN `recording_url` TEXT NULL AFTER `annotation`;
#MT 01.28.15 0002461: BSC UI in Fuse: Current Website Notes

ALTER TABLE `sevence`.`dp_current_site` 
DROP COLUMN `annotation`;
#MT 01.29.15 0002441: Design Package: Current site annotation

ALTER TABLE `sevence`.`dp_product` 
DROP FOREIGN KEY `fk_dp_category`;
ALTER TABLE `sevence`.`dp_product` 
ADD CONSTRAINT `fk_dp_category`
  FOREIGN KEY (`dp_category`)
  REFERENCES `sevence`.`dp_category` (`dp_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#KA 01.28.2015 M2204: Design Package DB and UI and API: Business background

INSERT INTO `web_tools` VALUES (1,'Product Catalog','Do you have products that you want to display in a professional manner with photos and attendant product descriptions. ','http://assets-boomtime.s3.amazonaws.com/webtools_images/gallery.png',1),(3,'Image Gallery','Do you have a large set of images you want to display on the website. ','http://assets-boomtime.s3.amazonaws.com/webtools_images/gallery.png',1),(4,'Shopping Cart','Do you need to sell products through your website?','http://assets-boomtime.s3.amazonaws.com/webtools_images/shoppingcart.png',1),(6,'Forms','Do you need to collect information from clients or potential clients through your website?','http://assets-boomtime.s3.amazonaws.com/webtools_images/forms.png',1),(9,'Maps','Would you like to display a map on your website?','http://assets-boomtime.s3.amazonaws.com/webtools_images/Maps.png',1),(10,'Calendar','Do you need a calendar for displaying events?','http://assets-boomtime.s3.amazonaws.com/webtools_images/calendar.png',1),(12,'Reservations','Do you use OpenTable and want to provide a spot on the website for making reservations?','http://assets-boomtime.s3.amazonaws.com/webtools_images/restaurant.png',1),(13,'Booking','Do you use appointment booking software like SpaBooker or Schedulicity and want to allow clients to make appointments through the website? ','http://assets-boomtime.s3.amazonaws.com/webtools_images/calendar.png',1),(14,'Social Media','Make it easy to share posts to various social media sites. Also link to your social media sites. ','http://assets-boomtime.s3.amazonaws.com/webtools_images/share.png',1),(16,'Yelp Review ticker','Show a list of up to 3 review snippetsin a customizable ticker display that is Yelp compliant. ','http://assets-boomtime.s3.amazonaws.com/webtools_images/share.png',1),(18,'Donate Widget','Allow people to donate to your site.','http://assets-boomtime.s3.amazonaws.com/webtools_images/donate.png',1);
INSERT INTO `header_font` VALUES (1,'Energy','Lobster-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Lobster_1.png',1),(2,'Energy','SansitaOne','http://assets-boomtime.s3.amazonaws.com/font_images/Sansita_1.png',1),(3,'Energy','Playball-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Playball.png',1),(4,'Energy','Damion-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Damion.png',1),(5,'Energy','Baumans-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Baumans.png',1),(6,'Energy','MrsSheppards-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Mrs_Sheppards.png',1),(7,'Energy','MrDafoe-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Mr_Dafoe.png',1),(8,'Energy','Pacifico','http://assets-boomtime.s3.amazonaws.com/font_images/Pacifico.png',1),(9,'Elegance','JosefinSans-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Josephin_Sans.png',1),(10,'Elegance','Cinzel-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Decorative.png',1),(11,'Elegance','Lato-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Lato.png',1),(12,'Elegance','MonsieurLaDoulaise-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Monsieur_La_Doulaise.png',1),(13,'Elegance','OpenSans-CondLight','http://assets-boomtime.s3.amazonaws.com/font_images/Open_Sans_Condensed.png',1),(14,'Elegance','Tangerine_Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Tangerine.png',1),(15,'Elegance','NotoSerif-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Noto_Serif.png',1),(16,'Elegance','Engagement-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Engagement.png',1),(17,'Order','PT_Serif-Web-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/PT_Serif.png',1),(18,'Order','Ubuntu-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Ubuntu.png',1),(19,'Order','Oswald-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Oswald.png',1),(20,'Order','RobotoSlab-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Robot_Slab.png',1),(21,'Order','OpenSans-CondLight','http://assets-boomtime.s3.amazonaws.com/font_images/Open_Sans_Condensed.png',1),(22,'Order','CabinCondensed-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Condensed.png',1),(23,'Order','Lato-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Lato.png',1),(24,'Order','Abel-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Abel.png',1),(25,'Rebellion','MetalMania-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Metal_Mania.png',1),(26,'Rebellion','PermanentMarker','http://assets-boomtime.s3.amazonaws.com/font_images/Permanent_Marker.png',1),(27,'Rebellion','Nosifer-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Nosifer.png',1),(28,'Rebellion','LuckiestGuy','http://assets-boomtime.s3.amazonaws.com/font_images/Luckiest_Guy.png',1),(29,'Rebellion','RockSalt','http://assets-boomtime.s3.amazonaws.com/font_images/Rock_salt.png',1),(30,'Rebellion','Frijole-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Frijole.png',1),(31,'Rebellion','VastShadow-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Vast_Shadow.png',1),(32,'Rebellion','Knewave-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Knewave.png',1),(33,'Technology','Oswald-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Oswald.png',1),(34,'Technology','DroidSans','http://assets-boomtime.s3.amazonaws.com/font_images/Droid_Sans.png',1),(35,'Technology','Raleway-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Raleway.png',1),(36,'Technology','Cinzel-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel.png',1),(37,'Technology','Arimo-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Arimo.png',1),(38,'Technology','MerriweatherSans-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Merriweather_Sans.png',1),(39,'Technology','NewsCycle-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/News_Cycle.png',1),(40,'Technology','SixCaps','http://assets-boomtime.s3.amazonaws.com/font_images/Sixcaps.png',1),(41,'Organic','MiltonianTattoo-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Miltonian_tattoo.png',1),(42,'Organic','FingerPaint-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Finger_paint.png',1),(43,'Organic','FreckleFace-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Freckle_face.png',1),(44,'Organic','Chango-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Chango.png',1),(45,'Organic','Kavoon-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Kavoon.png',1),(46,'Organic','Slackey','http://assets-boomtime.s3.amazonaws.com/font_images/Slackey.png',1),(47,'Organic','FrederickatheGreat-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Frederika_the_Great.png',1),(48,'Organic','CabinSketch-Regular','http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Sketch.png',1);
INSERT INTO `body_font` VALUES (1,'Belgrano-Regular','http://fonts.googleapis.com/css?family=Belgrano','\'Belgrano\', serif',1),(2,'Brawler-Regular','http://fonts.googleapis.com/css?family=Brawler','\'Brawler\', serif',1),(3,'Coda-Regular','http://fonts.googleapis.com/css?family=Coda','\'Coda\', cursive',1),(4,'Crushed','http://fonts.googleapis.com/css?family=Crushed','\'Crushed\', cursive',1),(5,'DroidSans','http://fonts.googleapis.com/css?family=Droid+Sans','\'Droid Sans\', sans-serif',1),(6,'DroidSerif','http://fonts.googleapis.com/css?family=Droid+Serif','\'Droid Serif\', serif',1),(7,'FrancoisOne','http://fonts.googleapis.com/css?family=Francois+One','\'Francois One\', sans-serif',1),(8,'Lato-Regular','http://fonts.googleapis.com/css?family=Lato','\'Lato\', sans-serif',1),(9,'Lora-Regular','http://fonts.googleapis.com/css?family=Lora','\'Lora\', serif',1),(10,'Lusitana','http://fonts.googleapis.com/css?family=Lusitana','\'Lusitana\', serif',1),(11,'MedievalSharp','http://fonts.googleapis.com/css?family=MedievalSharp','\'MedievalSharp\', cursive',1),(12,'Merriweather-Regular','http://fonts.googleapis.com/css?family=Merriweather','\'Merriweather\', serif',1),(13,'MerriweatherSans-Regular','http://fonts.googleapis.com/css?family=Merriweather+Sans','\'Merriweather Sans\', serif',1),(14,'OpenSans-Regular','http://fonts.googleapis.com/css?family=Open+Sans','\'Open Sans\', sans-serif',1),(15,'Oswald-Regular','http://fonts.googleapis.com/css?family=Oswald','\'Oswald\', sans-serif',1),(16,'Play-Regular','http://fonts.googleapis.com/css?family=Play','\'Play\', sans-serif',1),(17,'Playball-Regular','http://fonts.googleapis.com/css?family=Playball','\'Playball\', cursive',1),(18,'Quicksand-Regular','http://fonts.googleapis.com/css?family=Quicksand','\'Quicksand\', sans-serif',1),(19,'RopaSans-Regular','http://fonts.googleapis.com/css?family=Ropa+Sans','\'Ropa Sans\', sans-serif',1),(20,'Raleway-Regular','http://fonts.googleapis.com/css?family=Raleway','\'Raleway, sans-serif',1),(21,'Roboto-Regular','http://fonts.googleapis.com/css?family=Roboto',NULL,1),(22,'RussoOne-Regular','http://fonts.googleapis.com/css?family=Russo+One',NULL,1),(23,'SpecialElite','http://fonts.googleapis.com/css?family=Special+Elite',NULL,1),(24,'Ubuntu-Regular','http://fonts.googleapis.com/css?family=Ubuntu',NULL,1),(25,'Wallpoet-Regular','http://fonts.googleapis.com/css?family=Wallpoet',NULL,1),(26,'WireOne','http://fonts.googleapis.com/css?family=Wire+One',NULL,1);
INSERT INTO `header_body_font_combo` VALUES (1,1,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Lobster_1_Droid_Sans.png'),(2,1,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Lobster_1_Raleway.png'),(3,1,16,'http://assets-boomtime.s3.amazonaws.com/font_images/Lobster_1_Play.png'),(4,2,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Sansita_1_Droid_Sans.png'),(5,2,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Sansita_1_Open_Sans.png'),(6,2,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Sansita_1_Oswald.png'),(7,3,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Playball_Lato.png'),(8,3,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Playball_Open_Sans.png'),(9,3,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Playball_Droid_Sans.png'),(10,4,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Damion_Lato.png'),(11,4,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Damion_Open_Sans.png'),(12,4,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Damion_Droid_Sans.png'),(13,5,1,'http://assets-boomtime.s3.amazonaws.com/font_images/Baumans_Belganos.png'),(14,5,2,'http://assets-boomtime.s3.amazonaws.com/font_images/Baumans_Brawler.png'),(15,5,26,'http://assets-boomtime.s3.amazonaws.com/font_images/Baumans_Wireone.png'),(16,6,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Mrs_Sheppards_Lato.png'),(17,6,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Mrs_Sheppards_Open_Sans.png'),(18,6,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Mrs_Sheppards_Droid_Sans.png'),(19,7,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Mr_Dafoe_Lato.png'),(20,7,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Mr_Dafoe_Open_Sans.png'),(21,7,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Mr_Dafoe_Droid_Sans.png'),(22,8,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Pacifico_Droid_Sans.png'),(23,8,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Pacifico_Open_Sans.png'),(24,8,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Pacifico_Oswald.png'),(25,9,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Josephin_Sans_Droid_Sans.png'),(26,9,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Josephin_Sans_Raleway.png'),(27,9,16,'http://assets-boomtime.s3.amazonaws.com/font_images/Josephin_Sans_Play.png'),(28,10,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Decorative_Roboto.png'),(29,10,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Decorative_Open_Sans.png'),(30,10,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Decorative_Raleway.png'),(31,23,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Lato_Lato.png'),(32,23,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Lato_Open_Sans.png'),(33,23,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Lato_Droid_Sans.png'),(34,12,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Monsieur_La_Doulaise_Lato.png'),(35,12,3,'http://assets-boomtime.s3.amazonaws.com/font_images/Monsieur_La_Doulaise_Coda.png'),(36,12,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Monsieur_La_Doulaise_Droid_Sans.png'),(37,21,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Open_Sans_Condensed_Oswald.png'),(38,21,7,'http://assets-boomtime.s3.amazonaws.com/font_images/Open_Sans_Condensed_Francoise_One.png'),(39,21,12,'http://assets-boomtime.s3.amazonaws.com/font_images/Open_Sans_Condensed_Merriweather.png'),(40,14,12,'http://assets-boomtime.s3.amazonaws.com/font_images/Tangerine_Merriweather.png'),(41,14,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Tangerine_Open_Sans.png'),(42,14,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Tangerine_Droid_Sans.png'),(43,15,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Noto_Serif_Lato.png'),(44,15,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Noto_Serif_Open_Sans.png'),(45,15,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Noto_Serif_Droid_Sans.png'),(46,16,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Engagement_Droid_Sans.png'),(47,16,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Engagement_Open_Sans.png'),(48,16,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Engagement_Oswald.png'),(49,17,8,'http://assets-boomtime.s3.amazonaws.com/font_images/PT_Serif_Lato.png'),(50,17,20,'http://assets-boomtime.s3.amazonaws.com/font_images/PT_Serif_Raleway.png'),(51,17,17,'http://assets-boomtime.s3.amazonaws.com/font_images/PT_Serif_Playball.png'),(52,18,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Ubuntu_Roboto.png'),(53,18,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Ubuntu_Droid_Sans.png'),(54,18,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Ubuntu_Raleway.png'),(55,33,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Oswald_Lato.png'),(56,33,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Oswald_Open_Sans.png'),(57,33,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Oswald_Oswald.png'),(58,20,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Robot_Slab_Lato.png'),(59,20,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Robot_Slab_Roboto.png'),(60,20,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Robot_Slab_Oswald.png'),(61,22,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Condensed_Lato.png'),(62,22,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Condensed_Open_Sans.png'),(63,22,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Condensed_Droid_Sans.png'),(64,24,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Abel_Droid_Sans.png'),(65,24,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Abel_Open_Sans.png'),(66,24,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Abel_Oswald.png'),(67,25,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Metal_Mania_Lato.png'),(68,25,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Metal_Mania_Open_Sans.png'),(69,25,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Metal_Mania_Oswald.png'),(70,26,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Permanent_Marker_Open_Sans.png'),(71,26,6,'http://assets-boomtime.s3.amazonaws.com/font_images/Permanent_Marker_Droid_Serif.png'),(72,26,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Permanent_Marker_Raleway.png'),(73,27,25,'http://assets-boomtime.s3.amazonaws.com/font_images/Nosifer_Wallpoet.png'),(74,27,22,'http://assets-boomtime.s3.amazonaws.com/font_images/Nosifer_Russo_one.png'),(75,28,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Luckiest_Guy_Open_Sans.png'),(76,28,6,'http://assets-boomtime.s3.amazonaws.com/font_images/Luckiest_Guy_Droid_Serif.png'),(77,28,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Luckiest_Guy_Raleway.png'),(78,29,6,'http://assets-boomtime.s3.amazonaws.com/font_images/Rock_salt_Droid_Serif.png'),(79,29,23,'http://assets-boomtime.s3.amazonaws.com/font_images/Rock_salt_Special_elite.png'),(80,29,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Rock_salt_Oswald.png'),(81,30,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Frijole_Roboto.png'),(82,30,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Frijole_Open_Sans.png'),(83,30,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Frijole_Oswald.png'),(84,31,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Vast_Shadow_Oswald.png'),(85,31,9,'http://assets-boomtime.s3.amazonaws.com/font_images/Vast_Shadow_Lora.png'),(86,31,18,'http://assets-boomtime.s3.amazonaws.com/font_images/Vast_Shadow_Quicksand.png'),(87,32,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Knewave_Lato.png'),(88,32,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Knewave_Open_Sans.png'),(89,32,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Knewave_Oswald.png'),(90,34,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Droid_Sans_Open_Sans.png'),(91,34,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Droid_Sans_Oswald.png'),(92,34,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Droid_Sans_Roboto.png'),(93,35,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Raleway_Open_Sans.png'),(94,35,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Raleway_Oswald.png'),(95,35,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Raleway_Droid_Sans.png'),(96,36,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Open_Sans.png'),(97,36,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Oswald.png'),(98,36,13,'http://assets-boomtime.s3.amazonaws.com/font_images/Cinzel_Merriweather_Sans.png'),(99,37,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Arimo_Open_Sans.png'),(100,37,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Arimo_Oswald.png'),(101,37,13,'http://assets-boomtime.s3.amazonaws.com/font_images/Arimo_Merriweather_Sans.png'),(102,38,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Merriweather_Sans_Roboto.png'),(103,38,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Merriweather_Sans_Open_Sans.png'),(104,38,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Merriweather_Sans_Lato.png'),(105,39,14,'http://assets-boomtime.s3.amazonaws.com/font_images/News_Cycle_Open_Sans.png'),(106,39,15,'http://assets-boomtime.s3.amazonaws.com/font_images/News_Cycle_Oswald.png'),(107,39,5,'http://assets-boomtime.s3.amazonaws.com/font_images/News_Cycle_Droid_Sans.png'),(108,40,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Sixcaps_Raleway.png'),(109,40,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Sixcaps_Open_Sans.png'),(110,40,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Sixcaps_Oswald.png'),(111,41,11,'http://assets-boomtime.s3.amazonaws.com/font_images/Miltonian_tattoo_Medieval_sharp.png'),(112,41,4,'http://assets-boomtime.s3.amazonaws.com/font_images/Miltonian_tattoo_Crushed.png'),(113,41,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Miltonian_tattoo_Roboto.png'),(114,42,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Finger_paint_Open_Sans.png'),(115,42,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Finger_paint_Droid_Sans.png'),(116,42,24,'http://assets-boomtime.s3.amazonaws.com/font_images/Finger_paint_Ubuntu.png'),(117,43,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Freckle_face_Open_Sans.png'),(118,43,13,'http://assets-boomtime.s3.amazonaws.com/font_images/Freckle_face_Merriweather_Sans.png'),(119,43,5,'http://assets-boomtime.s3.amazonaws.com/font_images/Freckle_face_Droid_Sans.png'),(120,44,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Chango_Open_Sans.png'),(121,44,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Chango_Oswald.png'),(122,44,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Chango_Roboto.png'),(123,45,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Kavoon_Open_Sans.png'),(124,45,19,'http://assets-boomtime.s3.amazonaws.com/font_images/Kavoon_Ropa_Sans.png'),(125,45,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Kavoon_Lato.png'),(126,46,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Slackey_Roboto.png'),(127,46,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Slackey_Open_Sans.png'),(128,46,8,'http://assets-boomtime.s3.amazonaws.com/font_images/Slackey_Lato.png'),(129,47,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Frederika_the_Great_Open_Sans.png'),(130,47,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Frederika_the_Great_Oswald.png'),(131,47,21,'http://assets-boomtime.s3.amazonaws.com/font_images/Frederika_the_Great_Roboto.png'),(132,48,20,'http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Sketch_Raleway.png'),(133,48,14,'http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Sketch_Open_Sans.png'),(134,48,15,'http://assets-boomtime.s3.amazonaws.com/font_images/Cabin_Sketch_Oswald.png');
INSERT INTO `sample_website` VALUES (1,'S1L1','http://poundandgrain.com/work/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S1L1.jpg','1','1'),(2,'S1L2','http://www.jointlondon.com/#!/london','http://assets-boomtime.s3.amazonaws.com/archetype_images/S1L2.jpg','1','2'),(3,'S1L3','http://www.axt.es/#/viewer/notoh-identity','http://assets-boomtime.s3.amazonaws.com/archetype_images/S1L3.jpg','1','3'),(4,'S1L4','http://aiaiai.com.au/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S1L4.jpg','1','4'),(5,'S2L1','http://hatchcollective.co.uk/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S2L1.jpg','2','1'),(6,'S2L2','http://arabellaonboossa.com/sri-lanka.html','http://assets-boomtime.s3.amazonaws.com/archetype_images/S2L2.jpg','2','2'),(7,'S2L3','http://www.kummer-herrman.nl/awards/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S2L3.jpg','2','3'),(8,'S2L4','http://pixelstadium.com/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S2L4.jpg','2','4'),(9,'S3L1','http://www.jamesgarner.co.uk/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S3L1.jpg','3','1'),(10,'S3L2','http://jayeadams.co.uk/portfolio/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S3L2.jpg','3','2'),(11,'S3L3','http://verbbrands.com/#introduction','http://assets-boomtime.s3.amazonaws.com/archetype_images/S3L3.jpg','3','3'),(12,'S3L4','http://www.mainecottage.com/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S3L4.jpg','3','4'),(13,'S4L1','http://webxmore.com/#win-2-aboutus-wrp','http://assets-boomtime.s3.amazonaws.com/archetype_images/S4L1.jpg','4','1'),(14,'S4L2','http://www.mathieuclauss.com/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S4L2.jpg','4','2'),(15,'S4L3','http://mododesigngroup.com/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S4L3.jpg','4','3'),(16,'S4L4','http://mododesigngroup.com/','http://assets-boomtime.s3.amazonaws.com/archetype_images/S4L4.jpg','4','4');
TRUNCATE TABLE training;
INSERT INTO `training` VALUES ('appt','During this appointment, you will report to the business on all the activity the program has generated. You also need to get updated photos and updated content. Tap reschedule if you need to reschedule the apppointment.',NULL),('bep_section_business_level_to_dos','BEP Section business level to dos ',NULL),('bep_section_business_management','BEP Business Management',NULL),('bep_section_email_promotions_info','BEP  Email promotions information',NULL),('bep_section_high_level_todos','BEP High Level To Do\'s',NULL),('bep_section_presentation','BEP Presentation help',NULL),('bsc_dp_background_info','Select the categories, sub-categories, products, brands and services that apply to this business. ',NULL),('bsc_dp_color','Pick your prefered color on the wheel. Then use the sliders to adjust the brightness and saturation.',NULL),('bsc_dp_design_archetype','Drag all the designs you like to the tray.',NULL),('bsc_dp_design_layout','Drag the layout you like to the tray',NULL),('bsc_dp_design_selection','From the websites you selected earlier, record what you like or don\'t like about them. Also narrow down your favorites to three. ',NULL),('bsc_dp_fonts','Drag the desired headline font to the tray. Then scroll through the body font options and select one. ',NULL),('bsc_dp_images','Pick some examples of photos you like. These aren\'t the actual photos we would use in the website, but they help use select the real ones. ',NULL),('bsc_dp_personality','Tell us about your business',NULL),('bsc_dp_web_pages','Drag the web pages you need on the website. Record a brief description of the content. ',NULL),('bsc_dp_web_tools','Drag the desired website functionality to the tray.',NULL),('bsc_section_business_level_to_dos','Help for site creator business level todos',NULL),('bsc_section_business_management','Help for site creator business management',NULL),('bsc_section_high_level_todos','Help for site creator high level todos',NULL),('bsc_section_presentation','Help for site creator presentation',NULL),('bsc_section_site_creator_info','Help for site creator ',NULL),('business_id','The business ID is the short, unique way in which the business is identified in the system. Customers will see it in URLs so pick something that resembles the business\'s name.',NULL),('competitors','Select a couple of businesses to compare to your prospect. They should be the same type of business and serve the same clientele. ',NULL),('content_update','We\'ve scraped what we can find about this business on the various profile sites across the internet. But if you fill in as much as you can of the missing data before your appointment, you\'ll have a better chance of making the sale.',NULL),('follow_up_pres','Now that the business has had a few days to think about the program, you can follow up with them to make the sale. Tap transaction to complete the sale. ',NULL),('gmail_addresses','Does this business already have a business email address? If you don\'t see one in the data we scraped, search around on the internet a bit more to make sure. If you can\'t find one, propose a couple of gmail addresses for the business. If you sell them, you\'ll need to help them set up the email address and show them how to check it. ',NULL),('gmail_create',NULL,NULL),('personal_network_1','High level todos description will be here.',NULL),('personal_network_5','Step One: Build your personal network. Search for and select the businesses you want to sell to. These should be businesses where you have a close relationship so you can easily make that first appointment. ',''),('phone_appt','You need to have some contact with the business every month. We recommend alternating a phone call with a personal visit. This month you can report progress over the phone. Just call the business to set up a time when they have 15 minutes or so to chat. ',NULL),('photos','Photos make all the difference between a boring profile and one that catches the eye. Plus most search engines reward you for updating photos frequently. Get some new photos and rearrange them so the new ones are at the beginning. Tap and hold on a photo to drag it to another position. The first photo should be a wide picture because that will look best on Google and Facebook.',NULL),('physical_appt','This month you\'re going to go in and see the business. You can call or email them to pick a time for you to drop by. During this meeting you\'ll report on the progress as well as collect new photos and content. ',NULL),('presentation','You can play the presentation right from this screen. If you make the sale, great! We\'ll give you the next steps. You also have the chance to follow up or reschedule. Release the prospect if they aren\'t interested at all. ',NULL),('prospect_expires','You only have this long to call the prospect and set a presentation before they are released so pick up that phone!',NULL),('referral_network_1','Select another lead to work for this business\'s referral network. ',NULL),('referral_network_5','Checkout up to five businesses to work for this business\'s referral network. You\'ll go through the same sales process with them!',NULL),('report_by_phone','Call the business at the appointed time and report to them all the great things that have happened. They\'ll also receive a copy of the report by email. ',NULL),('section_business_level_to_dos','Section help for business level to dos.',NULL),('section_business_management','Business management help will be here.',NULL),('section_business_profile_information','Help for business profile information section.',NULL),('section_high_level_todos','High level todos description will be here.','mcELasiir1E'),('section_presentation','Practice the presentation',NULL),('set_presentation','Call the business to set up your sales presentation.',NULL),('todo_list','The to do screen shows you all the things you need to do to sell businesses, claim and verfity their profiles and manage them going forward. We\'ll walk you through all the steps. Start by creating your personal network if you haven\'t already!','dQw4w9WgXcQ'),('update_data','Update the content',NULL),('yahoo','Create a yahoo email address. We use this email address to manage the profiles we\'re going to set up for the business. They won\'t ever have to access it, but you will. Tap the button to go to Yahoo to create the email. Then copy and paste the username and password here. We\'ll keep track of it for you. ',NULL),('yelp_claim','Claim the yelp profile.',NULL),('yelp_credentials','Here are the yelp credentials.',NULL),('yelp_verification','From the websites you picked earlier, narrow it down to three favorites. Also, record what you like about any or all of the selections you\'ve made.',NULL);
#2.1.15 UPDATE END

#2.17.15 UPDATE BEGIN
ALTER TABLE `sevence`.`dp_category_recordings` 
ADD COLUMN `ad_hoc_cat` INT(11) NULL AFTER `dp_category`;
#MT 02.02.15 0002363: new table and API for recordings

UPDATE `bim_production`.`bt_app` SET `app_key`='btbim' WHERE `bt_app`='0';
UPDATE `bim_production`.`bt_app` SET `app_key`='btbsc' WHERE `bt_app`='1';
UPDATE `bim_production`.`bt_app` SET `app_key`='btbep' WHERE `bt_app`='2';
UPDATE `bim_production`.`bt_app` SET `app_key`='btadvisor' WHERE `bt_app`='3';
#MGK 02.06.15 Update the keys used by the app in order to prevent collisions if other ios apps used them

ALTER TABLE `sevence`.`header_font` 
ADD COLUMN `google_font_name` VARCHAR(100) NULL AFTER `active`;
#MT 02.02.15 0002525: Headline font displayed in design package is wrong

UPDATE header_font SET google_font_name = 'Lobster' WHERE header_font = 1;
UPDATE header_font SET google_font_name = 'Sansita One' WHERE header_font = 2;
UPDATE header_font SET google_font_name = 'Playball' WHERE header_font = 3;
UPDATE header_font SET google_font_name = 'Damion' WHERE header_font = 4;
UPDATE header_font SET google_font_name = 'Baumans' WHERE header_font = 5;
UPDATE header_font SET google_font_name = 'Mrs Sheppards' WHERE header_font = 6;
UPDATE header_font SET google_font_name = 'Mr Dafoe' WHERE header_font = 7;
UPDATE header_font SET google_font_name = 'Pacifico' WHERE header_font = 8;
UPDATE header_font SET google_font_name = 'Josefin Sans' WHERE header_font = 9;
UPDATE header_font SET google_font_name = 'Cinzel Decorative' WHERE header_font = 10;
UPDATE header_font SET google_font_name = 'Lato' WHERE header_font = 11;
UPDATE header_font SET google_font_name = 'Monsieur La Doulaise' WHERE header_font = 12;
UPDATE header_font SET google_font_name = 'Open Sans Condensed:300' WHERE header_font = 13;
UPDATE header_font SET google_font_name = 'Tangerine' WHERE header_font = 14;
UPDATE header_font SET google_font_name = 'Noto Serif' WHERE header_font = 15;
UPDATE header_font SET google_font_name = 'Engagement' WHERE header_font = 16;
UPDATE header_font SET google_font_name = 'PT Serif' WHERE header_font = 17;
UPDATE header_font SET google_font_name = 'Ubuntu' WHERE header_font = 18;
UPDATE header_font SET google_font_name = 'Oswald' WHERE header_font = 19;
UPDATE header_font SET google_font_name = 'Roboto Slab' WHERE header_font = 20;
UPDATE header_font SET google_font_name = 'Open Sans Condensed:300' WHERE header_font = 21;
UPDATE header_font SET google_font_name = 'Cabin Condensed' WHERE header_font = 22;
UPDATE header_font SET google_font_name = 'Lato' WHERE header_font = 23;
UPDATE header_font SET google_font_name = 'Abel' WHERE header_font = 24;
UPDATE header_font SET google_font_name = 'Metal Mania' WHERE header_font = 25;
UPDATE header_font SET google_font_name = 'Permanent Marker' WHERE header_font = 26;
UPDATE header_font SET google_font_name = 'Nosifer' WHERE header_font = 27;
UPDATE header_font SET google_font_name = 'Luckiest Guy' WHERE header_font = 28;
UPDATE header_font SET google_font_name = 'Rock Salt' WHERE header_font = 29;
UPDATE header_font SET google_font_name = 'Frijole' WHERE header_font = 30;
UPDATE header_font SET google_font_name = 'Vast Shadow' WHERE header_font = 31;
UPDATE header_font SET google_font_name = 'Knewave' WHERE header_font = 32;
UPDATE header_font SET google_font_name = 'Oswald' WHERE header_font = 33;
UPDATE header_font SET google_font_name = 'Droid Sans' WHERE header_font = 34;
UPDATE header_font SET google_font_name = 'Raleway' WHERE header_font = 35;
UPDATE header_font SET google_font_name = 'Cinzel' WHERE header_font = 36;
UPDATE header_font SET google_font_name = 'Arimo' WHERE header_font = 37;
UPDATE header_font SET google_font_name = 'Merriweather Sans' WHERE header_font = 38;
UPDATE header_font SET google_font_name = 'News Cycle' WHERE header_font = 39;
UPDATE header_font SET google_font_name = 'Six Caps' WHERE header_font = 40;
UPDATE header_font SET google_font_name = 'Miltonian Tattoo' WHERE header_font = 41;
UPDATE header_font SET google_font_name = 'Finger Paint' WHERE header_font = 42;
UPDATE header_font SET google_font_name = 'Freckle Face' WHERE header_font = 43;
UPDATE header_font SET google_font_name = 'Chango' WHERE header_font = 44;
UPDATE header_font SET google_font_name = 'Kavoon' WHERE header_font = 45;
UPDATE header_font SET google_font_name = 'Slackey' WHERE header_font = 46;
UPDATE header_font SET google_font_name = 'Fredericka the Great' WHERE header_font = 47;
UPDATE header_font SET google_font_name = 'Cabin Sketch' WHERE header_font = 48;
#MT 02.02.15 0002525: Headline font displayed in design package is wrong

CREATE  TABLE `sevence`.`bt_referral` (
  `bt_referral` INT NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(20) NULL ,
  `setup` DECIMAL(11,2) NULL ,
  `monthly` DECIMAL(11,2) NULL ,
  `billing_calc` INT(11) NULL ,
  `active` TINYINT(1) NULL ,
  PRIMARY KEY (`bt_referral`) ,
  INDEX `fk_billing_calc_idx` (`billing_calc` ASC) ,
  CONSTRAINT `fk_billing_calc`
    FOREIGN KEY (`billing_calc` )
    REFERENCES `sevence`.`billing_calc` (`billing_calc` )
    ON 
DELETE NO ACTION
    ON UPDATE NO ACTION);
#RC 02.11.15 M2533: ADD table bt_referral

INSERT INTO `sevence`.`bt_referral` (`bt_referral`, `name`, `setup`, `monthly`, `billing_calc`, `active`) VALUES (NULL, 'founder', '399.95', '149.95', '86', '1');
INSERT INTO `sevence`.`bt_referral` (`bt_referral`, `name`, `setup`, `monthly`, `billing_calc`, `active`) VALUES (NULL, 'show', '299.95', '99.95', '89', '1');
INSERT INTO `sevence`.`bt_referral` (`bt_referral`, `name`, `setup`, `monthly`, `billing_calc`, `active`) VALUES (NULL, 'founder', '499.00', '199.00', '90', '1');
INSERT INTO `sevence`.`bt_referral` (`bt_referral`, `name`, `setup`, `monthly`, `billing_calc`, `active`) VALUES (NULL, 'show', '399.00', '149.00', '89', '1');
#RC 02.11.15 M2533: INSERT rows to table bt_referral

INSERT INTO `sevence`.`training` (`training`) VALUES ('bep_garnish');
#BB 02.13.15 M2543: Add training for bep
#2.17.15 UPDATE END;

#3.16.15 UPDATE BEGIN
UPDATE `sevence`.`training` SET `training_content`='BEP Garnish' WHERE `training`='bep_garnish';
#BB 02.16.15 M2543: Updated info for bep_garnish

INSERT INTO `sevence`.`training` (`training`, `training_content`) VALUES ('bep_layouts', 'BEP Layouts');
INSERT INTO `sevence`.`training` (`training`, `training_content`) VALUES ('bep_templates', 'BEP Templates');
INSERT INTO `sevence`.`training` (`training`, `training_content`) VALUES ('bep_promotion_details', 'BEP Promotion Details');
INSERT INTO `sevence`.`training` (`training`, `training_content`) VALUES ('bep_promotion_basics', 'BEP Promotion Basics');
INSERT INTO `sevence`.`training` (`training`, `training_content`) VALUES ('bep_business_background', 'BEP Business Background');
#BB 02.16.15 M2546, M2547, M2548, M2549, M2550: Added keys and descriptions for various help buttons

CREATE TABLE `charity` (
  `charity` int(11) NOT NULL AUTO_INCREMENT,
  `org` int(11) DEFAULT NULL,
  `name` varchar(225) DEFAULT NULL,
  PRIMARY KEY (`charity`),
  KEY `org_idx` (`org`),
  CONSTRAINT `org_fk` FOREIGN KEY (`org`) REFERENCES `org` (`org`) ON DELETE NO ACTION ON UPDATE NO ACTION
);
#MT 02.17.15 0002553: Changes to the spin and win: Give or Take

CREATE  TABLE `sevence`.`give_or_take_winners` (
  `give_or_take_winners` INT NOT NULL AUTO_INCREMENT ,
  `org_client` INT NULL ,
  `amount` DECIMAL(11,2) NULL ,
  `date_wins` DATETIME NULL ,
  `give_take` VARCHAR(10) NULL ,
  `paid_date` DATETIME NULL ,
  PRIMARY KEY (`give_or_take_winners`) );
#RC 02.17.15 M2553: CREATE table give or take winners
ALTER TABLE `sevence`.`promo_card_print` 
ADD COLUMN `type` VARCHAR(50) NULL AFTER `shipping_method`;
#MT 02.17.15 0002556: Promo Card Print

CREATE TABLE `sevence`.`business_category` (
  `business_category` INT NOT NULL AUTO_INCREMENT,
  `business_org` INT NOT NULL,
  `dt_category` INT NOT NULL,
  INDEX `bc_business_org_idx` (`business_org` ASC),
  INDEX `bc_dt_category_idx_idx` (`dt_category` ASC),
  PRIMARY KEY (`business_category`),
  CONSTRAINT `bc_business_org_idx`
    FOREIGN KEY (`business_org`)
    REFERENCES `sevence`.`business_org` (`business`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `bc_dt_category_idx`
    FOREIGN KEY (`dt_category`)
    REFERENCES `sevence`.`dt_category` (`dt_category`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`business_subcategory` (
  `business_subcategory` INT NOT NULL AUTO_INCREMENT,
  `business_org` INT NOT NULL,
  `dt_subcategory` INT NOT NULL,
  INDEX `bs_business_org_idx` (`business_org` ASC),
  INDEX `bs_dt_subcategory_idx` (`dt_subcategory` ASC),
  PRIMARY KEY (`business_subcategory`),
  CONSTRAINT `bs_business_org_idx`
    FOREIGN KEY (`business_org`)
    REFERENCES `sevence`.`business_org` (`business`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `bs_dt_subcategory_idx`
    FOREIGN KEY (`dt_subcategory`)
    REFERENCES `sevence`.`dt_subcategory` (`dt_subcategory`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`business_ad_hoc` (
  `business_ad_hoc` INT NOT NULL AUTO_INCREMENT,
  `business_org` INT NULL,
  `type` VARCHAR(45) NULL,
  `business_cat` INT NULL,
  `ad_hoc_cat` INT NULL,
  PRIMARY KEY (`business_ad_hoc`),
  INDEX `ad_business_org_dx_idx` (`business_org` ASC),
  INDEX `ad_business_cat_dx_idx` (`business_cat` ASC),
  CONSTRAINT `ad_business_org_dx`
    FOREIGN KEY (`business_org`)
    REFERENCES `sevence`.`business_org` (`business`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `ad_business_cat_dx`
    FOREIGN KEY (`business_cat`)
    REFERENCES `sevence`.`business_category` (`business_category`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

ALTER TABLE `sevence`.`business_ad_hoc` 
ADD INDEX `ad_hoc_cat_dx_idx` (`ad_hoc_cat` ASC);
ALTER TABLE `sevence`.`business_ad_hoc` 
ADD CONSTRAINT `ad_hoc_cat_dx`
  FOREIGN KEY (`ad_hoc_cat`)
  REFERENCES `sevence`.`business_ad_hoc` (`business_ad_hoc`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

CREATE TABLE `sevence`.`email_promo` (
  `email_promo` INT NOT NULL AUTO_INCREMENT,
  `business_org` INT NULL,
  `email_type` VARCHAR(45) NULL,
  `desired_start` VARCHAR(45) NULL,
  `event_type` INT NULL,
  `sale_type` INT NULL,
  `send_email` DATE NULL,
  `email_cycle` INT NULL,
  `queued_on` DATE NULL,
  `email_class` VARCHAR(30) NULL,
  `email_template` INT NULL,
  `email_garnish` INT NULL,
  `start_date` DATETIME NULL,
  `end_date` DATETIME NULL,
  `promo_type` VARCHAR(45) NULL,
  `promo_goal` VARCHAR(45) NULL,
  PRIMARY KEY (`email_promo`),
  INDEX `ep_business_org_dx_idx` (`business_org` ASC),
  CONSTRAINT `ep_business_org_idx`
    FOREIGN KEY (`business_org`)
    REFERENCES `sevence`.`business_org` (`business`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_offer` (
  `promo_offer` INT NOT NULL AUTO_INCREMENT,
  `email_promo` INT NULL,
  `promo_type` VARCHAR(45) NULL,
  `promo_details` TEXT NULL,
  `cost` DECIMAL(11,2) NULL,
  `regular price` DECIMAL(11,2) NULL,
  `percent_off` DECIMAL(11,2) NULL,
  `dollar_off` DECIMAL(11,2) NULL,
  `fixed_price` DECIMAL(11,2) NULL,
  `offer_terms` TEXT NULL,
  `offer_copy` TEXT NULL,
  PRIMARY KEY (`promo_offer`),
  INDEX `po_email_promo_idx_idx` (`email_promo` ASC),
  CONSTRAINT `po_email_promo_idx`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_product` (
  `promo_product` INT NOT NULL AUTO_INCREMENT,
  `promo_offer` INT NULL,
  `dt_product` INT NULL,
  `ad_hoc_product` VARCHAR(50) NULL,
  INDEX `pp_promo_offer_idx_idx` (`promo_offer` ASC),
  INDEX `pp_dt_product_idx` (`dt_product` ASC),
  PRIMARY KEY (`promo_product`),
  CONSTRAINT `pp_promo_offer_idx`
    FOREIGN KEY (`promo_offer`)
    REFERENCES `sevence`.`promo_offer` (`promo_offer`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `pp_dt_product`
    FOREIGN KEY (`dt_product`)
    REFERENCES `sevence`.`dt_product` (`dt_product`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_brand` (
  `promo_brand` INT NOT NULL AUTO_INCREMENT,
  `promo_offer` INT NULL,
  `dt_brand` INT NULL,
  `ad_hoc_brand` VARCHAR(50) NULL,
  PRIMARY KEY (`promo_brand`),
  INDEX `pb_promo_offer_idx_idx` (`promo_offer` ASC),
  INDEX `pb_dt_brand_idx_idx` (`dt_brand` ASC),
  CONSTRAINT `pb_promo_offer_idx`
    FOREIGN KEY (`promo_offer`)
    REFERENCES `sevence`.`promo_offer` (`promo_offer`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `pb_dt_brand_idx`
    FOREIGN KEY (`dt_brand`)
    REFERENCES `sevence`.`dt_brand` (`dt_brand`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_package` (
  `promo_package` INT NOT NULL AUTO_INCREMENT,
  `email_promo` INT NULL,
  `cost` DECIMAL(11,2) NULL,
  `reg price` DECIMAL(11,2) NULL,
  `discount` DECIMAL(11,2) NULL,
  `margin` DECIMAL(11,2) NULL,
  `profit` DECIMAL(11,2) NULL,
  `package_price` DECIMAL(11,2) NULL,
  `package_copy` DECIMAL(11,2) NULL,
  PRIMARY KEY (`promo_package`),
  INDEX `pp_email_promo_idx_idx` (`email_promo` ASC),
  CONSTRAINT `pp_email_promo_idx`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_package_details` (
  `promo_package_details` INT NOT NULL AUTO_INCREMENT,
  `promo_package` INT NULL,
  `package_item` VARCHAR(100) NULL,
  `item_cost` DECIMAL(11,2) NULL,
  `item_regular_price` DECIMAL(11,2) NULL,
  `item_type` VARCHAR(45) NULL,
  PRIMARY KEY (`promo_package_details`),
  INDEX `pd_promo_package_idx_idx` (`promo_package` ASC),
  CONSTRAINT `pd_promo_package_idx`
    FOREIGN KEY (`promo_package`)
    REFERENCES `sevence`.`promo_package` (`promo_package`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_event` (
  `promo_event` INT NOT NULL AUTO_INCREMENT,
  `email_promo` INT NULL,
  `event_name` VARCHAR(100) NULL,
  `event_desc` TEXT NULL,
  `event_copy` TEXT NULL,
  PRIMARY KEY (`promo_event`),
  INDEX `pe_email_promo_idx_idx` (`email_promo` ASC),
  CONSTRAINT `pe_email_promo_idx`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_email_template` (
  `promo_email_template` INT NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(50) NULL,
  `class` VARCHAR(50) NULL,
  `template_css` TEXT NULL,
  `template_html` TEXT NULL,
  PRIMARY KEY (`promo_email_template`));

CREATE TABLE `sevence`.`promo_email_garnish` (
  `promo_email_garnish` INT NOT NULL AUTO_INCREMENT,
  `garnish_url` TEXT NULL,
  PRIMARY KEY (`promo_email_garnish`));

ALTER TABLE `sevence`.`email_promo` 
ADD INDEX `ep_email_template_idx_idx` (`email_template` ASC),
ADD INDEX `ep_email_garnish_idx_idx` (`email_garnish` ASC);
ALTER TABLE `sevence`.`email_promo` 
ADD CONSTRAINT `ep_email_template_idx`
  FOREIGN KEY (`email_template`)
  REFERENCES `sevence`.`promo_email_template` (`promo_email_template`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `ep_email_garnish_idx`
  FOREIGN KEY (`email_garnish`)
  REFERENCES `sevence`.`promo_email_garnish` (`promo_email_garnish`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

CREATE TABLE `sevence`.`promo_images` (
  `promo_images` INT NOT NULL AUTO_INCREMENT,
  `promo_offer` INT NULL,
  `promo_package` INT NULL,
  `promo_event` INT NULL,
  `main_image` TEXT NULL,
  `small_image` TEXT NULL,
  `coupon_image` TEXT NULL,
  PRIMARY KEY (`promo_images`),
  INDEX `pi_promo_offer_idx_idx` (`promo_offer` ASC),
  INDEX `pi_promo_package_idx_idx` (`promo_package` ASC),
  INDEX `promo_event_idx` (`promo_event` ASC),
  CONSTRAINT `pi_promo_offer_idx`
    FOREIGN KEY (`promo_offer`)
    REFERENCES `sevence`.`promo_offer` (`promo_offer`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `pi_promo_package_idx`
    FOREIGN KEY (`promo_package`)
    REFERENCES `sevence`.`promo_package` (`promo_package`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `pi_promo_event_idx`
    FOREIGN KEY (`promo_event`)
    REFERENCES `sevence`.`promo_event` (`promo_event`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#DCS 02.18.15 0002433: Email Promotion database structure

ALTER TABLE `sevence`.`email_promo` 
CHANGE COLUMN `desired_start` `desired_start` VARCHAR(12) NULL DEFAULT NULL ,
CHANGE COLUMN `promo_goal` `promo_goal` INT(11) NULL DEFAULT NULL ,
ADD COLUMN `status` TINYINT(5) NULL DEFAULT 0 AFTER `promo_goal`;

ALTER TABLE `sevence`.`promo_offer` 
DROP COLUMN `promo_details`,
CHANGE COLUMN `promo_type` `promo_offer_type` VARCHAR(45) NULL DEFAULT NULL ;

ALTER TABLE `sevence`.`promo_email_template` 
ADD COLUMN `layout_type` SMALLINT(5) NULL AFTER `template_html`,
ADD COLUMN `is_network` SMALLINT(5) NULL AFTER `layout_type`;

ALTER TABLE `sevence`.`promo_package` 
CHANGE COLUMN `package_copy` `package_copy` TEXT NULL ;

ALTER TABLE `sevence`.`promo_email_garnish` 
ADD COLUMN `dt_event_type` INT(11) NULL AFTER `promo_email_garnish`;
#KA 02.19.2015 M2433: Email Promotion database structure

CREATE TABLE `dt_event_type` (
 `dt_event_type` int(11) NOT NULL AUTO_INCREMENT,
 `event_cat` int(11) NOT NULL,
 `event_cat_name` varchar(10) NOT NULL,
 `event_type_name` varchar(20) NOT NULL,
 `event_type_month` int(11) NOT NULL DEFAULT '0',
 PRIMARY KEY (`dt_event_type`));
 INSERT INTO `dt_event_type` VALUES (1,1,'Holiday','Chinese New Year',2),(2,1,'Holiday','Christmas',12),(3,1,'Holiday','Cinco de Mayo',5),(4,1,'Holiday','Columbus Day',10),(5,1,'Holiday','Easter',4),(6,1,'Holiday','Fathers Day',6),(7,1,'Holiday','Groundhog Day',2),(8,1,'Holiday','Halloween',10),(9,1,'Holiday','Independence Day',7),(10,1,'Holiday','Labor Day',9),(11,1,'Holiday','Memorial Day',5),(12,1,'Holiday','Mothers Day',3),(13,1,'Holiday','New Years',1),(14,1,'Holiday','Presidents Day',1),(15,1,'Holiday','St Patricks',3),(16,1,'Holiday','Thanksgiving',11),(17,1,'Holiday','Valentines',2),(18,1,'Holiday','Veterans Day',11),(19,2,'Clearance','Storewide',0),(20,2,'Clearance','Department',0),(21,3,'Special Ev','Mid-night Madness',0),(22,3,'Special Ev','24 hour sale',0),(23,3,'Special Ev','Flash Sale',0),(24,3,'Special Ev','VIP sale',0),(25,4,'Seasonal','Spring Sale',0),(26,4,'Seasonal','Summer Sale',0),(27,4,'Seasonal','Fall Sale',0),(28,4,'Seasonal','Winter',0),(29,5,'Other','Other',0);
#SLOW decision tree for events and sale types

ALTER TABLE `sevence`.`email_promo` 
ADD INDEX `ep_dt_event_type_idx_idx` (`event_type` ASC);
ALTER TABLE `sevence`.`email_promo` 
ADD CONSTRAINT `ep_dt_event_type_idx`
  FOREIGN KEY (`event_type`)
  REFERENCES `sevence`.`dt_event_type` (`dt_event_type`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

ALTER TABLE `sevence`.`promo_email_garnish` 
ADD INDEX `peg_dt_event_type_idx_idx` (`dt_event_type` ASC);
ALTER TABLE `sevence`.`promo_email_garnish` 
ADD CONSTRAINT `peg_dt_event_type_idx`
  FOREIGN KEY (`dt_event_type`)
  REFERENCES `sevence`.`dt_event_type` (`dt_event_type`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#KA 02.19.2015 M2433: Email Promotion database structure

ALTER TABLE `sevence`.`promo_package` 
CHANGE COLUMN `reg price` `reg_price` DECIMAL(11,2) NULL DEFAULT NULL ;
#KA 02.20.2015	M2578: API: promo_package

ALTER TABLE `sevence`.`business_subcategory` 
ADD COLUMN `business_category` INT(11) NULL AFTER `dt_subcategory`,
ADD INDEX `bs_business_category_idx` (`business_category` ASC);
ALTER TABLE `sevence`.`business_subcategory` 
ADD CONSTRAINT `bs_business_category_idx`
  FOREIGN KEY (`business_category`)
  REFERENCES `sevence`.`business_category` (`business_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

CREATE TABLE `sevence`.`promo_service` (
  `promo_service` INT NOT NULL AUTO_INCREMENT,
  `promo_offer` INT NULL,
  `dt_service` INT NULL,
  `ad_hoc_service` VARCHAR(50) NULL,
  PRIMARY KEY (`promo_service`),
  INDEX `ps_promo_offer_idx_idx` (`promo_offer` ASC),
  INDEX `ps_dt_service_idx_idx` (`dt_service` ASC),
  CONSTRAINT `ps_promo_offer_idx`
    FOREIGN KEY (`promo_offer`)
    REFERENCES `sevence`.`promo_offer` (`promo_offer`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `ps_dt_service_idx`
    FOREIGN KEY (`dt_service`)
    REFERENCES `sevence`.`dt_service` (`dt_service`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_membership` (
  `promo_membership` INT NOT NULL AUTO_INCREMENT,
  `promo_offer` INT NULL,
  `membership_descr` TEXT NULL,
  PRIMARY KEY (`promo_membership`),
  INDEX `pm_promo_offer_idx_idx` (`promo_offer` ASC),
  CONSTRAINT `pm_promo_offer_idx`
    FOREIGN KEY (`promo_offer`)
    REFERENCES `sevence`.`promo_offer` (`promo_offer`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#DCS 02.20.2015 0002433: Email Promotion database structure (additional tables)

ALTER TABLE `sevence`.`promo_offer` CHANGE COLUMN `regular price` `regular_price` DECIMAL(11,2) NULL DEFAULT NULL  ;
#RC 02.20.2015	M2573: API: promo_offer

ALTER TABLE `sevence`.`promo_email_template` ADD COLUMN `class_image_url` TEXT NULL  AFTER `class` , ADD COLUMN `template_image_url` TEXT NULL  AFTER `template_html` ;
#RC 02.25.2015	M2588: add new columns for promo_email_template table

CREATE  TABLE `sevence`.`promo_email_layout` (
  `promo_email_layout` INT NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(50) NULL ,
  `layout_image text` TEXT NULL ,
  PRIMARY KEY (`promo_email_layout`) );
#RC 02.25.2015	M2588: New table promo_email_layout

ALTER TABLE `sevence`.`business_ad_hoc` ADD COLUMN `ad_hoc_name` VARCHAR(45) NULL  AFTER `type` ;
#RC 02.26.2015	M2570: Add new column

ALTER TABLE `sevence`.`promo_membership` 
DROP FOREIGN KEY `pm_promo_offer_idx`;
ALTER TABLE `sevence`.`promo_membership` 
DROP COLUMN `promo_offer`,
DROP INDEX `pm_promo_offer_idx_idx` ;
#MT 02.26.2015 0002577: API: promo_membership

ALTER TABLE `sevence`.`promo_membership` 
ADD COLUMN `email_promo` INT NULL AFTER `promo_membership`,
ADD INDEX `fk_email_promo_idx` (`email_promo` ASC);
ALTER TABLE `sevence`.`promo_membership` 
ADD CONSTRAINT `fk_email_promo`
  FOREIGN KEY (`email_promo`)
  REFERENCES `sevence`.`email_promo` (`email_promo`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 02.26.2015 0002577: API: promo_membership

ALTER TABLE `sevence`.`bt_network` ADD COLUMN `org` INT(11) NULL  AFTER `network_name` , ADD COLUMN `status` TINYINT(1) NULL DEFAULT '0'  AFTER `org` , 
  ADD CONSTRAINT `org_fk1`
  FOREIGN KEY (`org` )
  REFERENCES `sevence`.`org` (`org` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `org_idx` (`org` ASC) ;

ALTER TABLE `sevence`.`bt_network` ADD COLUMN `network_type` INT(11) NULL  AFTER `status` ;
#RC 03.01.2015	M2560: Alter table 'bt_network' 

CREATE  TABLE `sevence`.`network_notes` (
  `network_notes` INT NOT NULL AUTO_INCREMENT ,
  `org` INT(11) NULL ,
  `bt_network` INT(11) NULL ,
  `prof` INT(11) NULL ,
  `note_date` DATETIME NULL ,
  `note_text` TEXT NULL ,
  PRIMARY KEY (`network_notes`) ,
  INDEX `org_note_fk_idx` (`org` ASC) ,
  INDEX `bt_network_note_fk_idx` (`bt_network` ASC) ,
  INDEX `prof_note_fk_idx` (`prof` ASC) ,
  CONSTRAINT `org_note_fk`
    FOREIGN KEY (`org` )
    REFERENCES `sevence`.`org` (`org` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `bt_network_note_fk`
    FOREIGN KEY (`bt_network` )
    REFERENCES `sevence`.`bt_network` (`bt_network` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `prof_note_fk`
    FOREIGN KEY (`prof` )
    REFERENCES `sevence`.`prof` (`prof` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#RC 03.01.2015	M2560: Add table 'network_notes' 

ALTER TABLE `sevence`.`email_promo` 
DROP FOREIGN KEY `ep_dt_event_type_idx`;
ALTER TABLE `sevence`.`email_promo` 
DROP COLUMN `event_type`,
DROP INDEX `ep_dt_event_type_idx_idx` ;
#DCS 03.04.2015 Drop event_type foreign key

ALTER TABLE `sevence`.`email_promo` 
DROP COLUMN `promo_goal`,
DROP COLUMN `promo_type`,
DROP COLUMN `end_date`,
DROP COLUMN `start_date`,
DROP COLUMN `sale_type`,
DROP COLUMN `desired_start`;
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

CREATE TABLE `sevence`.`promotion` (
  `promotion` INT NOT NULL AUTO_INCREMENT,
  `email_promo` INT NULL,
  `desired_start` VARCHAR(12) NULL,
  `event_type` INT NULL,
  `sale_type` INT NULL,
  `start_date` DATETIME NULL,
  `end_date` DATETIME NULL,
  `promo_type` VARCHAR(45) NULL,
  `promo_goal` INT NULL,
  PRIMARY KEY (`promotion`),
  INDEX `fk1_email_promo_idx` (`email_promo` ASC),
  INDEX `ep_dt_event_type_idx` (`event_type` ASC),
  CONSTRAINT `fk1_email_promo`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `ep_dt_event_type`
    FOREIGN KEY (`event_type`)
    REFERENCES `sevence`.`dt_event_type` (`dt_event_type`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`promo_offer` 
DROP FOREIGN KEY `po_email_promo_idx`;
ALTER TABLE `sevence`.`promo_offer` 
DROP COLUMN `email_promo`,
DROP INDEX `po_email_promo_idx_idx` ;
ALTER TABLE `sevence`.`promo_offer` 
DROP COLUMN `offer_copy`;
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`promo_offer` 
ADD COLUMN `promotion` INT NULL AFTER `promo_offer`,
ADD INDEX `po_promotion_idx` (`promotion` ASC);
ALTER TABLE `sevence`.`promo_offer` 
ADD CONSTRAINT `po_promotion`
  FOREIGN KEY (`promotion`)
  REFERENCES `sevence`.`promotion` (`promotion`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`promo_package` 
DROP FOREIGN KEY `pp_email_promo_idx`;
ALTER TABLE `sevence`.`promo_package` 
DROP COLUMN `package_copy`,
DROP COLUMN `email_promo`,
ADD COLUMN `promotion` INT NULL AFTER `promo_package`,
ADD INDEX `pp_promotion_idx` (`promotion` ASC),
DROP INDEX `pp_email_promo_idx_idx` ;
ALTER TABLE `sevence`.`promo_package` 
ADD CONSTRAINT `pp_promotion`
  FOREIGN KEY (`promotion`)
  REFERENCES `sevence`.`promotion` (`promotion`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`promo_event` 
DROP FOREIGN KEY `pe_email_promo_idx`;
ALTER TABLE `sevence`.`promo_event` 
DROP COLUMN `event_copy`,
DROP COLUMN `email_promo`,
ADD COLUMN `promotion` INT NULL AFTER `promo_event`,
ADD INDEX `pe_promotion_idx` (`promotion` ASC),
DROP INDEX `pe_email_promo_idx_idx` ;
ALTER TABLE `sevence`.`promo_event` 
ADD CONSTRAINT `pe_promotion`
  FOREIGN KEY (`promotion`)
  REFERENCES `sevence`.`promotion` (`promotion`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `copy_text` TEXT NULL AFTER `promo_goal`;
ALTER TABLE `sevence`.`promo_images` 
DROP FOREIGN KEY `pi_promo_event_idx`,
DROP FOREIGN KEY `pi_promo_package_idx`,
DROP FOREIGN KEY `pi_promo_offer_idx`;
ALTER TABLE `sevence`.`promo_images` 
DROP COLUMN `promo_event`,
DROP COLUMN `promo_package`,
DROP COLUMN `promo_offer`,
ADD COLUMN `promotion` INT NULL AFTER `promo_images`,
ADD INDEX `pi_promotion_idx` (`promotion` ASC),
DROP INDEX `promo_event_idx` ,
DROP INDEX `pi_promo_package_idx_idx` ,
DROP INDEX `pi_promo_offer_idx_idx` ;
ALTER TABLE `sevence`.`promo_images` 
ADD CONSTRAINT `pi_promotion`
  FOREIGN KEY (`promotion`)
  REFERENCES `sevence`.`promotion` (`promotion`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.03.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `call_to_action` VARCHAR(100) NULL AFTER `copy_text`;
#MT 03.03.2015 0002608: Add promotion in fuse

ALTER TABLE `sevence`.`promo_membership` 
DROP FOREIGN KEY `fk_email_promo`;
ALTER TABLE `sevence`.`promo_membership` 
DROP COLUMN `email_promo`,
ADD COLUMN `promo_offer` INT NULL AFTER `promo_membership`,
ADD INDEX `promo_offer_idx` (`promo_offer` ASC),
DROP INDEX `fk_email_promo_idx` ;
ALTER TABLE `sevence`.`promo_membership` 
ADD CONSTRAINT `promo_offer`
  FOREIGN KEY (`promo_offer`)
  REFERENCES `sevence`.`promo_offer` (`promo_offer`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.06.2015 0002577: API: promo_membership

ALTER TABLE `sevence`.`promotion`
ADD COLUMN `email_promo_type` VARCHAR(45) NULL COMMENT 'products, services, memberships' AFTER `email_promo`;
#KA 03.04.2015 0002603: Changes to the email_promotion and associated tables and their APIs

ALTER TABLE `sevence`.`email_promo` ADD COLUMN `subject_line` VARCHAR(100) NULL AFTER `email_class`;
ALTER TABLE `sevence`.`promo_email_garnish` ADD COLUMN `garnish_name` VARCHAR(100) NULL AFTER `promo_email_garnish`;
#DCS 03.06.2015	0002605: Add email promotion in fuse (additional columns)

UPDATE `sevence`.`dt_event_type` SET `event_type_month`='01' WHERE `dt_event_type`='13';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='01' WHERE `dt_event_type`='14';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='02' WHERE `dt_event_type`='1';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='02' WHERE `dt_event_type`='7';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='02' WHERE `dt_event_type`='17';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='03' WHERE `dt_event_type`='15';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='05' WHERE `dt_event_type`='12';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='04' WHERE `dt_event_type`='5';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='05' WHERE `dt_event_type`='3';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='05' WHERE `dt_event_type`='11';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='06' WHERE `dt_event_type`='6';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='07' WHERE `dt_event_type`='9';
UPDATE `sevence`.`dt_event_type` SET `event_type_month`='09' WHERE `dt_event_type`='10';
#BB Mantis 2585: Changed Mother's day to correct month and attempted to put 0's in front of numbers so as to make it easier to iterate over in code. Turns out SQL ignores 0's. So I found a work-around.

INSERT INTO `gift_screen` (`gift_screen`,`id`,`html`,`css`) VALUES (59,'little_help_page1','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>A Little Help</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n  <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n   boomtag{action_back}\n<style type=\"text/css\">\n	boomtag{main_css}\n </style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n        	\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\"/slot-machine?1=\"+data[1]);\n                            }\n                            else if(data[0] == \"prize\")\n                            {\n                            	$(\'#won_msg\').text(\'Sorry!\');\n                            	$(\'#offer\').text(\'No prizes available.\');\n                            	$(\'#email_info\').text(\'Prize Info: Sorry no email was sent.\');\n                            	$(\'#jackpot\').show();\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n      \n    </script>\n</head>\n<body>\n	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message-form-p1\">\n                <div class=\"col-xs-12\">\n                    <h1>enter your email</h1>\n                    <h2>so we can send you<br/>a gift from one<br/>of our friends</h2>\n                </div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-form\">\n            	<span style=\"color:red;font-size:20px\" id=\"err_msg\"></span>\n                <input type=\"text\" id=\'email_add\'>\n                <input type=\"submit\" value=\"submit\" id=\"email-submit\">\n                 <div id=\"jackpot\">\n					<div>\n						<h1 id=\"won_msg\"></h1>\n						<p id=\"offer\"></p>\n						<p id=\"email_info\"></p>\n					</div>\n				</div>\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n	    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n	    font-family: \'Open Sans\', sans-serif;\n	}\n	\n	\n	/**\n	Star FriendsCardLandingPage02\n	**/\n	\n	@media(max-width:767px){\n		\n		.promo-message-form-p1 h2 {\n		  font-size: 24px !important;\n		  letter-spacing: 0 !important;\n		}\n		\n		.promo-message-form-p1 h1 {\n		  font-size: 32px !important;\n		  letter-spacing: 0 !important;\n		}\n		.promo-form input[type=\"submit\"] {\n		  width: 100% !important;\n		  text-align:center !important;\n		  padding: 10px !important;\n		}\n		\n		.footer .inner img{\n			width:30% !important;\n		}\n		\n		.promo-border-lg {\n		  margin: 0 !important;\n		  width: 100% !important;\n		}\n		.promo-message-p1 h1 {\n		  font-size: 36px !important;\n		}\n		\n		.promo-message-p1 p {\n		  font-size: 26px !important;\n		}\n		.friendscardlandingpage02-msg h1 {\n          font-size: 66px !important;\n        }\n\n	}\n	@media(min-width:768px){\n		\n		.promo-message-form-p1 h2 {\n		  font-size: 24px;\n		  letter-spacing: 0;\n		}\n		\n		.promo-message-form-p1 h1 {\n		  font-size: 32px;\n		  letter-spacing: 0;\n		}\n		.promo-form input[type=\"submit\"] {\n		  width: 100%;\n		  text-align:center !important;\n		  padding: 10px !important;\n		}\n		\n		.footer .inner img{\n			width:30%;\n		}\n		.promo-message-p1 h1 {\n		  font-size: 36px !important;\n		}\n	\n		.promo-message-p1 p {\n		  font-size: 26px !important;\n		}\n		\n		.friendscardlandingpage02-msg h1 {\n          font-size: 66px !important;\n        }\n			\n	}\n	@media(min-width:992px){}\n	@media(min-width:1200px){}\n		\n	\n	.friendscardlandingpage02-msg h1{\n	    font-size: 120px;\n	    text-transform: uppercase;\n	    color: #505050;\n	    text-align: center;\n	    margin:0.3em 0;\n	}\n	\n	.friendscardlandingpage02-msg h3{\n	    font-size: 30px;\n	    text-transform: uppercase;\n	    color: #505050;\n	    text-align: center;\n	}\n	\n	.friendscardlandingpage02-msg h2{\n	    color: #898989;\n	    font-size: 32px;\n	    font-weight: 300;\n	    margin: 0 auto 35px;\n	    text-align: center;\n	    text-transform: uppercase;\n	    width: 70%;\n	}\n	\n	.friendscardlandingpage02-logo{\n	    text-align: center;\n	}\n	\n	.friendscardlandingpage02-logo img{\n	    max-width: 100%;\n	}\n	\n	/**\n	End FriendsCardLandingPage02\n	**/\n	\n	.promo-message-p1 p{\n	    color: #898989;\n	    text-transform: uppercase;\n	    text-align: center;\n	    font-size: 55px;\n	    font-weight: 300;\n	    margin: 0;\n	    line-height: normal;\n	}\n	\n	.promo-form input[type=\"text\"]{\n	    border: 1px solid #010101;\n	    box-shadow: 0 0 5px #b3b3b3 inset;\n	    display: block;\n	    padding: 3% 2%;\n	    width: 100%;\n	}\n	\n	.promo-form input[type=\"submit\"]{\n	    background: #444444; /* Old browsers */\n	    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n	    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n	    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n	    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n	    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n	    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n	    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n	    border: medium none;\n	    color: #fff;\n	    display: inline-block;\n	    font-family: \"Open Sans Condensed\",sans-serif;\n	    font-size: 45px;\n	    font-weight: 300;\n	    margin-top: 15px;\n	    padding: 10px 120px;\n	    text-transform: uppercase;\n	}\n	\n	.promo-form{\n	    margin-top: 3%;\n	    text-align: center;\n	}\n	\n	.promo-message-form-p1 h1{\n	    color: #505050;\n	    font-size: 65px;\n	    text-transform: uppercase;\n	    text-align: center;\n	    letter-spacing: 10px;]\n	    font-weight: 800;\n	}\n	\n	.promo-message-form-p1 h2{\n	    color: #898989;\n	    font-size: 60px;\n	    text-transform: uppercase;\n	    text-align: center;\n	    letter-spacing: 5px;\n	}\n	\n	.promo-wrap{\n	    padding: 5%;\n	}\n	\n	.container{\n	    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n	    border: 1px solid #9a9a9a;\n	    box-shadow: 0 0 10px #777777;\n	    margin-bottom: 5%;\n	    margin-top: 5%;\n	}\n	\n	.promo-message{\n	    text-align: center;\n	}\n	\n	.promo-message h1{\n	    color: #505050;\n	    font-size: 150px;\n	    letter-spacing: 15px;\n	    line-height: normal;\n	}\n	\n	.promo-border-lg{\n	    height:20px;\n	    width: 100%;\n	    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n	}\n	\n	.promo-msg-low h2{\n	    font-size: 32px;\n	    color: #4f4f4f;\n	    letter-spacing: 10px;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	.promo-msg-low{\n	    padding: 2% 0;\n	}\n	\n	.promo-validity{\n	    color: #898989;\n	}\n	\n	.promo-validity h2{\n	    font-size: 45px;\n	    font-weight: 300;\n	    letter-spacing: 10px;\n	    margin-top: 0;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	\n	\n	/*\n	Page 2\n	*/\n	\n	\n	\n	.promo-message-p3 .price{\n	    color: #898989;\n	}\n	\n	.promo-message-p3 h1{\n	    color: #505050;\n	    font-size: 130px;\n	    letter-spacing: 5px;\n	    line-height: normal; \n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	.black-box{\n	    background: #454545; /* Old browsers */\n	    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n	    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n	    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n	    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n	    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n	    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n	    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n	    color: #fff;\n	    display: table-cell;\n	    font-family: \"Open Sans Condensed\",sans-serif;\n	    font-size: 55px;\n	    height: 320px;\n	    margin: 0 2%;\n	    padding: 36px 0;\n	    text-align: center;\n	    text-transform: uppercase;\n	    width: 46.5%;\n	}\n	\n	.black-box:first-child{\n	    margin-left: 0;\n	}\n	\n	.black-box:last-child{\n	    margin-right: 0;\n	}\n	\n	\n	/*\n	Page 3\n	*/\n	\n	.promo-intro{\n	    color: #505050;\n	    font-size: 32px;\n	    text-align: center;\n	    font-weight: 800;\n	    letter-spacing: 15px;\n	}\n	\n	.promo-message{\n	    text-align: center;\n	}\n	\n	.promo-header-msg h2{\n	    font-size: 32px;\n	    color: #898989;\n	    letter-spacing: 10px;\n	    text-align: center;\n	    font-weight: 300;\n	    text-transform: uppercase;\n	}\n	\n	.promo-msg-low h2{\n	    font-size: 32px;\n	    color: #4f4f4f;\n	    letter-spacing: 10px;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	.promo-msg-low{\n	    padding: 2% 0;\n	}\n	\n	.promo-orgname{\n	    color: #898989;\n	    margin-top: 5%;\n	}\n	\n	.promo-orgname h2{\n	    font-size: 45px;\n	    font-weight: 300;\n	    letter-spacing: 10px;\n	    margin-top: 0;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	#jackpot {\n	    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n	    color: red;\n	    float: left;\n	    font-weight: 400;\n	    font-size:12px;\n	    margin: 0 auto;\n	    min-height: 155px;\n	    padding: .5em 2em 0;\n	    position: absolute;\n	    text-align: center;\n	    vertical-align: middle;\n	    width: 100%;\n	    z-index: 10;\n	    top:-55px;\n	}\n	\n	.promo-form{\n		position:relative;\n	}');
INSERT INTO `gift_screen` (`gift_screen`,`id`,`html`,`css`) VALUES (60,'little_help_page2','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>A Little Help</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n  <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n    boomtag{action_back}\n<style type=\"text/css\">\n	boomtag{main_css}\n </style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n        	\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\"/slot-machine?1=\"+data[1]);\n                            }\n                            else if(data[0] == \"prize\")\n                            {\n                            	$(\'#won_msg\').text(\'Sorry!\');\n                            	$(\'#offer\').text(\'No prizes available.\');\n                            	$(\'#email_info\').text(\'Prize Info: Sorry no email was sent.\');\n                            	$(\'#jackpot\').show();\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n      \n    </script>\n</head>\n<body>\n	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row friendscardlandingpage02-msg\">\n                <div class=\"col-xs-12\">\n                    <h3>check your email</h3>\n                    <h1>you won!</h1>\n                    <h2>boomtag{prize_won}</h2>\n                </div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row friendscardlandingpage02-msg\">\n                <div class=\"col-xs-12\">\n                    <h3>A Gift From: </h3>\n                    <div class=\"friendscardlandingpage02-logo\">\n                        <img src=\"boomtag{logo}.png\"/>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n	    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n	    font-family: \'Open Sans\', sans-serif;\n	}\n	\n	\n	/**\n	Star FriendsCardLandingPage02\n	**/\n	\n	@media(max-width:767px){\n		\n		.promo-message-form-p1 h2 {\n		  font-size: 24px !important;\n		  letter-spacing: 0 !important;\n		}\n		\n		.promo-message-form-p1 h1 {\n		  font-size: 32px !important;\n		  letter-spacing: 0 !important;\n		}\n		.promo-form input[type=\"submit\"] {\n		  width: 100% !important;\n		  text-align:center !important;\n		  padding: 10px !important;\n		}\n		\n		.footer .inner img{\n			width:30% !important;\n		}\n		\n		.promo-border-lg {\n		  margin: 0 !important;\n		  width: 100% !important;\n		}\n		.promo-message-p1 h1 {\n		  font-size: 36px !important;\n		}\n		\n		.promo-message-p1 p {\n		  font-size: 26px !important;\n		}\n		.friendscardlandingpage02-msg h1 {\n          font-size: 66px !important;\n        }\n\n	}\n	@media(min-width:768px){\n		\n		.promo-message-form-p1 h2 {\n		  font-size: 24px;\n		  letter-spacing: 0;\n		}\n		\n		.promo-message-form-p1 h1 {\n		  font-size: 32px;\n		  letter-spacing: 0;\n		}\n		.promo-form input[type=\"submit\"] {\n		  width: 100%;\n		  text-align:center !important;\n		  padding: 10px !important;\n		}\n		\n		.footer .inner img{\n			width:30%;\n		}\n		.promo-message-p1 h1 {\n		  font-size: 36px !important;\n		}\n	\n		.promo-message-p1 p {\n		  font-size: 26px !important;\n		}\n		\n		.friendscardlandingpage02-msg h1 {\n          font-size: 66px !important;\n        }\n			\n	}\n	@media(min-width:992px){}\n	@media(min-width:1200px){}\n		\n	\n	.friendscardlandingpage02-msg h1{\n	    font-size: 120px;\n	    text-transform: uppercase;\n	    color: #505050;\n	    text-align: center;\n	    margin:0.3em 0;\n	}\n	\n	.friendscardlandingpage02-msg h3{\n	    font-size: 30px;\n	    text-transform: uppercase;\n	    color: #505050;\n	    text-align: center;\n	}\n	\n	.friendscardlandingpage02-msg h2{\n	    color: #898989;\n	    font-size: 32px;\n	    font-weight: 300;\n	    margin: 0 auto 35px;\n	    text-align: center;\n	    text-transform: uppercase;\n	    width: 70%;\n	}\n	\n	.friendscardlandingpage02-logo{\n	    text-align: center;\n	}\n	\n	.friendscardlandingpage02-logo img{\n	    max-width: 100%;\n	}\n	\n	/**\n	End FriendsCardLandingPage02\n	**/\n	\n	.promo-message-p1 p{\n	    color: #898989;\n	    text-transform: uppercase;\n	    text-align: center;\n	    font-size: 55px;\n	    font-weight: 300;\n	    margin: 0;\n	    line-height: normal;\n	}\n	\n	.promo-form input[type=\"text\"]{\n	    border: 1px solid #010101;\n	    box-shadow: 0 0 5px #b3b3b3 inset;\n	    display: block;\n	    padding: 3% 2%;\n	    width: 100%;\n	}\n	\n	.promo-form input[type=\"submit\"]{\n	    background: #444444; /* Old browsers */\n	    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n	    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n	    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n	    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n	    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n	    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n	    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n	    border: medium none;\n	    color: #fff;\n	    display: inline-block;\n	    font-family: \"Open Sans Condensed\",sans-serif;\n	    font-size: 45px;\n	    font-weight: 300;\n	    margin-top: 15px;\n	    padding: 10px 120px;\n	    text-transform: uppercase;\n	}\n	\n	.promo-form{\n	    margin-top: 3%;\n	    text-align: center;\n	}\n	\n	.promo-message-form-p1 h1{\n	    color: #505050;\n	    font-size: 65px;\n	    text-transform: uppercase;\n	    text-align: center;\n	    letter-spacing: 10px;]\n	    font-weight: 800;\n	}\n	\n	.promo-message-form-p1 h2{\n	    color: #898989;\n	    font-size: 60px;\n	    text-transform: uppercase;\n	    text-align: center;\n	    letter-spacing: 5px;\n	}\n	\n	.promo-wrap{\n	    padding: 5%;\n	}\n	\n	.container{\n	    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n	    border: 1px solid #9a9a9a;\n	    box-shadow: 0 0 10px #777777;\n	    margin-bottom: 5%;\n	    margin-top: 5%;\n	}\n	\n	.promo-message{\n	    text-align: center;\n	}\n	\n	.promo-message h1{\n	    color: #505050;\n	    font-size: 150px;\n	    letter-spacing: 15px;\n	    line-height: normal;\n	}\n	\n	.promo-border-lg{\n	    height:20px;\n	    width: 100%;\n	    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n	}\n	\n	.promo-msg-low h2{\n	    font-size: 32px;\n	    color: #4f4f4f;\n	    letter-spacing: 10px;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	.promo-msg-low{\n	    padding: 2% 0;\n	}\n	\n	.promo-validity{\n	    color: #898989;\n	}\n	\n	.promo-validity h2{\n	    font-size: 45px;\n	    font-weight: 300;\n	    letter-spacing: 10px;\n	    margin-top: 0;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	\n	\n	/*\n	Page 2\n	*/\n	\n	\n	\n	.promo-message-p3 .price{\n	    color: #898989;\n	}\n	\n	.promo-message-p3 h1{\n	    color: #505050;\n	    font-size: 130px;\n	    letter-spacing: 5px;\n	    line-height: normal; \n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	.black-box{\n	    background: #454545; /* Old browsers */\n	    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n	    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n	    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n	    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n	    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n	    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n	    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n	    color: #fff;\n	    display: table-cell;\n	    font-family: \"Open Sans Condensed\",sans-serif;\n	    font-size: 55px;\n	    height: 320px;\n	    margin: 0 2%;\n	    padding: 36px 0;\n	    text-align: center;\n	    text-transform: uppercase;\n	    width: 46.5%;\n	}\n	\n	.black-box:first-child{\n	    margin-left: 0;\n	}\n	\n	.black-box:last-child{\n	    margin-right: 0;\n	}\n	\n	\n	/*\n	Page 3\n	*/\n	\n	.promo-intro{\n	    color: #505050;\n	    font-size: 32px;\n	    text-align: center;\n	    font-weight: 800;\n	    letter-spacing: 15px;\n	}\n	\n	.promo-message{\n	    text-align: center;\n	}\n	\n	.promo-header-msg h2{\n	    font-size: 32px;\n	    color: #898989;\n	    letter-spacing: 10px;\n	    text-align: center;\n	    font-weight: 300;\n	    text-transform: uppercase;\n	}\n	\n	.promo-msg-low h2{\n	    font-size: 32px;\n	    color: #4f4f4f;\n	    letter-spacing: 10px;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	.promo-msg-low{\n	    padding: 2% 0;\n	}\n	\n	.promo-orgname{\n	    color: #898989;\n	    margin-top: 5%;\n	}\n	\n	.promo-orgname h2{\n	    font-size: 45px;\n	    font-weight: 300;\n	    letter-spacing: 10px;\n	    margin-top: 0;\n	    text-align: center;\n	    text-transform: uppercase;\n	}\n	\n	#jackpot {\n	    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n	    color: red;\n	    float: left;\n	    font-weight: 400;\n	    font-size:12px;\n	    margin: 0 auto;\n	    min-height: 155px;\n	    padding: .5em 2em 0;\n	    position: absolute;\n	    text-align: center;\n	    vertical-align: middle;\n	    width: 100%;\n	    z-index: 10;\n	    top:-55px;\n	}\n	\n	.promo-form{\n		position:relative;\n	}');
#RC 02.23.2015	M2555: A LITTLE HELP gift_screen

ALTER TABLE `sevence`.`promo_package` 
ADD COLUMN `package_terms` TEXT NULL AFTER `package_price`;
#MT 03.06.2015 0002608: Add promotion in fuse

ALTER TABLE `sevence`.`promo_event` 
ADD COLUMN `event_terms` TEXT NULL AFTER `event_desc`;
#MT 03.06.2015 0002608: Add promotion in fuse

INSERT INTO `gift_screen` (`id`,`html`,`css`) VALUES ('give_or_take_main','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>Give Or Take</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n  boomtag{action_back}\n<style type=\"text/css\">\nboomtag{main_css}\n</style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n            var date_played = new Date();\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                var date_play = (date_played.getFullYear()+\'-\'+ (date_played.getMonth()+1) +\'-\'+ date_played.getDate()+\' \'+date_played.getHours()+\':\'+date_played.getMinutes()+\':\'+date_played.getSeconds());\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                          	date_play: date_play\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\'/slot-machine?1=\'+data[1]+\'&dw=\'+data[2]);\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n    </script>\n</head>\n<body>\n	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message-p1\">\n                <div class=\"col-xs-12\">\n                    <h1>WIN $1 $5 or $10</h1>\n                    <p>Towards your bill or charity</p>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message-form-p1\">\n                <div class=\"col-xs-12\"><h1>enter your email so we can send your prize</h1></div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-form\">\n            	<span style=\"color:red;font-size:20px\" id=\"err_msg\"></span>\n                <input type=\"text\" id=\'email_add\'>\n                <input type=\"submit\" value=\"submit\" id=\"email-submit\">\n                 <div id=\"jackpot\">\n					<div>\n						<h1 id=\"won_msg\"></h1>\n						<p id=\"offer\"></p>\n						<p id=\"email_info\"></p>\n					</div>\n				</div>\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
INSERT INTO `gift_screen` (`id`,`html`,`css`) VALUES ('give_or_take_won','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>Give Or Take</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n  boomtag{action_back}\n<style type=\"text/css\">\nboomtag{main_css}\n</style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n            var date_played = new Date();\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                var date_play = (date_played.getFullYear()+\'-\'+ (date_played.getMonth()+1) +\'-\'+ date_played.getDate()+\' \'+date_played.getHours()+\':\'+date_played.getMinutes()+\':\'+date_played.getSeconds());\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                          	date_play: date_play\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\'/slot-machine?1=\'+data[1]+\'&dw=\'+data[2]);\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n    </script>\n</head>\n<body>\n  	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message-p3\">\n                <div class=\"col-xs-12\"><h1>you won!<br/> <span class=\"price\">$boomtag{prize_won}</span></h1></div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-msg-low\">\n               <a href=\"/slot-machine?1=boomtag{atom}&2=take&dw=boomtag{local_date}\" class=\"anchor_left\">\n                	<div class=\"black-box col-xs-6 left\">take<br/>off this<br/>purchase</div>\n               </a>\n               <a href=\"/slot-machine?1=boomtag{atom}&2=give&dw=boomtag{local_date}\">\n                	<div class=\"black-box col-xs-6\">donate to<br/>charity</div>\n               </a>\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
INSERT INTO `gift_screen` (`id`,`html`,`css`) VALUES ('give_or_take_take','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>Give Or Take</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n  boomtag{action_back}\n<style type=\"text/css\">\nboomtag{main_css}\n</style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n            var date_played = new Date();\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                var date_play = (date_played.getFullYear()+\'-\'+ (date_played.getMonth()+1) +\'-\'+ date_played.getDate()+\' \'+date_played.getHours()+\':\'+date_played.getMinutes()+\':\'+date_played.getSeconds());\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                          	date_play: date_play\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\'/slot-machine?1=\'+data[1]+\'&dw=\'+data[2]);\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n    </script>\n</head>\n<body>\n	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message\">\n                <div class=\"col-xs-12\"><h1>TAKE <br/> $boomtag{prize_won} OFF</h1></div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-msg-low\">\n                <h2>Please show to cashier</h2>\n            </div>\n            <div class=\"row promo-validity\">\n                <h2>good for <br/> boomtag{local_date_display}</h2>\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
INSERT INTO `gift_screen` (`id`,`html`,`css`) VALUES ('give_or_take_give','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>Give Or Take</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n  boomtag{action_back}\n<style type=\"text/css\">\nboomtag{main_css}\n</style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n            var date_played = new Date();\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                var date_play = (date_played.getFullYear()+\'-\'+ (date_played.getMonth()+1) +\'-\'+ date_played.getDate()+\' \'+date_played.getHours()+\':\'+date_played.getMinutes()+\':\'+date_played.getSeconds());\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                          	date_play: date_play\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\'/slot-machine?1=\'+data[1]+\'&dw=\'+data[2]);\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n    </script>\n</head>\n<body>\n	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-intro\">\n                <div class=\"col-xs-12\"><h2>THANK YOU!<br/>YOU CHOSE WISELY</h2></div>\n            </div>\n            <div class=\"row promo-message\">\n                <div class=\"col-xs-12\"><h1>GIVE<br/>YOUR<br/>$boomtag{prize_won}</h1></div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-header-msg\">\n                <h2>YOUR DONATION WILL HELP ONE OF THESE<br/>FINE ORGANIZATIONS.</h2>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-orgname\">\n            	boomtag{charities}\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
#KA 03.06.2015 M2553: Changes to the spin and win: Give or Take

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `client_type` VARCHAR(200) NULL AFTER `call_to_action`,
ADD COLUMN `network_type` VARCHAR(45) NULL AFTER `client_type`,
ADD COLUMN `default_promotion` TINYINT NULL AFTER `network_type`;
#MT 03.09.2015 0002608: Add promotion in fuse

ALTER TABLE `sevence`.`promotion` 
DROP COLUMN `email_promo_type`,
ADD COLUMN `category` INT NULL AFTER `email_promo`,
ADD INDEX `fk_business_category_idx` (`category` ASC);
ALTER TABLE `sevence`.`promotion` 
ADD CONSTRAINT `fk_business_category`
  FOREIGN KEY (`category`)
  REFERENCES `sevence`.`business_category` (`business_category`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.09.2015 0002625: Changes to promotion table and email_promo calls.

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `expire_type` VARCHAR(45) NULL AFTER `end_date`,
ADD COLUMN `end_num_days` VARCHAR(45) NULL AFTER `expire_type`,
ADD COLUMN `print_coupon` TINYINT NULL AFTER `default_promotion`;
#MT 03.10.2015 0002638: More promo stuff

CREATE  TABLE `sevence`.`network_promo_image_settings` (
  `network_promo_image_settings` INT NOT NULL AUTO_INCREMENT ,
  `promotion` INT NULL ,
  `style` VARCHAR(45) NULL ,
  `pages` VARCHAR(45) NULL ,
  `header_font` VARCHAR(45) NULL ,
  `header_size` INT NULL ,
  `header_color` VARCHAR(45) NULL ,
  `prize_font` VARCHAR(45) NULL ,
  `prize_size` INT NULL ,
  `prize_color` VARCHAR(45) NULL ,
  `prize_desc_font` VARCHAR(45) NULL ,
  `prize_desc_size` INT NULL ,
  `prize_desc_color` VARCHAR(45) NULL ,
  `box_color` VARCHAR(45) NULL ,
  `thin_line_color` VARCHAR(45) NULL ,
  `bottom_text_font` VARCHAR(45) NULL ,
  `bottom_text_size` INT NULL ,
  `bottom_text_color` VARCHAR(45) NULL ,
  `terms_condition_font` VARCHAR(45) NULL ,
  `terms_condition_size` INT NULL ,
  `terms_condition_color` VARCHAR(45) NULL ,
  PRIMARY KEY (`network_promo_image_settings`) );
#RC 03.10.2015	M2621: Promo Images

ALTER TABLE `sevence`.`network_promo_image_settings` ADD COLUMN `header_pos_x` INT NULL  AFTER `header_color` , ADD COLUMN `header_pos_y` INT NULL  AFTER `header_pos_x` , ADD COLUMN `header_width` INT NULL  AFTER `header_pos_y` , ADD COLUMN `header_height` INT NULL  AFTER `header_width` , ADD COLUMN `prize_pos_x` INT NULL  AFTER `prize_color` , ADD COLUMN `prize_pos_y` INT NULL  AFTER `prize_pos_x` , ADD COLUMN `prize_width` INT NULL  AFTER `prize_pos_y` , ADD COLUMN `prize_height` INT NULL  AFTER `prize_width` , ADD COLUMN `prize_desc_pos_x` INT NULL  AFTER `prize_desc_color` , ADD COLUMN `prize_desc_pos_y` INT NULL  AFTER `prize_desc_pos_x` , ADD COLUMN `prize_desc_width` INT NULL  AFTER `prize_desc_pos_y` , ADD COLUMN `prize_desc_height` INT NULL  AFTER `prize_desc_width` , ADD COLUMN `box_pos_x1` INT NULL  AFTER `box_color` , ADD COLUMN `box_pos_x2` INT NULL  AFTER `box_pos_x1` , ADD COLUMN `box_pos_y1` INT NULL  AFTER `box_pos_x2` , ADD COLUMN `box_pos_y2` INT NULL  AFTER `box_pos_y1` , ADD COLUMN `thin_line_pos_x1` INT NULL  AFTER `thin_line_color` , ADD COLUMN `thin_line_pos_x2` INT NULL  AFTER `thin_line_pos_x1` , ADD COLUMN `thin_line_pos_y1` INT NULL  AFTER `thin_line_pos_x2` , ADD COLUMN `thin_line_pos_y2` INT NULL  AFTER `thin_line_pos_y1` , ADD COLUMN `bottom_text_pos_x` INT NULL  AFTER `bottom_text_color` , ADD COLUMN `bottom_text_pos_y` INT NULL  AFTER `bottom_text_pos_x` , ADD COLUMN `bottom_text_width` INT NULL  AFTER `bottom_text_pos_y` , ADD COLUMN `bottom_text_height` INT NULL  AFTER `bottom_text_width` , ADD COLUMN `terms_condition_width` INT NULL  AFTER `terms_condition_color` , ADD COLUMN `terms_condition_pos_x` INT NULL  AFTER `terms_condition_width` , ADD COLUMN `terms_condition_pos_y` INT NULL  AFTER `terms_condition_pos_x` , ADD COLUMN `terms_condition_height` INT NULL  AFTER `terms_condition_pos_y` ;
ALTER TABLE `sevence`.`network_promo_image_settings` ADD COLUMN `logo_pos_x` INT(11) NULL  AFTER `terms_condition_height` , ADD COLUMN `logo_pos_y` INT(11) NULL  AFTER `logo_pos_x` ;
ALTER TABLE `sevence`.`promotion` ADD COLUMN `promo_style` VARCHAR(45) NULL DEFAULT 'style_1'  AFTER `call_to_action` ;
#RC 03.10.2015	M2621: Promo Images

INSERT INTO `network_promo_image_settings` (`network_promo_image_settings`,`promotion`,`style`,`pages`,`header_font`,`header_size`,`header_color`,`header_pos_x`,`header_pos_y`,`header_width`,`header_height`,`prize_font`,`prize_size`,`prize_color`,`prize_pos_x`,`prize_pos_y`,`prize_width`,`prize_height`,`prize_desc_font`,`prize_desc_size`,`prize_desc_color`,`prize_desc_pos_x`,`prize_desc_pos_y`,`prize_desc_width`,`prize_desc_height`,`box_color`,`box_pos_x1`,`box_pos_x2`,`box_pos_y1`,`box_pos_y2`,`thin_line_color`,`thin_line_pos_x1`,`thin_line_pos_x2`,`thin_line_pos_y1`,`thin_line_pos_y2`,`bottom_text_font`,`bottom_text_size`,`bottom_text_color`,`bottom_text_pos_x`,`bottom_text_pos_y`,`bottom_text_width`,`bottom_text_height`,`terms_condition_font`,`terms_condition_size`,`terms_condition_color`,`terms_condition_width`,`terms_condition_pos_x`,`terms_condition_pos_y`,`terms_condition_height`,`logo_pos_x`,`logo_pos_y`) VALUES (1,0,'style_1','large','DroidSans.ttf',12,'#000',450,50,380,100,'DroidSans.ttf',50,'#FFFFFF',360,200,110,120,'DroidSans.ttf',30,'#FFFFFF',450,157,250,120,'#000',293,612,249,109,'#FFFFFF',430,430,130,230,'DroidSans.ttf',10,'#000',450,300,360,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,60,120);
INSERT INTO `network_promo_image_settings` (`network_promo_image_settings`,`promotion`,`style`,`pages`,`header_font`,`header_size`,`header_color`,`header_pos_x`,`header_pos_y`,`header_width`,`header_height`,`prize_font`,`prize_size`,`prize_color`,`prize_pos_x`,`prize_pos_y`,`prize_width`,`prize_height`,`prize_desc_font`,`prize_desc_size`,`prize_desc_color`,`prize_desc_pos_x`,`prize_desc_pos_y`,`prize_desc_width`,`prize_desc_height`,`box_color`,`box_pos_x1`,`box_pos_x2`,`box_pos_y1`,`box_pos_y2`,`thin_line_color`,`thin_line_pos_x1`,`thin_line_pos_x2`,`thin_line_pos_y1`,`thin_line_pos_y2`,`bottom_text_font`,`bottom_text_size`,`bottom_text_color`,`bottom_text_pos_x`,`bottom_text_pos_y`,`bottom_text_width`,`bottom_text_height`,`terms_condition_font`,`terms_condition_size`,`terms_condition_color`,`terms_condition_width`,`terms_condition_pos_x`,`terms_condition_pos_y`,`terms_condition_height`,`logo_pos_x`,`logo_pos_y`) VALUES (2,0,'style_1','small','DroidSans.ttf',12,'#000',450,50,380,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DroidSans.ttf',18,'#000',450,100,360,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,60,15);
INSERT INTO `network_promo_image_settings` (`network_promo_image_settings`,`promotion`,`style`,`pages`,`header_font`,`header_size`,`header_color`,`header_pos_x`,`header_pos_y`,`header_width`,`header_height`,`prize_font`,`prize_size`,`prize_color`,`prize_pos_x`,`prize_pos_y`,`prize_width`,`prize_height`,`prize_desc_font`,`prize_desc_size`,`prize_desc_color`,`prize_desc_pos_x`,`prize_desc_pos_y`,`prize_desc_width`,`prize_desc_height`,`box_color`,`box_pos_x1`,`box_pos_x2`,`box_pos_y1`,`box_pos_y2`,`thin_line_color`,`thin_line_pos_x1`,`thin_line_pos_x2`,`thin_line_pos_y1`,`thin_line_pos_y2`,`bottom_text_font`,`bottom_text_size`,`bottom_text_color`,`bottom_text_pos_x`,`bottom_text_pos_y`,`bottom_text_width`,`bottom_text_height`,`terms_condition_font`,`terms_condition_size`,`terms_condition_color`,`terms_condition_width`,`terms_condition_pos_x`,`terms_condition_pos_y`,`terms_condition_height`,`logo_pos_x`,`logo_pos_y`) VALUES (3,0,'style_1','landing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DroidSans.ttf',50,'#FFFFFF',235,290,110,120,'DroidSans.ttf',30,'#FFFFFF',325,247,250,100,'#000',166,487,336,195,'#FFFFFF',295,295,210,320,'DroidSans.ttf',10,'#000',NULL,380,NULL,100,'DroidSans.ttf',9,'#000',NULL,NULL,460,100,285,80);
INSERT INTO `network_promo_image_settings` (`network_promo_image_settings`,`promotion`,`style`,`pages`,`header_font`,`header_size`,`header_color`,`header_pos_x`,`header_pos_y`,`header_width`,`header_height`,`prize_font`,`prize_size`,`prize_color`,`prize_pos_x`,`prize_pos_y`,`prize_width`,`prize_height`,`prize_desc_font`,`prize_desc_size`,`prize_desc_color`,`prize_desc_pos_x`,`prize_desc_pos_y`,`prize_desc_width`,`prize_desc_height`,`box_color`,`box_pos_x1`,`box_pos_x2`,`box_pos_y1`,`box_pos_y2`,`thin_line_color`,`thin_line_pos_x1`,`thin_line_pos_x2`,`thin_line_pos_y1`,`thin_line_pos_y2`,`bottom_text_font`,`bottom_text_size`,`bottom_text_color`,`bottom_text_pos_x`,`bottom_text_pos_y`,`bottom_text_width`,`bottom_text_height`,`terms_condition_font`,`terms_condition_size`,`terms_condition_color`,`terms_condition_width`,`terms_condition_pos_x`,`terms_condition_pos_y`,`terms_condition_height`,`logo_pos_x`,`logo_pos_y`) VALUES (4,0,'style_2','large','DroidSans.ttf',12,'#000',200,50,380,100,'DroidSans.ttf',50,'#FFFFFF',110,195,110,120,'DroidSans.ttf',30,'#FFFFFF',200,157,250,120,'#000',43,362,249,109,'#FFFFFF',170,170,130,230,'DroidSans.ttf',10,'#000',200,300,360,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,465,120);
INSERT INTO `network_promo_image_settings` (`network_promo_image_settings`,`promotion`,`style`,`pages`,`header_font`,`header_size`,`header_color`,`header_pos_x`,`header_pos_y`,`header_width`,`header_height`,`prize_font`,`prize_size`,`prize_color`,`prize_pos_x`,`prize_pos_y`,`prize_width`,`prize_height`,`prize_desc_font`,`prize_desc_size`,`prize_desc_color`,`prize_desc_pos_x`,`prize_desc_pos_y`,`prize_desc_width`,`prize_desc_height`,`box_color`,`box_pos_x1`,`box_pos_x2`,`box_pos_y1`,`box_pos_y2`,`thin_line_color`,`thin_line_pos_x1`,`thin_line_pos_x2`,`thin_line_pos_y1`,`thin_line_pos_y2`,`bottom_text_font`,`bottom_text_size`,`bottom_text_color`,`bottom_text_pos_x`,`bottom_text_pos_y`,`bottom_text_width`,`bottom_text_height`,`terms_condition_font`,`terms_condition_size`,`terms_condition_color`,`terms_condition_width`,`terms_condition_pos_x`,`terms_condition_pos_y`,`terms_condition_height`,`logo_pos_x`,`logo_pos_y`) VALUES (5,0,'style_2','small','DroidSans.ttf',12,'#000',200,50,380,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'DroidSans.ttf',18,'#000',200,100,360,100,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,465,15);
INSERT INTO `network_promo_image_settings` (`network_promo_image_settings`,`promotion`,`style`,`pages`,`header_font`,`header_size`,`header_color`,`header_pos_x`,`header_pos_y`,`header_width`,`header_height`,`prize_font`,`prize_size`,`prize_color`,`prize_pos_x`,`prize_pos_y`,`prize_width`,`prize_height`,`prize_desc_font`,`prize_desc_size`,`prize_desc_color`,`prize_desc_pos_x`,`prize_desc_pos_y`,`prize_desc_width`,`prize_desc_height`,`box_color`,`box_pos_x1`,`box_pos_x2`,`box_pos_y1`,`box_pos_y2`,`thin_line_color`,`thin_line_pos_x1`,`thin_line_pos_x2`,`thin_line_pos_y1`,`thin_line_pos_y2`,`bottom_text_font`,`bottom_text_size`,`bottom_text_color`,`bottom_text_pos_x`,`bottom_text_pos_y`,`bottom_text_width`,`bottom_text_height`,`terms_condition_font`,`terms_condition_size`,`terms_condition_color`,`terms_condition_width`,`terms_condition_pos_x`,`terms_condition_pos_y`,`terms_condition_height`,`logo_pos_x`,`logo_pos_y`) VALUES (6,0,'style_2','landing','DroidSans.ttf',12,'#000',NULL,40,600,100,'DroidSans.ttf',50,'#FFFFFF',235,285,110,120,'DroidSans.ttf',30,'#FFFFFF',325,247,250,100,'#000',166,487,336,195,'#FFFFFF',295,295,210,320,'DroidSans.ttf',10,'#000',NULL,380,NULL,100,'DroidSans.ttf',9,'#000',NULL,NULL,460,100,285,80);
#RC 03.10.2015	M2621: Promo Images

CREATE TABLE `sevence`.`promo_coupon` (
  `promo_coupon` INT(11) NOT NULL AUTO_INCREMENT,
  `org` INT(11) NULL,
  `org_client` INT(11) NULL,
  `promotion` INT(11) NULL,
  `coupon_date` DATETIME NULL,
  `expiration_date` DATETIME NULL,
  `redeemed_date` DATETIME NULL,
  `secure_id` CHAR(16) NULL,
  PRIMARY KEY (`promo_coupon`),
  INDEX `pc_org_idx_idx` (`org` ASC),
  INDEX `pc_org_client_idx` (`org_client` ASC),
  INDEX `pc_promotion_idx_idx` (`promotion` ASC),
  CONSTRAINT `pc_org_idx`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `pc_org_client_idx`
    FOREIGN KEY (`org_client`)
    REFERENCES `sevence`.`org_client` (`org_client`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `pc_promotion_idx`
    FOREIGN KEY (`promotion`)
    REFERENCES `sevence`.`promotion` (`promotion`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#DCS 03.11.2015	0002644: promo_coupon

CREATE TABLE `sevence`.`promo_email_queue` (
  `promo_email_queue` INT(11) NOT NULL AUTO_INCREMENT,
  `priority` TINYINT(4) NULL,
  `entered_date` DATETIME NULL,
  `attempts` INT(11) NULL,
  `next_attempt` DATETIME NULL,
  `email_promo` INT(11) NULL,
  `email_subject` VARCHAR(255) NULL,
  `email_from` VARCHAR(255) NULL,
  `email_reply_to` VARCHAR(255) NULL,
  `email_return_path` VARCHAR(255) NULL,
  `email_list_unsubscribe` VARCHAR(100) NULL,
  `email_recipient` TEXT NULL,
  `body_html` TEXT NULL,
  `org_client` INT(11) NULL,
  `org` INT(11) NULL,
  PRIMARY KEY (`promo_email_queue`),
  INDEX `eq_ email_promo_idx_idx` (`email_promo` ASC),
  INDEX `eq_ org_client_idx_idx` (`org_client` ASC),
  INDEX `eq_org_idx_idx` (`org` ASC),
  CONSTRAINT `eq_ email_promo_idx`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `eq_ org_client_idx`
    FOREIGN KEY (`org_client`)
    REFERENCES `sevence`.`org_client` (`org_client`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `eq_org_idx`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promo_email_info` (
  `promo_email_info` INT(11) NOT NULL AUTO_INCREMENT,
  `org_client` INT(11) NULL,
  `org` INT(11) NULL,
  `email_promo` INT(11) NULL,
  `queued` DATETIME NULL,
  `sent` DATETIME NULL,
  `message_id` VARCHAR(100) NULL,
  `bounced` DATETIME NULL,
  `unsubbed` DATETIME NULL,
  PRIMARY KEY (`promo_email_info`),
  INDEX `ei_ org_client_idx_idx` (`org_client` ASC),
  INDEX `ei_ org_idx_idx` (`org` ASC),
  INDEX `ei_ email_promo_idx_idx` (`email_promo` ASC),
  CONSTRAINT `ei_ org_client_idx`
    FOREIGN KEY (`org_client`)
    REFERENCES `sevence`.`org_client` (`org_client`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `ei_ org_idx`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `ei_ email_promo_idx`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#KA 11.18.2014 M2212: Sample Photo Library

CREATE TABLE `dp_colors` (
  `dp_colors` int(11) NOT NULL AUTO_INCREMENT,
  `business_org` int(11) DEFAULT NULL,
  `analogous_1_1` varchar(100) DEFAULT NULL,
  `analogous_1_2` varchar(100) DEFAULT NULL,
  `analogous_1_3` varchar(100) DEFAULT NULL,
  `analogous_1_4` varchar(100) DEFAULT NULL,
  `analogous_1_5` varchar(100) DEFAULT NULL,
  `analogous_2_1` varchar(100) DEFAULT NULL,
  `analogous_2_2` varchar(100) DEFAULT NULL,
  `analogous_2_3` varchar(100) DEFAULT NULL,
  `analogous_2_4` varchar(100) DEFAULT NULL,
  `analogous_2_5` varchar(100) DEFAULT NULL,
  `compliment_1_1` varchar(100) DEFAULT NULL,
  `compliment_1_2` varchar(100) DEFAULT NULL,
  `compliment_1_3` varchar(100) DEFAULT NULL,
  `compliment_1_4` varchar(100) DEFAULT NULL,
  `compliment_1_5` varchar(100) DEFAULT NULL,
  `compliment_2_1` varchar(100) DEFAULT NULL,
  `compliment_2_2` varchar(100) DEFAULT NULL,
  `compliment_2_3` varchar(100) DEFAULT NULL,
  `compliment_2_4` varchar(100) DEFAULT NULL,
  `compliment_2_5` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`dp_colors`),
  KEY `business_org_idx14_idx` (`business_org`),
  KEY `business_org_idx17_idx` (`business_org`),
  CONSTRAINT `business_org_idx17` FOREIGN KEY (`business_org`) REFERENCES `business_org` (`business`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
#MT 11.18.14 Mantis 0002209: Design Package DB, UI and API for Colors

ALTER TABLE promo_card_print ADD manual_file tinyint(1);
#SLOW promo card printing

ALTER TABLE `sevence`.`promo_card_print` ADD COLUMN `shipping_method` VARCHAR(50) NOT NULL DEFAULT 'FDXG'  AFTER `manual_file` ;
#RC 11.19.14 M2219: ADD field to the table 'promo_card_print'

INSERT INTO `sevence`.`todo_type` (`todo_type`, `name`) VALUES ('referral', 'Qualified Referral');
#SLOW 11.18.14 pipeline reporting stuff

CREATE TABLE `sevence`.`dp_photos` (
  `dp_photos` INT(11) NOT NULL AUTO_INCREMENT,
  `business_org` INT(11) NULL,
  `sample_photo` INT(11) NULL,
  PRIMARY KEY (`dp_photos`),
  INDEX `sample_photo_idx` (`sample_photo` ASC),
  CONSTRAINT `fk_sample_photo_4`
    FOREIGN KEY (`sample_photo`)
    REFERENCES `sevence`.`sample_photo` (`sample_photo`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT);
#DCS 11.20.14 Mantis 2210: Design Package DB, UI and API for Images

ALTER TABLE `sevence`.`dp_design` ADD COLUMN `provide_photos` TEXT NULL AFTER `body_font` ;
#DCS 11.20.14 Mantis 2210: Design Package DB, UI and API for Images (additional column if business is supplying the photographs)
#11.20.14 UPDATE END

CREATE TABLE `sevence`.`promo_email_promo_info` (
  `promo_email_promo_info` INT(11) NOT NULL AUTO_INCREMENT,
  `promo_email_info` INT(11) NULL,
  `promotion` INT(11) NULL,
  `clicked` DATETIME NULL,
  PRIMARY KEY (`promo_email_promo_info`),
  INDEX `promo_email_info_idx_idx` (`promo_email_info` ASC),
  INDEX `promotion_idx` (`promotion` ASC),
  CONSTRAINT `promo_email_info_idx`
    FOREIGN KEY (`promo_email_info`)
    REFERENCES `sevence`.`promo_email_info` (`promo_email_info`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `promotion`
    FOREIGN KEY (`promotion`)
    REFERENCES `sevence`.`promotion` (`promotion`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#DCS 03.11.2015	0002642: Database structures for sending and tracking promo emails

ALTER TABLE `sevence`.`promo_email_info` 
ADD COLUMN `opened` DATETIME NULL AFTER `sent`;
#DCS 03.12.2015	0002642: additional column on promo_email_info

ALTER TABLE `sevence`.`promotion` 
DROP COLUMN `desired_start`;
#MT 03.12.2015	0002625: Changes to promotion table and email_promo calls.

INSERT INTO `sevence`.`promo_email_layout` (`name`, `layout_image text`) VALUES ('Network', 'http://assets-boomtime.s3.amazonaws.com/email_layout_images/Network.jpg');
INSERT INTO `sevence`.`promo_email_layout` (`name`, `layout_image text`) VALUES ('Layer Cake', 'http://assets-boomtime.s3.amazonaws.com/email_layout_images/LayerCake.jpg');
INSERT INTO `sevence`.`promo_email_layout` (`name`, `layout_image text`) VALUES ('Layer Cake Columns', 'http://assets-boomtime.s3.amazonaws.com/email_layout_images/LayerCakeColumns.jpg');
INSERT INTO `sevence`.`promo_email_layout` (`name`, `layout_image text`) VALUES ('Columns', 'http://assets-boomtime.s3.amazonaws.com/email_layout_images/Columns.jpg');
INSERT INTO `sevence`.`promo_email_layout` (`name`, `layout_image text`) VALUES ('Broken Grid', 'http://assets-boomtime.s3.amazonaws.com/email_layout_images/BrokenGrid.jpg');
INSERT INTO `sevence`.`promo_email_layout` (`name`, `layout_image text`) VALUES ('Broken Grid Columns', 'http://assets-boomtime.s3.amazonaws.com/email_layout_images/BrokenGridColumns.jpg');
#SLOW 02.25.15 dat for promo_email_layout

ALTER TABLE `sevence`.`book` 
ADD COLUMN `adding_prof` INT(11) NULL DEFAULT NULL;
#KA 02.19.2015	M2568: Track the adding prof on the booking

ALTER TABLE `sevence`.`org` 
ADD COLUMN `bt_reach` TINYINT(1) NULL DEFAULT 0 AFTER `security_pin`;
#DCS 02.27.2015 0002601: Need to know if an org is using "Reach"

ALTER TABLE `sevence`.`org_client` 
ADD COLUMN `business_owner` TINYINT NULL AFTER `last_visit`;
#MT 02.27.2015 0002600: Changes to import addresses

ALTER TABLE `bim_production`.`business` 
ADD COLUMN `reach_billing_signup` INT(11) NULL AFTER `Advisor_billing_signup`,
ADD COLUMN `reach_status` TINYINT(4) NOT NULL DEFAULT 0 AFTER `BSC_status`;
#KA 03.10.2015 M2629: bt_reach app

ALTER TABLE `bim_production`.`app_version` 
ADD COLUMN `reach` VARCHAR(255) NULL AFTER `ba_change_date`,
ADD COLUMN `reach_change_date` VARCHAR(255) NULL AFTER `reach`;
#KA 03.10.2015 M2637: API changes for mulit app support

#Copied the email designs for "A little help from my friends" and "Give or Take" from testing to production.
#Copied the ID emails for little_help and give_or_take from testing to default orgs on production.

INSERT INTO `sevence`.`email_marketing` (`email_marketing`, `type`, `id`, `org`, `active`, `name`, `subject`, `headline`, `narrative`, `body`, `email_cycle`, `queued_on`, `hide`, `show_event`, `show_article`, `email_design`, `client_or_org`, `client_type`, `marketing_list`, `marketing_list_opt`, `org_type`, `org_restrict`, `editor`, `photo`, `photo_filename`, `offer`, `event`, `campaign_type`, `push_type`, `edit_date`, `edit_prof`, `permalink`, `show_reward`, `email_trigger`) VALUES (NULL, '1', 'gc_notify', '3', '1', 'GC Notification', 'GC Notification', ' ', '', '<p style="text-align: left;">We thought you would like to know that {gc_To} picked up the gift certificate you sent.</p>', '1', '2014-05-28 06:31:16', '0', '0', '0', '4', '0', '0', '0', '0', 'ALL', 'NONE', '1', '0', '', '0', '0', '0', '0', '2014-10-17 05:39:45', '12337', 'gc-notify', '0', 'RR');
#RC 10.29.14 Mantis 0002161 : INSERT new email_marketing for email with an id "gc_notify"
#3.16.15 UPDATE END

#3.23.15 UPDATE BEGIN
CREATE TABLE `sevence`.`bt_referral_emails` (
  `bt_referral_emails` INT(11) NOT NULL AUTO_INCREMENT,
  `business_org` INT(11) NULL,
  `referral_name` VARCHAR(100) NULL,
  `referral_company_name` VARCHAR(100) NULL,
  `referral_phone` VARCHAR(30) NULL,
  `referral_email` VARCHAR(50) NULL,
  PRIMARY KEY (`bt_referral_emails`),
  INDEX `rf_business_org_idx_idx` (`business_org` ASC),
  CONSTRAINT `rf_business_org_idx`
    FOREIGN KEY (`business_org`)
    REFERENCES `sevence`.`business_org` (`business`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#DCS 03.11.2015	0002628: API and DB structure for collecting referral emails

ALTER TABLE `sevence`.`promo_offer` 
ADD COLUMN `sale_price` DECIMAL(11,2) NULL AFTER `offer_terms`;
#DCS 03.13.2015 0002650: changes to promo_offer table and API

CREATE TABLE `email_promo_marketing_list` (
  `email_promo_marketing_list` int(11) NOT NULL AUTO_INCREMENT,
  `email_promo` int(11) DEFAULT NULL,
  `marketing_list` int(11) DEFAULT NULL,
  PRIMARY KEY (`email_promo_marketing_list`),
  KEY `fk_email_promo_idx` (`email_promo`),
  CONSTRAINT `fk_email_promo` FOREIGN KEY (`email_promo`) REFERENCES `email_promo` (`email_promo`) ON DELETE NO ACTION ON UPDATE NO ACTION
);

ALTER TABLE `sevence`.`email_promo` 
ADD COLUMN `bt_network` INT NULL AFTER `status`,
ADD INDEX `fk_bt_network_idx` (`bt_network` ASC);
ALTER TABLE `sevence`.`email_promo` 
ADD CONSTRAINT `fk_bt_network`
  FOREIGN KEY (`bt_network`)
  REFERENCES `sevence`.`bt_network` (`bt_network`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.17.2015 0002654: Add to email promo

ALTER TABLE `sevence`.`promotion` 
CHANGE COLUMN `copy_text` `call_to_action` TEXT NULL DEFAULT NULL ,
CHANGE COLUMN `call_to_action` `promotion_name` VARCHAR(100) NULL DEFAULT NULL ,
ADD COLUMN `headline` VARCHAR(150) NULL AFTER `print_coupon` ,
ADD COLUMN `expanded_copy` TEXT NULL AFTER `headline`;
#MT 03.18.2015 0002662: Changes to promotion and promotion images

ALTER TABLE `sevence`.`promo_offer` 
DROP COLUMN `offer_terms`;

ALTER TABLE `sevence`.`promotion`
ADD COLUMN `promo_terms` TEXT NULL AFTER `promo_style`;
#DCS 03.18.2015 0002661: Terms for promotions

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `expiration_date` DATE NULL AFTER `end_date`;
#MT 03.18.2015 0002656: Promotion details

ALTER TABLE `sevence`.`promo_package` 
DROP COLUMN `package_terms`;
ALTER TABLE `sevence`.`promo_event` 
DROP COLUMN `event_terms`;
#MT 03.18.2015 0002661: Terms for promotions

#MT 03.17.2015 0002654: Add to email promo
ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `business_org` INT NULL AFTER `promotion`,
ADD INDEX `promotion_business_org_idx` (`business_org` ASC);
ALTER TABLE `sevence`.`promotion` 
ADD CONSTRAINT `promotion_business_org`
  FOREIGN KEY (`business_org`)
  REFERENCES `sevence`.`business_org` (`business`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#MT 03.19.2015 0002669: More changes to promotions

ALTER TABLE `sevence`.`promo_package` 
ADD COLUMN `package_name` VARCHAR(200) NULL AFTER `promotion`;
#MT 03.19.2015 0002669: More changes to promotions

ALTER TABLE `sevence`.`promo_email_promo_info` 
ADD COLUMN `main` TINYINT(4) NULL DEFAULT 0 AFTER `clicked`;
#KA 03.20.2015 M2682: change to promo_email_promo_info table

ALTER TABLE `sevence`.`dp_design` 
ADD COLUMN `headline_font_2` INT(11) NULL AFTER `body_font`,
ADD COLUMN `body_font_2` INT(11) NULL AFTER `headline_font_2`,
ADD COLUMN `headline_font_3` INT(11) NULL AFTER `body_font_2`,
ADD COLUMN `body_font_3` INT(11) NULL AFTER `headline_font_3`,
ADD INDEX `fk1_body_font_3_idx` (`body_font_3` ASC),
ADD INDEX `fk1_body_font_2_idx` (`body_font_2` ASC),
ADD INDEX `fk1_headline_font_2_idx` (`headline_font_2` ASC),
ADD INDEX `fk1_headline_font_3_idx` (`headline_font_3` ASC);
ALTER TABLE `sevence`.`dp_design` 
ADD CONSTRAINT `fk1_headline_font_2`
  FOREIGN KEY (`headline_font_2`)
  REFERENCES `sevence`.`header_font` (`header_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk1_headline_font_3`
  FOREIGN KEY (`headline_font_3`)
  REFERENCES `sevence`.`header_font` (`header_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk1_body_font_2`
  FOREIGN KEY (`body_font_2`)
  REFERENCES `sevence`.`body_font` (`body_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk1_body_font_3`
  FOREIGN KEY (`body_font_3`)
  REFERENCES `sevence`.`body_font` (`body_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#KA 03.20.2015 M2679: changes to dp_design

ALTER TABLE `sevence`.`email_promo`
ADD COLUMN `email_promocol` VARCHAR(45) NULL AFTER `bt_network`,
ADD COLUMN `opening_text` TEXT NULL AFTER `email_promocol`,
ADD COLUMN `network_introduction_text` TEXT NULL AFTER `opening_text`;
#DCS 03.20.2015 0002681: Change to email_promo in fuse (add opening text and network introduction text)

CREATE  TABLE `sevence`.`working_ep_org_client` (
  `working_ep_org_client` INT(11) NOT NULL AUTO_INCREMENT ,
  `org_client` INT(11) NULL ,
  `org` INT(11) NULL ,
  `org_opt_in_date` DATETIME NULL ,
  `email_address` VARCHAR(50) NULL ,
  `client_type` VARCHAR(45) NULL ,
  `network` INT(11) NULL ,
  `send date` DATETIME NULL ,
  `group` VARCHAR(100) NULL ,
  PRIMARY KEY (`working_ep_org_client`) );

CREATE  TABLE `sevence`.`working_ep_promo` (
  `working_ep_promo` INT(11) NOT NULL AUTO_INCREMENT ,
  `org_client` INT(11) NULL ,
  `promo` INT(11) NULL ,
  `main` TINYINT NULL ,
  PRIMARY KEY (`working_ep_promo`) );

CREATE  TABLE `sevence`.`working_ep_org` (
  `working_ep_org` INT(11) NOT NULL AUTO_INCREMENT ,
  `org` INT(11) NULL ,
  `email_promo` INT(11) NULL ,
  `network` INT(11) NULL ,
  `email_count` INT(11) NULL ,
  `promo_count` INT(11) NULL ,
  PRIMARY KEY (`working_ep_org`) );
  
  CREATE  TABLE `sevence`.`working_org_promo` (
  `working_org_promo` INT(11) NOT NULL AUTO_INCREMENT ,
  `org` INT(11) NULL ,
  `promo` INT(11) NULL ,
  `client type` VARCHAR(50) NULL ,
  PRIMARY KEY (`working_org_promo`) );
#RC 03.20.2015 M2683: Preparing network emails

ALTER TABLE `sevence`.`working_ep_org_client` CHANGE COLUMN `send date` `send_date` DATETIME NULL DEFAULT NULL  ;
#RC 03.20.2015 M2683: Preparing network emails
#3.23.15 UPDATE END

#3.24.15 UPDATE BEGIN
ALTER TABLE `sevence`.`email_promo` DROP COLUMN `email_promocol`;
#DCS 03.24.2015 Remove field

ALTER TABLE `sevence`.`bt_referral_emails` ADD COLUMN `emailed` DATETIME NULL  AFTER `referral_email` ;
#RC 03.24.2015 M2691: Send emails to the referrals
#3.24.15 UPDATE END


#3.25.15 UPDATE BEGIN
INSERT INTO `gift_screen` (`gift_screen`,`id`,`html`,`css`) VALUES (61,'give_or_take_main','<!doctype html> <html lang=\"en\">  <head>     <title>Give Or Take</title>     <meta charset=\"utf-8\">     <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">     <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->     <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>     <!-- The next three scripts are for the Slot Machine -->     <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>     <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>     <script src=\"boomtag{path}/script/slot.js\"></script>     <!-- Star review script -->     <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>     <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">     <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>     <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'> boomtag{action_back}     <style type=\"text/css\">         boomtag{main_css}     </style>     <script type=\"text/javascript\">         $(function() {             $(\'#jackpot\').hide();             $(\"#email-submit\").attr(\'disabled\', false);             $(\"#email_add\").attr(\'disabled\', false);             var date_played = new Date();              function validateEmail($email) {                 var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;                 if (!emailReg.test($email)) {                     return false;                 } else {                     return true;                 }             }             $(\"#email-submit\").click(function() {                 $(\"#err_msg\").html(\'\');                 $(\'#jackpot\').fadeOut(\'fast\');                 $(\'.slot-wrapper\').fadeTo(\"fast\", 1);                 var date_play = (date_played.getFullYear() + \'-\' + (date_played.getMonth() + 1) + \'-\' + date_played.getDate() + \' \' + date_played.getHours() + \':\' + date_played.getMinutes() + \':\' + date_played.getSeconds());                 if (!$(\"#email_add\").val()) {                     $(\"#err_msg\").html(\"* Please enter your email address.\");                     return false;                 } else if (!validateEmail($(\"#email_add\").val())) {                     $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");                     return false;                 } else {                     $(\"#email-submit\").attr(\'disabled\', true);                     $(\"#email_add\").attr(\'disabled\', true);                     var start_time = new Date().getTime();                     $.ajax({                         url: \'/slot-machine\',                         type: \"POST\",                         dataType: \"json\",                         data: {                             id: \'submit\',                             email: $(\'#email_add\').val(),                             date_play: date_play                         },                         success: function(data) {                             var success = true;                             if (data[0] == \"success\") {                                 window.location.replace(\'/slot-machine?1=\' + data[1] + \'&dw=\' + data[2]);                             } else {                                 $(\'#won_msg\').text(\'Sorry, only one spin per email address.\');                                 $(\'#jackpot\').show();                             }                         }                     });                 }             });         });     </script> </head>  <body>     <div class=\"container\">         <div class=\"promo-wrap\">             <div class=\"row promo-message-p1\">                 <div class=\"col-xs-12\">                     <h1>Win $1, $5 or $10 for a charity</h1>                 </div>             </div>         </div>     </div>     <div class=\"container\">         <div class=\"promo-wrap\">             <div class=\"row promo-message-form-p1\">                 <div class=\"col-xs-12\">                     <h1>Enter your email to play the charity game</h1></div>             </div>             <div class=\"row promo-border-lg\"></div>             <div class=\"row promo-form\"> <span style=\"color:red;font-size:20px\" id=\"err_msg\"></span>                 <input type=\"text\" id=\'email_add\'>                 <input type=\"submit\" value=\"submit\" id=\"email-submit\">                 <div id=\"jackpot\">                     <div>                         <h1 id=\"won_msg\"></h1>                         <p id=\"offer\"></p>                         <p id=\"email_info\"></p>                     </div>                 </div>             </div>         </div>     </div>     <div class=\"footer\">         <div class=\"inner\">             <p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>         </div>     </div>     </div>     <!-- #container -->     </div>     <!-- #wrapper --> </body>  </html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
INSERT INTO `gift_screen` (`gift_screen`,`id`,`html`,`css`) VALUES (62,'give_or_take_won','<!doctype html>\n<html lang=\"en\">\n\n<head>\n    <title>Give Or Take</title>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n    <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n    <!-- The next three scripts are for the Slot Machine -->\n    <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n    <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n    <script src=\"boomtag{path}/script/slot.js\"></script>\n    <!-- Star review script -->\n    <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n    <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n    <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n    <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'> boomtag{action_back}\n    <style type=\"text/css\">\n        boomtag{main_css}\n    </style>\n    <script type=\"text/javascript\">\n        $(function() {\n            $(\'#jackpot\').hide();\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n            var date_played = new Date();\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                var date_play = (date_played.getFullYear() + \'-\' + (date_played.getMonth() + 1) + \'-\' + date_played.getDate() + \' \' + date_played.getHours() + \':\' + date_played.getMinutes() + \':\' + date_played.getSeconds());\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                            date_play: date_play\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\'/slot-machine?1=\' + data[1] + \'&dw=\' + data[2]);\n                            } else {\n                                $(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n                                $(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n    </script>\n</head>\n\n<body>\n    <div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message-p3\">\n                <div class=\"col-xs-12\">\n                    <h1>you won!<br/> <span class=\"price\">$boomtag{prize_won}</span></h1></div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-msg-low\">\n                <h1 style=\'text-align: center; font-size:57px;text-transform: uppercase;\'>Select a charity below.</h1>\n            	<div class=\"row promo-orgname\"> boomtag{charities} </div>\n            </div>\n        </div>\n    </div>\n    <div class=\"footer\">\n        <div class=\"inner\">\n            <p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n        </div>\n    </div>\n    </div>\n    <!-- #container -->\n    </div>\n    <!-- #wrapper -->\n</body>\n\n</html>','body{     background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');     font-family: \'Open Sans\', sans-serif; }  @media(max-width:767px){  .anchor_left {\n  width: 98% !important;\n}	.promo-msg-low h1 {font-size:30px !important;} 	.promo-message-form-p1 h2 { 	  font-size: 24px !important; 	  letter-spacing: 0 !important; 	} 	 	.promo-message-form-p1 h1 { 	  font-size: 32px !important; 	  letter-spacing: 0 !important; 	} 	.promo-form input[type=\"submit\"] { 	  width: 100% !important; 	  text-align:center !important; 	  padding: 10px !important; 	} 	 	.footer .inner img{ 		width:30% !important; 	} 	 	.promo-border-lg { 	  margin: 0 !important; 	  width: 100% !important; 	} 	.promo-message-p1 h1 { 	  font-size: 36px !important; 	} 	 	.promo-message-p1 p { 	  font-size: 26px !important; 	}  	.promo-message-p3 h1 { 	  font-size: 74px !important; 	  letter-spacing: 0 !important; 	  line-height: 74px !important; 	} 	 	.black-box { 	  font-size: 36px !important; 	  height: 232px !important; 	} 	 	.promo-message h1 { 	  font-size: 52px !important; 	  line-height: normal !important; 	} 	 	.promo-validity h2 { 	  font-size: 28px !important; 	} 	 	.promo-intro { 	  font-size: 15px !important; 	  letter-spacing: 11px !important; 	} 	 	.promo-header-msg h2 { 	  font-size: 20px !important; 	  letter-spacing: 1px !important; 	} 	 	.promo-orgname h2 { 	  font-size: 27px !important; 	  letter-spacing: 5px !important; 	} 	 	.promo-message h1 { 	  letter-spacing: 9px !important; 	} } @media(min-width:768px){ 		 } @media(min-width:992px){} @media(min-width:1200px){}  .promo-message-p1 h1{     font-size: 65px;     text-transform: uppercase;     color: #7b7b7b;     text-align: center; }  .promo-message-p1 p{     color: #898989;     text-transform: uppercase;     text-align: center;     font-size: 55px;     font-weight: 300;     margin: 0;     line-height: normal; }  .promo-form input[type=\"text\"]{     border: 1px solid #010101;     box-shadow: 0 0 5px #b3b3b3 inset;     display: block;     padding: 3% 2%;     width: 100%; }  .promo-form input[type=\"submit\"]{     background: #444444; /* Old browsers */     background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */     background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */     background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */     background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */     background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */     background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */     border: medium none;     color: #fff;     display: inline-block;     font-family: \"Open Sans Condensed\",sans-serif;     font-size: 45px;     font-weight: 300;     margin-top: 15px;     padding: 10px 120px;     text-transform: uppercase; }  .promo-form{     margin-top: 3%;     text-align: center; }  .promo-message-form-p1 h1{     color: #505050;     font-size: 65px;     text-transform: uppercase;     text-align: center; }  .promo-wrap{     padding: 5%; }  .container{     background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');     border: 1px solid #9a9a9a;     box-shadow: 0 0 10px #777777;     margin-bottom: 5%;     margin-top: 5%; }  .promo-message{     text-align: center; }  .promo-message h1{     color: #505050;     font-size: 150px;     letter-spacing: 15px;     line-height: normal; }  .promo-border-lg{     height:20px;     width: 100%;     background: url(\'boomtag{path}/img/give_take_images/border-lg.png\') }  .promo-msg-low h2{     font-size: 32px;     color: #4f4f4f;     letter-spacing: 10px;     text-align: center;     text-transform: uppercase; }  .promo-msg-low{     padding: 2% 0; }  .promo-validity{     color: #898989; }  .promo-validity h2{     font-size: 45px;     font-weight: 300;     letter-spacing: 10px;     margin-top: 0;     text-align: center;     text-transform: uppercase; }    /* Page 2 */    .promo-message-p3 .price{     color: #898989; }  .promo-message-p3 h1{     color: #505050;     font-size: 130px;     letter-spacing: 5px;     line-height: normal;      text-align: center;     text-transform: uppercase; }  .black-box{     background: #454545; /* Old browsers */     background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */     background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */     background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */     background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */     background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */     background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */     color: #fff;     display: table-cell;     font-family: \"Open Sans Condensed\",sans-serif;     font-size: 55px;     height: 320px;     margin: 0 2%;     padding: 36px 0;     text-align: center;     text-transform: uppercase;     width: 46.5%; }  .black-box:first-child{     margin-left: 0; }  .black-box:last-child{     margin-right: 0; }   /* Page 3 */  .promo-intro{     color: #505050;     font-size: 32px;     text-align: center;     font-weight: 800;     letter-spacing: 15px; }  .promo-message{     text-align: center; }  .promo-header-msg h2{     font-size: 32px;     color: #898989;     letter-spacing: 10px;     text-align: center;     font-weight: 300;     text-transform: uppercase; }  .promo-msg-low h2{     font-size: 32px;     color: #4f4f4f;     letter-spacing: 10px;     text-align: center;     text-transform: uppercase; }  .promo-msg-low{     padding: 2% 0; }  .promo-orgname{     color: #898989;     margin-top: 5%; }  .promo-orgname h2{     font-size: 45px;     font-weight: 300;     letter-spacing: 10px;     margin-top: 0;     text-align: center;     text-transform: uppercase; } .anchor_left{ 	float: left; 	margin-right: 2%; 	width: 48%; }  .anchor_left .left{ 	width:100%; }  #jackpot {     background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);     color: red;     float: left;     font-weight: 400;     font-size:12px;     margin: 0 auto;     min-height: 155px;     padding: .5em 2em 0;     position: absolute;     text-align: center;     vertical-align: middle;     width: 100%;     z-index: 10;     top:-55px; }  .promo-form{ 	position:relative; }');
INSERT INTO `gift_screen` (`gift_screen`,`id`,`html`,`css`) VALUES (63,'give_or_take_take','<!doctype html>\n\n<html lang=\"en\">\n<head>\n  <title>Give Or Take</title>\n  <meta charset=\"utf-8\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->\n  <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>\n  <!-- The next three scripts are for the Slot Machine -->\n <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>\n  <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>\n  <script src=\"boomtag{path}/script/slot.js\"></script>\n  <!-- Star review script -->\n  <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>\n  <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>\n  <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'>\n  boomtag{action_back}\n<style type=\"text/css\">\nboomtag{main_css}\n</style>\n   <script type=\"text/javascript\">\n        $(function() {\n        	$(\'#jackpot\').hide();\n            $(\"#email-submit\").attr(\'disabled\', false);\n            $(\"#email_add\").attr(\'disabled\', false);\n            var date_played = new Date();\n\n            function validateEmail($email) {\n                var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;\n                if (!emailReg.test($email)) {\n                    return false;\n                } else {\n                    return true;\n                }\n            }\n            $(\"#email-submit\").click(function() {\n                $(\"#err_msg\").html(\'\');\n                $(\'#jackpot\').fadeOut(\'fast\');\n                $(\'.slot-wrapper\').fadeTo(\"fast\", 1);\n                var date_play = (date_played.getFullYear()+\'-\'+ (date_played.getMonth()+1) +\'-\'+ date_played.getDate()+\' \'+date_played.getHours()+\':\'+date_played.getMinutes()+\':\'+date_played.getSeconds());\n                if (!$(\"#email_add\").val()) {\n                    $(\"#err_msg\").html(\"* Please enter your email address.\");\n                    return false;\n                } else if (!validateEmail($(\"#email_add\").val())) {\n                    $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");\n                    return false;\n                } else {\n                    $(\"#email-submit\").attr(\'disabled\', true);\n                    $(\"#email_add\").attr(\'disabled\', true);\n                    var start_time = new Date().getTime();\n                    $.ajax({\n                        url: \'/slot-machine\',\n                        type: \"POST\",\n                        dataType: \"json\",\n                        data: {\n                            id: \'submit\',\n                            email: $(\'#email_add\').val(),\n                          	date_play: date_play\n                        },\n                        success: function(data) {\n                            var success = true;\n                            if (data[0] == \"success\") {\n                                window.location.replace(\'/slot-machine?1=\'+data[1]+\'&dw=\'+data[2]);\n                            }\n                            else\n                            {\n                            	$(\'#won_msg\').text(\'Sorry, only one spin per email address.\');\n								$(\'#jackpot\').show();\n                            }\n                        }\n                    });\n                }\n            });\n        });\n    </script>\n</head>\n<body>\n	<div class=\"container\">\n        <div class=\"promo-wrap\">\n            <div class=\"row promo-message\">\n                <div class=\"col-xs-12\"><h1>TAKE <br/> $boomtag{prize_won} OFF</h1></div>\n            </div>\n            <div class=\"row promo-border-lg\"></div>\n            <div class=\"row promo-msg-low\">\n                <h2>Please show to cashier</h2>\n            </div>\n            <div class=\"row promo-validity\">\n                <h2>good for <br/> boomtag{local_date_display}</h2>\n            </div>\n        </div>\n    </div>\n  	<div class=\"footer\">\n  		<div class=\"inner\">\n  			<p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>\n  		</div>\n  	</div>	\n  </div> <!-- #container -->\n</div> <!-- #wrapper -->\n</body>\n</html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
INSERT INTO `gift_screen` (`gift_screen`,`id`,`html`,`css`) VALUES (64,'give_or_take_give','<!doctype html> <html lang=\"en\">  <head>     <title>Give Or Take</title>     <meta charset=\"utf-8\">     <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">     <!-- We need to load this version of jQuery because it is compatible with the Slot Machine and Star Review scripts -->     <script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js\"></script>     <!-- The next three scripts are for the Slot Machine -->     <script src=\"boomtag{path}/script/jquery.spritely.js\"></script>     <script src=\"boomtag{path}/script/jquery.backgroundPosition.js\"></script>     <script src=\"boomtag{path}/script/slot.js\"></script>     <!-- Star review script -->     <script src=\"boomtag{path}/script/jquery.raty.min.js\"></script>     <link href=\"boomtag{path}/img/give_take_images/bootstrap.min.css\" rel=\"stylesheet\">     <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600\' rel=\'stylesheet\' type=\'text/css\'>     <link href=\'http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600|Open+Sans+Condensed:300\' rel=\'stylesheet\' type=\'text/css\'> boomtag{action_back}     <style type=\"text/css\">         boomtag{main_css}     </style>     <script type=\"text/javascript\">         $(function() {             $(\'#jackpot\').hide();             $(\"#email-submit\").attr(\'disabled\', false);             $(\"#email_add\").attr(\'disabled\', false);             var date_played = new Date();              function validateEmail($email) {                 var emailReg = /^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/;                 if (!emailReg.test($email)) {                     return false;                 } else {                     return true;                 }             }             $(\"#email-submit\").click(function() {                 $(\"#err_msg\").html(\'\');                 $(\'#jackpot\').fadeOut(\'fast\');                 $(\'.slot-wrapper\').fadeTo(\"fast\", 1);                 var date_play = (date_played.getFullYear() + \'-\' + (date_played.getMonth() + 1) + \'-\' + date_played.getDate() + \' \' + date_played.getHours() + \':\' + date_played.getMinutes() + \':\' + date_played.getSeconds());                 if (!$(\"#email_add\").val()) {                     $(\"#err_msg\").html(\"* Please enter your email address.\");                     return false;                 } else if (!validateEmail($(\"#email_add\").val())) {                     $(\"#err_msg\").html(\"* Please enter a valid email address. For example <b><i>johnsmith@gmail.com</i></b>\");                     return false;                 } else {                     $(\"#email-submit\").attr(\'disabled\', true);                     $(\"#email_add\").attr(\'disabled\', true);                     var start_time = new Date().getTime();                     $.ajax({                         url: \'/slot-machine\',                         type: \"POST\",                         dataType: \"json\",                         data: {                             id: \'submit\',                             email: $(\'#email_add\').val(),                             date_play: date_play                         },                         success: function(data) {                             var success = true;                             if (data[0] == \"success\") {                                 window.location.replace(\'/slot-machine?1=\' + data[1] + \'&dw=\' + data[2]);                             } else {                                 $(\'#won_msg\').text(\'Sorry, only one spin per email address.\');                                 $(\'#jackpot\').show();                             }                         }                     });                 }             });         });     </script> </head>  <body>     <div class=\"container\">         <div class=\"promo-wrap\">             <div class=\"row promo-intro\">                 <div class=\"col-xs-12\">                     <h2>THANK YOU!<br/>YOU CHOSE WISELY</h2></div>             </div>              <div class=\"row promo-message\">                 <div class=\"col-xs-12\">                     <h1>GIVE<br/>YOUR<br/>$boomtag{prize_won}</h1></div>             </div>             <div class=\"row promo-border-lg\"></div>             <div class=\"row promo-header-msg\">                 <h2>Your donation will help boomtag{charity_name}</h2> </div>             <div class=\"row promo-border-lg\"></div>         </div>     </div>     <div class=\"footer\">         <div class=\"inner\">             <p style=\"text-align: center;\"><span><img src=\"boomtag{path}/img/give_take_images/boomtime.png\"></span></p>         </div>     </div>     </div>     <!-- #container -->     </div>     <!-- #wrapper --> </body>  </html>','body{\n    background: url(\'boomtag{path}/img/give_take_images/main-bg.png\');\n    font-family: \'Open Sans\', sans-serif;\n}\n\n@media(max-width:767px){\n	\n	.promo-message-form-p1 h2 {\n	  font-size: 24px !important;\n	  letter-spacing: 0 !important;\n	}\n	\n	.promo-message-form-p1 h1 {\n	  font-size: 32px !important;\n	  letter-spacing: 0 !important;\n	}\n	.promo-form input[type=\"submit\"] {\n	  width: 100% !important;\n	  text-align:center !important;\n	  padding: 10px !important;\n	}\n	\n	.footer .inner img{\n		width:30% !important;\n	}\n	\n	.promo-border-lg {\n	  margin: 0 !important;\n	  width: 100% !important;\n	}\n	.promo-message-p1 h1 {\n	  font-size: 36px !important;\n	}\n	\n	.promo-message-p1 p {\n	  font-size: 26px !important;\n	}\n\n	.promo-message-p3 h1 {\n	  font-size: 74px !important;\n	  letter-spacing: 0 !important;\n	  line-height: 74px !important;\n	}\n	\n	.black-box {\n	  font-size: 36px !important;\n	  height: 232px !important;\n	}\n	\n	.promo-message h1 {\n	  font-size: 52px !important;\n	  line-height: normal !important;\n	}\n	\n	.promo-validity h2 {\n	  font-size: 28px !important;\n	}\n	\n	.promo-intro {\n	  font-size: 15px !important;\n	  letter-spacing: 11px !important;\n	}\n	\n	.promo-header-msg h2 {\n	  font-size: 20px !important;\n	  letter-spacing: 1px !important;\n	}\n	\n	.promo-orgname h2 {\n	  font-size: 27px !important;\n	  letter-spacing: 5px !important;\n	}\n	\n	.promo-message h1 {\n	  letter-spacing: 9px !important;\n	}\n}\n@media(min-width:768px){\n		\n}\n@media(min-width:992px){}\n@media(min-width:1200px){}\n\n.promo-message-p1 h1{\n    font-size: 65px;\n    text-transform: uppercase;\n    color: #7b7b7b;\n    text-align: center;\n}\n\n.promo-message-p1 p{\n    color: #898989;\n    text-transform: uppercase;\n    text-align: center;\n    font-size: 55px;\n    font-weight: 300;\n    margin: 0;\n    line-height: normal;\n}\n\n.promo-form input[type=\"text\"]{\n    border: 1px solid #010101;\n    box-shadow: 0 0 5px #b3b3b3 inset;\n    display: block;\n    padding: 3% 2%;\n    width: 100%;\n}\n\n.promo-form input[type=\"submit\"]{\n    background: #444444; /* Old browsers */\n    background: -moz-linear-gradient(left,  #444444 0%, #535353 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#444444), color-stop(100%,#535353)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #444444 0%,#535353 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #444444 0%,#535353 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #444444 0%,#535353 100%); /* IE10+ */\n    background: linear-gradient(to right,  #444444 0%,#535353 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#444444\', endColorstr=\'#535353\',GradientType=1 ); /* IE6-9 */\n    border: medium none;\n    color: #fff;\n    display: inline-block;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 45px;\n    font-weight: 300;\n    margin-top: 15px;\n    padding: 10px 120px;\n    text-transform: uppercase;\n}\n\n.promo-form{\n    margin-top: 3%;\n    text-align: center;\n}\n\n.promo-message-form-p1 h1{\n    color: #505050;\n    font-size: 65px;\n    text-transform: uppercase;\n    text-align: center;\n}\n\n.promo-wrap{\n    padding: 5%;\n}\n\n.container{\n    background: url(\'boomtag{path}/img/give_take_images/very-light-bg2.png\');\n    border: 1px solid #9a9a9a;\n    box-shadow: 0 0 10px #777777;\n    margin-bottom: 5%;\n    margin-top: 5%;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-message h1{\n    color: #505050;\n    font-size: 150px;\n    letter-spacing: 15px;\n    line-height: normal;\n}\n\n.promo-border-lg{\n    height:20px;\n    width: 100%;\n    background: url(\'boomtag{path}/img/give_take_images/border-lg.png\')\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-validity{\n    color: #898989;\n}\n\n.promo-validity h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n\n\n/*\nPage 2\n*/\n\n\n\n.promo-message-p3 .price{\n    color: #898989;\n}\n\n.promo-message-p3 h1{\n    color: #505050;\n    font-size: 130px;\n    letter-spacing: 5px;\n    line-height: normal; \n    text-align: center;\n    text-transform: uppercase;\n}\n\n.black-box{\n    background: #454545; /* Old browsers */\n    background: -moz-linear-gradient(left,  #454545 0%, #525252 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#454545), color-stop(100%,#525252)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left,  #454545 0%,#525252 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left,  #454545 0%,#525252 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left,  #454545 0%,#525252 100%); /* IE10+ */\n    background: linear-gradient(to right,  #454545 0%,#525252 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'#454545\', endColorstr=\'#525252\',GradientType=1 ); /* IE6-9 */\n    color: #fff;\n    display: table-cell;\n    font-family: \"Open Sans Condensed\",sans-serif;\n    font-size: 55px;\n    height: 320px;\n    margin: 0 2%;\n    padding: 36px 0;\n    text-align: center;\n    text-transform: uppercase;\n    width: 46.5%;\n}\n\n.black-box:first-child{\n    margin-left: 0;\n}\n\n.black-box:last-child{\n    margin-right: 0;\n}\n\n\n/*\nPage 3\n*/\n\n.promo-intro{\n    color: #505050;\n    font-size: 32px;\n    text-align: center;\n    font-weight: 800;\n    letter-spacing: 15px;\n}\n\n.promo-message{\n    text-align: center;\n}\n\n.promo-header-msg h2{\n    font-size: 32px;\n    color: #898989;\n    letter-spacing: 10px;\n    text-align: center;\n    font-weight: 300;\n    text-transform: uppercase;\n}\n\n.promo-msg-low h2{\n    font-size: 32px;\n    color: #4f4f4f;\n    letter-spacing: 10px;\n    text-align: center;\n    text-transform: uppercase;\n}\n\n.promo-msg-low{\n    padding: 2% 0;\n}\n\n.promo-orgname{\n    color: #898989;\n    margin-top: 5%;\n}\n\n.promo-orgname h2{\n    font-size: 45px;\n    font-weight: 300;\n    letter-spacing: 10px;\n    margin-top: 0;\n    text-align: center;\n    text-transform: uppercase;\n}\n.anchor_left{\n	float: left;\n	margin-right: 2%;\n	width: 48%;\n}\n\n.anchor_left .left{\n	width:100%;\n}\n\n#jackpot {\n    background: none repeat scroll 0 0 rgba(255, 255, 255, 0.5);\n    color: red;\n    float: left;\n    font-weight: 400;\n    font-size:12px;\n    margin: 0 auto;\n    min-height: 155px;\n    padding: .5em 2em 0;\n    position: absolute;\n    text-align: center;\n    vertical-align: middle;\n    width: 100%;\n    z-index: 10;\n    top:-55px;\n}\n\n.promo-form{\n	position:relative;\n}');
#RC 03.25.2015 M2698: Changes to the spin and win: Give or Take
#3.25.15 UPDATE END

#3.29.15 UPDATE BEGIN
ALTER TABLE `sevence`.`dp_design` 
ADD COLUMN `headline_font_2` INT(11) NULL AFTER `body_font`,
ADD COLUMN `body_font_2` INT(11) NULL AFTER `headline_font_2`,
ADD COLUMN `headline_font_3` INT(11) NULL AFTER `body_font_2`,
ADD COLUMN `body_font_3` INT(11) NULL AFTER `headline_font_3`,
ADD INDEX `fk1_body_font_3_idx` (`body_font_3` ASC),
ADD INDEX `fk1_body_font_2_idx` (`body_font_2` ASC),
ADD INDEX `fk1_headline_font_2_idx` (`headline_font_2` ASC),
ADD INDEX `fk1_headline_font_3_idx` (`headline_font_3` ASC);
ALTER TABLE `sevence`.`dp_design` 
ADD CONSTRAINT `fk1_headline_font_2`
  FOREIGN KEY (`headline_font_2`)
  REFERENCES `sevence`.`header_font` (`header_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk1_headline_font_3`
  FOREIGN KEY (`headline_font_3`)
  REFERENCES `sevence`.`header_font` (`header_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk1_body_font_2`
  FOREIGN KEY (`body_font_2`)
  REFERENCES `sevence`.`body_font` (`body_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk1_body_font_3`
  FOREIGN KEY (`body_font_3`)
  REFERENCES `sevence`.`body_font` (`body_font`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#KA 03.20.2015 M2679: changes to dp_design

ALTER TABLE `sevence`.`give_or_take_winners` ADD COLUMN `charity` INT(11) NULL  AFTER `paid_date` , 
  ADD CONSTRAINT `charity_fk_1`
  FOREIGN KEY (`charity` )
  REFERENCES `sevence`.`charity` (`charity` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `charity_fk_1_idx` (`charity` ASC) ;
#RC 03.25.2015 M2698: Changes to the spin and win: Give or Take

ALTER TABLE `sevence`.`org` 
ADD COLUMN `wpwebsite` TINYINT(1) NULL DEFAULT 0 AFTER `bt_reach`;
#KA 03.26.2015 M2694: Query on orgs using our new BIM checkboxes
#3.29.15 UPDATE END

#3.30.15 UPDATE BEGIN
ALTER TABLE `sevence`.`working_ep_org_client` 
CHANGE COLUMN `group` `ep_group` VARCHAR(45) NULL DEFAULT NULL ;
ALTER TABLE `sevence`.`working_org_promo` 
CHANGE COLUMN `client type` `client_type` VARCHAR(50) NULL DEFAULT NULL ;
#DCS 03.26.2015 0002683: Preparing network emails

INSERT INTO `email_design` (`email_design`,`default_email_design`,`org`,`name`,`design`,`design_css`,`logo_color`,`photo`,`photo_filename`,`logo_pos`,`logo_padding`,`default_design`,`restricted`,`hide`,`mobile`) VALUES (163,161,3,'A Little Help','<!DOCTYPE html>\r\n <html lang=\"en\">\r\n <head>\r\n   <meta charset=\"utf-8\"> <!-- utf-8 works for most cases -->\r\n 	<meta name=\"viewport\" content=\"width=device-width\"> <!-- Forcing initial-scale shouldn\'t be necessary -->\r\n 	<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"> <!-- Use the latest (edge) version of IE rendering engine -->\r\n   <title>{headline}</title> <!-- the <title> tag shows on email notifications on Android 4.4. -->\r\n <style type=\"text/css\">\r\n {css}\r\n </head>\r\n <body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" bgcolor=\"#f7f7f7\" style=\"margin:0; padding:0; -webkit-text-size-adjust:none; -ms-text-size-adjust:none;\">\r\n <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"100%\" width=\"100%\" id=\"bodyTable\" style=\"border-collapse: collapse;table-layout: fixed;margin:0 auto;\"><tr><td>\r\n \r\n <!-- CSS Image background in Outlook : BEGIN -->\r\n <!-- Best used with absolute image paths -->\r\n <!--[if gte mso 9]>\r\n   <v:background xmlns:v=\"urn:schemas-microsoft-com:vml\" fill=\"t\">\r\n     <v:fill type=\"tile\" color=\"#f4f4f4\" src=\"assets/nice_snow.png\">\r\n   </v:background>\r\n <![endif]-->\r\n <!-- CSS Image background in Outlook : END -->\r\n \r\n   <!-- Logo Left, Nav Right, 100% Nav Bar : BEGIN -->\r\n   <table width=\"100%\" bgcolor=\"#d3d5d8\" background=\"http://spaboomdeftest.boomtimetest.com/e1-bg.png\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"text-align: center;\">\r\n   <tr>\r\n     <td>\r\n         <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n                 <tr>\r\n                     <td height=\"30\" style=\"text-align: center; padding: 10px; font-size: 12px; font-family: \'Georgia\',serif; color: #6e7c88;\" id=\"unsubscribe-lnk\">\r\n                         <p> </p>\r\n                     </td>\r\n                 </tr>\r\n         </table>\r\n     </td>\r\n   </tr>\r\n     <tr>\r\n       <td>\r\n         <table border=\"0\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" background=\"http://spaboomdeftest.boomtimetest.com/very-light-bg2.png\" bgcolor=\"#f8fcff\" style=\"margin: auto;\" class=\"email-container\">\r\n             <tr>\r\n                 <td height=\"10\" style=\"font-size: 0; line-height: 0;\"> </td>\r\n             </tr>\r\n             <tr>\r\n                 <td class=\"hh-force-col-center\" align=\"center\" valign=\"middle\" style=\"padding: 10px 0;text-align: center;\">\r\n                     <div class=\"hh-center\" style=\"text-align:center; color: #616161; font-family: \'Open Sans\'; font-weight: normal; text-transform: uppercase; padding: 0px 20px; line-height: 1; font-size: 18px; letter-spacing: 2px;\">THANK YOU FOR BEING OUR LOYAL CUSTOMER</div>\r\n                 </td>\r\n             </tr>\r\n             <tr>\r\n                 <td align=\"center\"><img style=\"display: inline-block;\" class=\"fluid\" height=\"7\" width=\"556\" src=\"http://spaboomdeftest.boomtimetest.com/hr-border.png\"/></td>\r\n             </tr>\r\n         </table>\r\n         \r\n       </td>\r\n \r\n     </tr>\r\n \r\n \r\n     <tr>\r\n         <td>\r\n         \r\n             <table background=\"http://spaboomdeftest.boomtimetest.com/very-light-bg2.png\" bgcolor=\"#f8fcff\" class=\"email-container\" width=\"600\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"margin: auto;\">\r\n                     <tr>\r\n                         <td class=\"force-col-center\" valign=\"middle\" style=\"text-align:center;\">\r\n                         \r\n                             <table width=\"100%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n                                 <tr>\r\n                                     <td style=\"padding-top:20px;padding-right:20px;padding-left:20px;padding-bottom:10px;\">\r\n                                     \r\n                                          <table width=\"100%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" >\r\n                                             <tr>\r\n                                               <td height=\"20\" style=\"font-size: 0; line-height: 0;\" class=\"empty-spacer\"> </td>\r\n                                             </tr>\r\n                                             <tr>\r\n                                                <td align=\"center\">\r\n                                                 {logo}\r\n                                                </td>\r\n                                             </tr>\r\n                                             <tr>\r\n                                               <td height=\"20\" style=\"font-size: 0; line-height: 0;\" class=\"empty-spacer\"> </td>\r\n                                             </tr>\r\n                                         </table>\r\n \r\n                                     </td>\r\n                                 </tr>\r\n                             </table>\r\n                         </td>\r\n                     </tr>\r\n               </table>\r\n           \r\n         </td>\r\n     </tr>\r\n \r\n \r\n     <tr>\r\n         <td>\r\n         \r\n         \r\n         <table background=\"http://spaboomdeftest.boomtimetest.com/very-light-bg2.png\" bgcolor=\"#f8fcff\" border=\"0\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"margin: auto;\" class=\"email-container\">\r\n             <tr>\r\n                 <td align=\"center\"><img style=\"display: inline-block;\" class=\"fluid\" height=\"7\" width=\"556\" src=\"http://spaboomdeftest.boomtimetest.com/hr-border.png\"/></td>\r\n             </tr>\r\n           <tr>\r\n              <td class=\"force-col-center\" valign=\"middle\" style=\"padding: 20px 0;text-align: center;\">\r\n             <table border=\"0\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" class=\"fluid\">\r\n          \r\n \r\n \r\n <tr>\r\n     <td class=\"hh-force-col-center\" align=\"center\" valign=\"middle\" style=\"text-align: center; padding-top: 0px;\">\r\n         <div class=\"hh-center\" style=\"text-align:center; color: #616161; font-family: \'Open Sans\'; font-weight: normal; text-transform: uppercase; padding: 0px 20px; line-height: 1; font-size: 18px;\">A gift from our friend</div>\r\n     </td>\r\n </tr>\r\n           <tr>\r\n               <td height=\"20\" style=\"font-size: 0; line-height: 0;\" class=\"empty-spacer\"> </td>\r\n             </tr>     \r\n \r\n             <tr>\r\n             \r\n            \r\n \r\n <td>\r\n \r\n    \r\n \r\n <table width=\"400px\" bgcolor=\"#575757\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"border: 10px solid #fdfefe;\">\r\n                 <tr>\r\n                   <td height=\"20\" style=\"font-size: 0; line-height: 0;\" class=\"empty-spacer\"> </td>\r\n                 </tr>\r\n                 <tr>\r\n \r\n \r\n \r\n                    <td align=\"center\"><div id=\"email-main-body\" class=\"hh-center\" style=\"text-align:center; text-transform:uppercase; color: #ffffff; font-family: \'Open Sans\'; font-size: 24px; font-weight: bold;\">\r\n \r\n <table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n <tr>\r\n   <td width=\"100%\" colspan = \"2\"><h1 style=\"text-transform: uppercase; font-family: \"Open Sans\"; font-size: 65px; font-weight: bold; padding: 10px 0px; margin: 10px 0px 0px; line-height: 20px;\">{little_help_prize}</h1></td>\r\n </tr>\r\n </table>\r\n \r\n                    </div></td>\r\n \r\n \r\n \r\n                 </tr>\r\n                 <tr>\r\n                   <td height=\"20\" style=\"font-size: 0; line-height: 0;\" class=\"empty-spacer\"> </td>\r\n                 </tr>\r\n             </table>\r\n \r\n \r\n  \r\n </td>\r\n \r\n            \r\n             \r\n             \r\n             \r\n \r\n                 \r\n             </tr>\r\n \r\n \r\n \r\n \r\n           </table>\r\n             </td>\r\n           </tr>\r\n         <tr>\r\n           <td align=\"center\">\r\n               <div class=\"hh-center\"><a href=\"{little_gift_pickup_link}\"><img src=\"http://spaboomdeftest.boomtimetest.com/e12-print.png\" width=\"163\" height=\"27\" style=\"display: inline-block;\" alt=\"Print Coupon\"/></a></div>\r\n           </td>\r\n     </tr>\r\n         </table>\r\n         </td>\r\n     </tr>\r\n     \r\n     \r\n     <tr>\r\n     \r\n         <td>\r\n             <table background=\"http://spaboomdeftest.boomtimetest.com/very-light-bg2.png\" bgcolor=\"#f8fcff\" border=\"0\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"margin: auto;\" class=\"email-container\">\r\n             <tr>\r\n                 <td align=\"center\"><img style=\"display: inline-block;\" class=\"fluid\" height=\"7\" width=\"556\" src=\"http://spaboomdeftest.boomtimetest.com/hr-border.png\"/></td>\r\n             </tr>\r\n                 <tr>\r\n                     <td class=\"hh-force-col-center\" valign=\"middle\">\r\n                         <table width=\"100%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"text-align: left;\">\r\n                         \r\n                             <tr>\r\n                        \r\n                                 <td style=\"padding: 5px;\">\r\n                                 \r\n                                     <table width=\"100%\" align=\"center\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n                                         <tr>\r\n                                             <td align=\"center\">\r\n                                                 <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n                                 <tr>\r\n                                     <td align=\"center\" valign = \"center\">\r\n                                         <p style=\"text-align:center; color: #616161; font-family: \'Open Sans\'; font-weight: normal; text-transform: capitalize; padding: 0px 5px; line-height: normal; font-size: 11px; letter-spacing: 1px;\"> <strong>{company} • {address}, {city}, {state} {postal} • {phone_1}</strong>\r\n                                             <br>\r\n                                             <br>{short_name} is sending you this email because you are a valued client and you\'ve made a purchase from us, specifically requested this information or signed up for occasional mailings. If you do not wish to receive emails in the future, please {unsubscribe_link}. For more information, review our {privacy_policy}.</p>\r\n                                     </td>\r\n                                 </tr>\r\n                             </table>\r\n                                             </td>\r\n                                         </tr>\r\n                                     </table>\r\n                                     \r\n                                 \r\n                                 </td>\r\n                             </tr>\r\n                              <tr>\r\n                             <td height=\"10\" style=\"font-size: 0; line-height: 0;\" class=\"empty-spacer\"> </td>\r\n                         </tr>\r\n                         </table>\r\n                     </td>\r\n                 </tr>\r\n             </table>\r\n         </td>\r\n     \r\n     </tr>\r\n     \r\n     <tr>\r\n         <td>\r\n        \r\n         <table border=\"0\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\" style=\"margin: auto;\" class=\"email-container\">\r\n           <tr>\r\n             <td height=\"10\" style=\"font-size: 0; line-height: 0;\"> </td>\r\n           </tr>\r\n           <tr>\r\n             <td class=\"hh-force-col-center\" valign=\"middle\" style=\"padding: 10px 0;text-align: center;\">\r\n                 <div class=\"hh-center\"> </div>\r\n             </td>\r\n           </tr>\r\n           <tr>\r\n             <td height=\"10\" style=\"font-size: 0; line-height: 0;\"> </td>\r\n           </tr>\r\n         </table>\r\n         \r\n         </td>\r\n     </tr>\r\n     <tr>\r\n         <td>\r\n             <table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n                 <tr>\r\n                   <td height=\"50\" style=\"font-size: 0; line-height: 0;\"> </td>\r\n                 </tr>\r\n               </table>\r\n         </td>\r\n     </tr>\r\n </table>\r\n </td></tr></table>\r\n </body>\r\n </html>','#email-main-body a{\r\ncolor:#5e5c5d;\r\ntext-decoration:none !important;\r\n}\r\n\r\n#unsubscribe-lnk a{\r\ncolor:#0081a9;\r\ntext-decoration:none !important;\r\n}\r\n\r\n@font-face {\r\n  font-family: \'Open Sans Condensed\';\r\n  font-style: normal;\r\n  font-weight: 300;\r\n  src: local(\'Open Sans Cond Light\'), local(\'OpenSans-CondensedLight\'), url(http://fonts.gstatic.com/s/opensanscondensed/v9/gk5FxslNkTTHtojXrkp-xF1YPouZEKgzpqZW9wN-3Ek.woff) format(\'woff\');\r\n}\r\n@font-face {\r\n  font-family: \'Open Sans Condensed\';\r\n  font-style: normal;\r\n  font-weight: 700;\r\n  src: local(\'Open Sans Condensed Bold\'), local(\'OpenSans-CondensedBold\'), url(http://fonts.gstatic.com/s/opensanscondensed/v9/gk5FxslNkTTHtojXrkp-xONSK5BxN3NFS4EJkViHIqo.woff) format(\'woff\');\r\n} \r\n  \r\n@font-face {\r\n  font-family: \'Open Sans\';\r\n  font-style: normal;\r\n  font-weight: 400;\r\n  src: local(\'Open Sans\'), local(\'OpenSans\'), url(http://fonts.gstatic.com/s/opensans/v10/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format(\'woff\');\r\n}\r\n@font-face {\r\n  font-family: \'Open Sans\';\r\n  font-style: normal;\r\n  font-weight: 600;\r\n  src: local(\'Open Sans Semibold\'), local(\'OpenSans-Semibold\'), url(http://fonts.gstatic.com/s/opensans/v10/MTP_ySUJH_bn48VBG8sNSnhCUOGz7vYGh680lGh-uXM.woff) format(\'woff\');\r\n}\r\n@font-face {\r\n  font-family: \'Open Sans\';\r\n  font-style: normal;\r\n  font-weight: 700;\r\n  src: local(\'Open Sans Bold\'), local(\'OpenSans-Bold\'), url(http://fonts.gstatic.com/s/opensans/v10/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format(\'woff\');\r\n}\r\n@font-face {\r\n  font-family: \'Open Sans\';\r\n  font-style: normal;\r\n  font-weight: 800;\r\n  src: local(\'Open Sans Extrabold\'), local(\'OpenSans-Extrabold\'), url(http://fonts.gstatic.com/s/opensans/v10/EInbV5DfGHOiMmvb1Xr-hnhCUOGz7vYGh680lGh-uXM.woff) format(\'woff\');\r\n}\r\n  	\r\n  	/* ensure that clients don\'t add any padding or spaces around the email design and allow us to style emails for the entire width of the preview pane */\r\n		body,\r\n		#bodyTable {\r\n			height:100% !important;\r\n			width:100% !important;\r\n			margin:0;\r\n			padding:0;\r\n		}\r\n		\r\n		/* Ensures Webkit- and Windows-based clients don\'t automatically resize the email text. */\r\n		body,\r\n		table,\r\n		td,\r\n		p,\r\n		a,\r\n		li,\r\n		blockquote {\r\n			-ms-text-size-adjust:100%;\r\n			-webkit-text-size-adjust:100%;\r\n		}\r\n		\r\n		/* Forces Yahoo! to display emails at full width */\r\n		.thread-item.expanded .thread-body .body, .msg-body {\r\n			width: 100% !important;\r\n			display: block !important;\r\n		}\r\n\r\n    /* Forces Hotmail to display emails at full width */\r\n    .ReadMsgBody,\r\n    .ExternalClass {\r\n			width: 100%;\r\n			background-color: #f4f4f4;\r\n    }\r\n\r\n    /* Forces Hotmail to display normal line spacing. */\r\n		.ExternalClass,\r\n		.ExternalClass p,\r\n		.ExternalClass span,\r\n		.ExternalClass font,\r\n		.ExternalClass td,\r\n		.ExternalClass div {\r\n			line-height:100%;\r\n    }\r\n\r\n    /* Resolves webkit padding issue. */\r\n    table {\r\n			border-spacing:0;\r\n    }\r\n\r\n    /* Resolves the Outlook 2007, 2010, and Gmail td padding issue, and removes spacing around tables that Outlook adds. */\r\n    table,\r\n    td {\r\n			border-collapse:collapse;\r\n			mso-table-lspace:0pt;\r\n			mso-table-rspace:0pt;\r\n    }\r\n    \r\n    /* Corrects the way Internet Explorer renders resized images in emails. */\r\n    img {\r\n    	-ms-interpolation-mode: bicubic;\r\n    }\r\n    \r\n    /* Ensures images don\'t have borders or text-decorations applied to them by default. */\r\n    img,\r\n    a img {\r\n    	border:0;\r\n    	outline:none;\r\n    	text-decoration:none;	    \r\n    }\r\n\r\n    /* Styles Yahoo\'s auto-sensing link color and border */\r\n    .yshortcuts a {\r\n			border-bottom: none !important;\r\n    }\r\n    \r\n    /* Styles the tel URL scheme */\r\n    a[href^=tel],\r\n		.mobile_link,\r\n		.mobile_link a {\r\n	    color:#222222 !important;\r\n			text-decoration: underline !Important;\r\n    }\r\n  \r\n    /* Media queries for when the viewport is smaller than the default email width but not too narrow. */\r\n    @media screen and (max-device-width: 600px), screen and (max-width: 600px) {\r\n\r\n			/* Constrains email width for small screens */\r\n			table[class=\"email-container\"] {\r\n				width: 100% !important;\r\n			}\r\n			/* Constrains tables for small screens */\r\n			table[class=\"fluid\"] {\r\n				width: 100% !important;\r\n			}\r\n			\r\n			/* Forces images to resize to full width of their container */\r\n			img[class=\"fluid\"],\r\n			img[class=\"force-col-center\"] {\r\n				width: 100% !important;\r\n				max-width: 100% !important;\r\n				height: auto !important;\r\n			}\r\n			/* And centers these ones */\r\n				img[class=\"force-col-center\"] {\r\n				margin: auto !important;\r\n			}\r\n			\r\n			/* Forces table cells into rows */\r\n			td[class=\"force-col\"],\r\n			td[class=\"force-col-center\"] {\r\n				display: block !important;\r\n				width: 100% !important;\r\n				clear: both;\r\n			}\r\n			/* And centers these ones */\r\n			td[class=\"force-col-center\"] {\r\n				text-align: center !important;\r\n			}\r\n			\r\n			/* Forces table cells into rows */\r\n			/* Floats a previously stacked image to the left */\r\n			img[class=\"col-3-img-l\"] {\r\n				float: left;\r\n				margin: 0 15px 15px 0;\r\n			}\r\n			/* Floats a previously stacked image to the right */\r\n			img[class=\"col-3-img-r\"] {\r\n				float: right;\r\n				margin: 0 0 15px 15px;\r\n			}\r\n			\r\n			/* Makes buttons full width */\r\n			table[class=\"button\"] {\r\n				width: 100% !important;\r\n			}\r\n         \r\n    }\r\n\r\n    /* Media queries for when the viewport is narrow. */\r\n    /* Rules prefixed with \'hh-\' (for \'handheld\') repeat much of what\'s above, but these don\'t trigger until the smaller screen width. */\r\n    @media screen and (max-device-width: 425px), screen and (max-width: 425px) {\r\n\r\n			/* Helper only visible on handhelds. All styles are inline along with a `display:none`, which this class overrides */\r\n			div[class=\"hh-visible\"] {\r\n				display: block !important;\r\n			}\r\n			\r\n			/* Center stuff */\r\n			div[class=\"hh-center\"] {\r\n				text-align: center;\r\n				width: 100% !important;\r\n			}\r\n			\r\n			/* Constrain tables for small screens */\r\n			table[class=\"hh-fluid\"] {\r\n				width: 100% !important;\r\n			}\r\n			\r\n			/* Force images to resize to full width of their container */\r\n			img[class=\"hh-fluid\"],\r\n			img[class=\"hh-force-col-center\"] {\r\n				width: 100% !important;\r\n				max-width: 100% !important;\r\n				height: auto !important;\r\n			}\r\n			/* And center these ones */\r\n			img[class=\"hh-force-col-center\"] {\r\n				margin: auto !important;\r\n			}\r\n			\r\n			/* Force table cells into rows */\r\n			td[class=\"hh-force-col\"],\r\n			td[class=\"hh-force-col-center\"] {\r\n				display: block !important;\r\n				width: 100% !important;\r\n				clear: both;\r\n			}\r\n			/* And center these ones */\r\n			td[class=\"hh-force-col-center\"] {\r\n				text-align: center !important;\r\n			}\r\n			\r\n			/* Stack the previously floated images */\r\n			img[class=\"col-3-img-l\"],\r\n			img[class=\"col-3-img-r\"] {\r\n				float: none !important;\r\n				margin: 15px auto !important;\r\n				text-align: center !important;\r\n			}\r\n\r\n    }',NULL,0,'',0,0,0,0,0,NULL);
#RC 03.30.2015 M2713: A little help email

UPDATE `sevence`.`network_promo_image_settings` SET `prize_desc_pos_y`='150', `prize_desc_height`='100' WHERE `network_promo_image_settings`='1';
UPDATE `sevence`.`network_promo_image_settings` SET `prize_desc_pos_y`='150', `prize_desc_height`='100' WHERE `network_promo_image_settings`='4';
UPDATE `sevence`.`network_promo_image_settings` SET `prize_desc_pos_y`='237' WHERE `network_promo_image_settings`='3';
UPDATE `sevence`.`network_promo_image_settings` SET `prize_desc_pos_y`='237' WHERE `network_promo_image_settings`='6';
#RC 03.31.2015 M2716: Improve alignment on promo images
#3.30.15 UPDATE END

#4.10.15 UPDATE BEGIN
ALTER TABLE `sevence`.`dp_design` ADD COLUMN `date_created` DATETIME NULL  AFTER `match_color` , ADD COLUMN `advisor` INT(11) NULL  AFTER `date_created` , ADD COLUMN `last_updated` DATETIME NULL  AFTER `advisor` , 
  ADD CONSTRAINT `fk1_advisor`
  FOREIGN KEY (`advisor` )
  REFERENCES `sevence`.`prof` (`prof` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `advisor_idx` (`advisor` ASC) ;
#RC 04.09.2015 M2727: Add to dp_design
#4.10.15 UPDATE END

#4.13.15 UPDATE BEGIN
ALTER TABLE `sevence`.`promo_email_queue` ADD COLUMN `promo_email_info` INT(11) NULL  AFTER `org` , 
  ADD CONSTRAINT `promo_email_info_fk1`
  FOREIGN KEY (`promo_email_info` )
  REFERENCES `sevence`.`promo_email_info` (`promo_email_info` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `promo_email_info_idx_idx` (`promo_email_info` ASC) ;
#RC 04.13.2015 M2742: Promo email queue and promo_email_info
#4.13.15 UPDATE END

#4.14.15 UPDATE BEGIN
# some structure changes Ben made to support using Mandrill
alter table promo_email_info add column rejected datetime NULL after message_id;
create index peq_attempts on promo_email_queue(attempts, next_attempt);
create index peq_next_attempt on promo_email_queue(next_attempt, attempts);
create index peq_priority on promo_email_queue(priority, entered_date);
alter table org_client_bounce add last_promo_email_info int null after last_client_journal;
#4.14.15 UPDATE END

#4.30.15 UPDATE BEGIN
INSERT INTO `sevence`.`org_parm` (`org`, `type`, `parm`, `value`) VALUES ('409', 'PrepNetworkEmails', 'max_email', '4');
#DCS 04.16.2015 0002750: Max number of emails per org client

CREATE  TABLE `sevence`.`promo_approver` (
  `business_org` INT NULL ,
  `name` VARCHAR(50) NULL ,
  `email` VARCHAR(50) NULL ,
  `phone` VARCHAR(50) NULL ,
  `contact_preferences` VARCHAR(50) NULL ,
  PRIMARY KEY (`business_org`) ,
  INDEX `fk1_business_org_idx` (`business_org` ASC) ,
  CONSTRAINT `fk1_business_org`
    FOREIGN KEY (`business_org` )
    REFERENCES `sevence`.`business_org` (`business` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#RC 04.22.15 Mantis 2762: Promo Approver

CREATE TABLE `sevence`.`email_promo_network` (
  `email_promo_network` INT NOT NULL AUTO_INCREMENT,
  `email_promo` INT NULL,
  `bt_network` INT NULL,
  PRIMARY KEY (`email_promo_network`),
  INDEX `fk_email_promo_idx` (`email_promo` ASC),
  INDEX `fk_bt_network_idx` (`bt_network` ASC),
  CONSTRAINT `fk5_email_promo`
    FOREIGN KEY (`email_promo`)
    REFERENCES `sevence`.`email_promo` (`email_promo`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk5_bt_network`
    FOREIGN KEY (`bt_network`)
    REFERENCES `sevence`.`bt_network` (`bt_network`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`promotion_client_type` (
  `promotion_client_type` INT NOT NULL AUTO_INCREMENT,
  `promotion` INT NULL,
  `client_type` INT NULL,
  PRIMARY KEY (`promotion_client_type`),
  INDEX `fk5_promotion_idx` (`promotion` ASC),
  INDEX `fk5_client_type_idx` (`client_type` ASC),
  CONSTRAINT `fk5_promotion`
    FOREIGN KEY (`promotion`)
    REFERENCES `sevence`.`promotion` (`promotion`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk5_client_type`
    FOREIGN KEY (`client_type`)
    REFERENCES `sevence`.`client_type` (`client_type`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

ALTER TABLE `sevence`.`promotion_client_type` 
DROP FOREIGN KEY `fk5_client_type`;
ALTER TABLE `sevence`.`promotion_client_type` 
CHANGE COLUMN `client_type` `client_type` VARCHAR(255) NULL DEFAULT NULL ,
DROP INDEX `fk5_client_type_idx` ;

INSERT INTO sevence.email_promo_network (email_promo, bt_network) SELECT email_promo, bt_network FROM email_promo WHERE bt_network IS NOT NULL;
INSERT INTO sevence.promotion_client_type (promotion, client_type) SELECT promotion, client_type FROM promotion WHERE client_type IS NOT NULL;

ALTER TABLE `sevence`.`email_promo` 
DROP FOREIGN KEY `fk_bt_network`;
ALTER TABLE `sevence`.`email_promo` 
DROP COLUMN `bt_network`,
DROP INDEX `fk_bt_network_idx` ;

ALTER TABLE `sevence`.`promotion` 
DROP COLUMN `client_type`;
#MT 04.22.2015 0002759: Structure change improvements for email promo and promotion

CREATE  TABLE `sevence`.`email_promo_promotion` (
  `email_promo_promotion` INT NOT NULL AUTO_INCREMENT ,
  `email_promo` INT NULL ,
  `promotion` INT NULL ,
  PRIMARY KEY (`email_promo_promotion`) ,
  INDEX `email_promo_fk1_idx` (`email_promo` ASC) ,
  INDEX `promotion_fk1_idx` (`promotion` ASC) ,
  CONSTRAINT `email_promo_fk1`
    FOREIGN KEY (`email_promo` )
    REFERENCES `sevence`.`email_promo` (`email_promo` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `promotion_fk1`
    FOREIGN KEY (`promotion` )
    REFERENCES `sevence`.`promotion` (`promotion` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

INSERT INTO sevence.email_promo_promotion(email_promo, promotion) SELECT email_promo, promotion FROM promotion WHERE email_promo IS NOT NULL;


ALTER TABLE `sevence`.`promotion` DROP FOREIGN KEY `fk1_email_promo` ;
ALTER TABLE `sevence`.`promotion` DROP COLUMN `email_promo` 
, DROP INDEX `fk1_email_promo_idx` ;
#RC 04.23.2015 0002758: Structure changes improvements for email promo and promotion    

ALTER TABLE `sevence`.`working_ep_org` 
ADD COLUMN `network` INT(11) NULL AFTER `email_promo`;
ALTER TABLE `sevence`.`working_org_promo` 
ADD COLUMN `client_type` VARCHAR(50) NULL AFTER `promo`;
#DCS 04.23.2015 revert change on 04.22.2015 0002759: Structure change improvements for email promo and promotion (drop client type and network in working tables)   

UPDATE `sevence`.`network_promo_image_settings` SET `logo_pos_y`='55' WHERE `network_promo_image_settings`='3';
UPDATE `sevence`.`network_promo_image_settings` SET `logo_pos_y`='55' WHERE `network_promo_image_settings`='6';
UPDATE `sevence`.`network_promo_image_settings` SET `logo_pos_x`='250' WHERE `network_promo_image_settings`='6';
UPDATE `sevence`.`network_promo_image_settings` SET `logo_pos_x`='250' WHERE `network_promo_image_settings`='3';
#RC 04.27.2015 	0002772: Images: Landing page logo size

ALTER TABLE `sevence`.`sample_photo` 
ADD COLUMN `posed` INT NULL AFTER `value`,
ADD COLUMN `atmospheric` INT NULL AFTER `posed`;
#MT 04.30.2015  0002783: Two new attributes to the sample library photos
#4.30.15 UPDATE END 

#5.29.15 UPDATE BEGIN
ALTER TABLE `sevence`.`promo_email_info` ADD COLUMN `click` DATETIME NULL  AFTER `unsubbed` , ADD COLUMN `soft_bounce` DATETIME NULL  AFTER `click` , ADD COLUMN `spam` DATETIME NULL  AFTER `soft_bounce` ;
#RC 05.27.15 Mantis 2820: Changes to promo_email_info

CREATE  TABLE `sevence`.`promo_email_summary` (
  `promo_email_summary` INT NOT NULL AUTO_INCREMENT ,
  `org` INT NULL ,
  `name` VARCHAR(50) NULL ,
  `month` INT NULL ,
  `week_of_month` INT NULL ,
  `year` INT NULL ,
  `emails_sent` INT NULL ,
  `unsubs` INT NULL ,
  `opened` INT NULL ,
  `rejected` INT NULL ,
  `bounced` INT NULL ,
  `soft_bounce` INT NULL ,
  `spam` INT NULL ,
  `main_clicked` INT NULL ,
  `network_promos_sent` INT NULL ,
  `network_clicked` INT NULL ,
  `coupons_generated` INT NULL ,
  PRIMARY KEY (`promo_email_summary`) ,
  INDEX `fk_org_idx` (`org` ASC) ,
  CONSTRAINT `fk_org`
    FOREIGN KEY (`org` )
    REFERENCES `sevence`.`org` (`org` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#RC 05.27.15 Mantis 2821: promo email reporting

ALTER TABLE `sevence`.`promo_email_summary` ADD COLUMN `email_promo` INT(11) NULL  AFTER `coupons_generated` , 
  ADD CONSTRAINT `fk1_email_promo`
  FOREIGN KEY (`email_promo` )
  REFERENCES `sevence`.`email_promo` (`email_promo` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `fk_email_promo_idx` (`email_promo` ASC) ;
#RC 05.29.15 Mantis 2821: promo email reporting

#These are some changes that BEN snuck onto production and testing a while ago that you may not have 
#run on your local. Oh sure, his excuse is going to be that he asked me to add them to dev_updates
#and I probably even said I would. And then I didn't. So I am adding them now. 

alter table org_client_bounce add last_promo_email_info int null after last_client_journal;
alter table promo_email_info add column rejected datetime NULL after message_id;
create index peq_attempts on promo_email_queue(attempts, next_attempt);
create index peq_next_attempt on promo_email_queue(next_attempt, attempts);
create index peq_priority on promo_email_queue(priority, entered_date);
#Random stuff BEN did during the first run of email promos in April.
#5.29.15 UPDATE END

#6.15.2015 UPDATE BEGIN
#This part was actually run while Kent and I were troubleshooting issues with the network dist.
ALTER TABLE `sevence`.`working_ep_org_client` 
ADD COLUMN `email_promo` INT(11) NULL DEFAULT 0 AFTER `ep_group`;
#KA 06.03.15 -- Add email_promo to working_ep_org_client and have promo_email_queue and distribute network use that column. -- populate email_promo during selecting the main promotion

ALTER TABLE `sevence`.`org_setting` 
ADD COLUMN `gift_auto_expire` TINYINT(1) NULL;
#MT 06.04.14 0002833: Automatically expire IGCs

ALTER TABLE `sevence`.`promo_email_info` ADD COLUMN `network` INT(11) NULL  AFTER `spam` ;
ALTER TABLE `sevence`.`promo_email_summary` ADD COLUMN `network` INT(11) NULL  AFTER `email_promo` ;
#RC 06.04.15 Mantis 2821: promo email reporting

ALTER TABLE `sevence`.`bt_network` 
ADD COLUMN `x_ration_promotions` TINYINT(1) NULL AFTER `network_type`;
#MT 06.05.15 0002846: Don't ration promos setting in bt_networks

ALTER TABLE `sevence`.`bt_network` 
ADD COLUMN `b2b` TINYINT(1) NULL DEFAULT 0 AFTER `x_ration_promotions`;
UPDATE `sevence`.`bt_network` SET `b2b` = 1 WHERE `network_type` = 1;
ALTER TABLE `sevence`.`bt_network` 
DROP COLUMN `network_type`;

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `b2b` TINYINT(1) NULL DEFAULT 0 AFTER `expanded_copy`;
UPDATE `sevence`.`promotion` SET `b2b` = 1 WHERE `network_type` = 'B2B';
ALTER TABLE `sevence`.`promotion` 
DROP COLUMN `network_type`;
#MT 06.05.15 0002845: B2B promos

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `network_promo` TINYINT(1) NULL DEFAULT 0 AFTER `b2b`;
UPDATE promotion INNER JOIN promotion_client_type ON promotion.promotion = promotion_client_type.promotion 
SET promotion.network_promo = 1 WHERE promotion_client_type.client_type = 'network';
DELETE FROM promotion_client_type WHERE client_type = 'network';
#MT 06.05.15 0002844: Network promo designation

ALTER TABLE `sevence`.`bt_referral_emails` ADD COLUMN `market_manager` INT(11) NULL  AFTER `emailed` , 
  ADD CONSTRAINT `rf_market_manager_idx`
  FOREIGN KEY (`market_manager` )
  REFERENCES `sevence`.`prof` (`prof` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `rf_market_manager_idx_idx` (`market_manager` ASC) ;
ALTER TABLE `sevence`.`prof` ADD COLUMN `is_market_manager` TINYINT(1) NOT NULL DEFAULT '0'  AFTER `is_designer` ;
ALTER TABLE `sevence`.`bt_referral_emails` DROP FOREIGN KEY `rf_market_manager_idx` ;
#RC 06.09.15 Mantis 2848: Improvements to email referrals

ALTER TABLE `sevence`.`org` ADD COLUMN `min_network_promo` INT(11) NULL  AFTER `wpwebsite` ;
UPDATE sevence.org SET min_network_promo = 2000 WHERE service_custom=7;
ALTER TABLE `sevence`.`bt_network_detail` ADD COLUMN `starred` TINYINT(1) NULL  AFTER `business_org` , ADD COLUMN `percentage` INT(3) NULL  AFTER `starred` ;
INSERT INTO `sevence`.`org_parm` (`org`, `type`, `parm`, `value`) VALUES ('409', 'NetworkDistributionPromo', 'max_promo_emails', '10');
INSERT INTO `sevence`.`org_parm` (`org`, `type`, `parm`, `value`) VALUES ('409', 'NetworkDistributionPromo', 'starred_percentage', '50');
INSERT INTO `sevence`.`org_parm` (`org`, `type`, `parm`, `value`) VALUES ('409', 'NetworkDistributionPromo', 'max_starred_relationships', '5');
#RC 06.11.15 Mantis 2850: Changes to the distribution of network promos (part eleventy-two)

CREATE TABLE `sevence`.`summary_network_promo` (
  `summary_network_promo` INT(11) NOT NULL AUTO_INCREMENT,
  `org` INT(11) NULL DEFAULT 0,
  `month` INT(3) NULL DEFAULT 0,
  `week_of_month` INT(5) NULL DEFAULT 0,
  `year` INT(5) NULL DEFAULT 0,
  `promo` INT(11) NULL DEFAULT 0,
  `promo_count` INT(11) NULL DEFAULT 0,
  `promo_clicked` TINYINT(1) NULL DEFAULT 0,
  PRIMARY KEY (`summary_network_promo`),
  INDEX `snp_fk_org_idx` (`org` ASC),
  CONSTRAINT `snp_fk_org`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

CREATE TABLE `sevence`.`summary_coupon_generated` (
  `summary_coupon_generated` INT(11) NOT NULL,
  `org` INT(11) NULL,
  `month` INT(3) NULL DEFAULT 0,
  `week_of_month` INT(5) NULL DEFAULT 0,
  `year` INT(5) NULL DEFAULT 0,
  `promo` INT(11) NULL DEFAULT 0,
  `promo_count` INT(11) NULL DEFAULT 0,
  PRIMARY KEY (`summary_coupon_generated`),
  INDEX `scg_fk_org_idx` (`org` ASC),
  CONSTRAINT `scg_fk_org`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
ALTER TABLE `sevence`.`summary_coupon_generated` 
CHANGE COLUMN `summary_coupon_generated` `summary_coupon_generated` INT(11) NOT NULL AUTO_INCREMENT ;
#KA 06.10.2015 M2821: promo email reporting

ALTER TABLE `sevence`.`promo_email_summary` 
DROP FOREIGN KEY `fk1_email_promo`;
ALTER TABLE `sevence`.`promo_email_summary` 
ADD CONSTRAINT `fk1_email_promo`
  FOREIGN KEY (`email_promo`)
  REFERENCES `sevence`.`email_promo` (`email_promo`)
  ON DELETE CASCADE
  ON UPDATE NO ACTION;
#KA 06.11.15 Mantis 2821: promo email reporting

ALTER TABLE `sevence`.`bt_network` 
DROP COLUMN `x_ration_promotions`;
#KA 06.15.2015 M2846: Don't ration promos setting in bt_networks
#6.15.15 UPDATE END

#6.22.15 UPDATE BEGIN

#SLOW The network email template was updated to include the boomtime logo centered at the bottom
#I did this manually rather than via an update statement in order to preserve minor differences on the template between 
#testing and production.

ALTER TABLE `sevence`.`summary_coupon_generated` ADD COLUMN `redeemed` INT(11) NULL  AFTER `promo_count` ;
ALTER TABLE `sevence`.`summary_coupon_generated` CHANGE COLUMN `redeemed` `redeemed` INT(11) NULL DEFAULT '0'  ;
CREATE  TABLE `sevence`.`summary_network_performance` (
  `summary_network_performance` INT NOT NULL AUTO_INCREMENT ,
  `org` INT(11) NULL ,
  `week_of_month` INT(11) NULL ,
  `month` INT(11) NULL ,
  `year` INT(11) NULL ,
  `network_org` INT(11) NULL ,
  `bt_network` INT(11) NULL ,
  `unsubs` INT(11) NULL DEFAULT NULL ,
  `email_promo` INT(11) NULL DEFAULT NULL ,
  `main_clicked` INT(11) NULL DEFAULT NULL ,
  `spam` INT(11) NULL DEFAULT NULL ,
  `soft_bounce` INT(11) NULL DEFAULT NULL ,
  `bounced` INT(11) NULL DEFAULT NULL ,
  `rejected` INT(11) NULL DEFAULT NULL ,
  `opened` INT(11) NULL DEFAULT NULL ,
  `emails_sent` INT(11) NULL DEFAULT NULL ,
  PRIMARY KEY (`summary_network_performance`) );
#RC 06.18.15 Mantis 2858: org level promo performance reporting

ALTER TABLE `sevence`.`working_ep_org_client` 
ADD COLUMN `org_state` VARCHAR(20) NULL AFTER `email_promo`,
ADD COLUMN `org_timezone` VARCHAR(45) NULL AFTER `org_state`;
#DCS M2859: Setting send date using org's time zone
#6.22.15 UPDATE END;

#6.26.15 UPDATE BEGIN
ALTER TABLE `sevence`.`org` ADD COLUMN `igc_receipt_text` TEXT NULL  AFTER `min_network_promo` ;
#RC 06.25.15 Mantis 2860: Modify IGC receipt email
#6.26.15 UPDATE END

#7.5.15 UPDATE BEGIN
ALTER TABLE sevence.working_ep_org_client ADD COLUMN promo_count INT(11);
#SLOW: need to more evenly distribute promos. The same org clients get selected over and over.
#7.5.15 UPDATE END

#7.13.15 UPDATE BEGIN
ALTER TABLE `sevence`.`summary_network_promo` 
CHANGE COLUMN `promo_clicked` `promo_clicked` INT(11) NULL DEFAULT '0' ;
#RC 07.01.15 Mantis 2877: In the promo email report, the network clicked is not correct also there are problems with the email_promo sidebar info
#7.13.15 UPDATE END

#7.14.15 UPDATE BEGIN
ALTER TABLE `sevence`.`org` 
ADD COLUMN `bt_referral` VARCHAR(45) NULL;
#MT 07.14.15 Mantis 2879#c7961
#7.14.15 UPDATE END

#7.21.15 UPDATE BEGIN
ALTER TABLE `sevence`.`promo_images` ADD COLUMN `org` INT(11) NULL DEFAULT NULL  , ADD COLUMN `original_image` VARCHAR(45) NULL  AFTER `coupon_image` , ADD COLUMN `default` TINYINT(1) NULL DEFAULT '0'  AFTER `original_image` , 
  ADD CONSTRAINT `org_fk_1`
  FOREIGN KEY (`org` )
  REFERENCES `sevence`.`org` (`org` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#RC 07.13.15 Mantis 2891: Promo Images

ALTER TABLE `sevence`.`promotion` ADD COLUMN `promo_images` INT(11) NULL  AFTER `promo_terms` , 
  ADD CONSTRAINT `promo_images_fk`
  FOREIGN KEY (`promo_images` )
  REFERENCES `sevence`.`promo_images` (`promo_images` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `promo_images_fk_idx` (`promo_images` ASC) ;
#RC 07.13.15 Mantis 2895: Select a photo for a promo
#7.21.15 UPDATE END

#7.30.15 UPDATE BEGIN
ALTER TABLE `sevence`.`working_ep_org` 
ADD COLUMN `promos_per_email` INT(11) NULL AFTER `promo_count`,
ADD COLUMN `network_promo` INT(11) NULL AFTER `promos_per_email`,
ADD COLUMN `b2b_promo` INT(11) NULL AFTER `network_promo`,
ADD COLUMN `promos_promised` INT(11) NULL AFTER `b2b_promo`;

CREATE TABLE `sevence`.`working_ep_dist` (
  `working_ep_dist` INT(11) NOT NULL AUTO_INCREMENT,
  `org` INT(11) NULL,
  `network_org` INT(11) NULL,
  `email_percentage` DECIMAL(9,4) NULL,
  `promo_allocation` INT(11) NULL,
  `starred_percentage` INT(11) NULL,
  `starred_allocation` INT(11) NULL,
  `total_allocation` INT(11) NULL,
  `adjusted_allocation` INT(11) NULL,
  `promo_count` INT(11) NULL,
  PRIMARY KEY (`working_ep_dist`));

INSERT INTO `sevence`.`org_parm` (`org`, `type`, `parm`, `value`) VALUES ('409', 'NetworkDistributionPromo', 'min_promos_per_email', '6');

ALTER TABLE `sevence`.`working_ep_org_client` 
ADD COLUMN `process_status` INT(1) NULL AFTER `org_timezone`; -- added as indicator if this org_client is already processed for network promo
#DCS 07.31.2015 M2908, M2909: Changes to email promo distribution
#7.30.15 UPDATE END

#7.31.15 UPDATE BEGIN
ALTER TABLE `sevence`.`bt_referral` ADD COLUMN `affiliate` INT(11) NULL  AFTER `active` , 
  ADD CONSTRAINT `fk_affiliate`
  FOREIGN KEY (`affiliate` )
  REFERENCES `sevence`.`affiliate` (`affiliate` )
  ON DELETE NO ACTION
  ON UPDATE NO ACTION
, ADD INDEX `fk_affiliate_idx` (`affiliate` ASC) ;
#RC 07.29.2015 M2907: More fun with bt_referrals

ALTER TABLE `sevence`.`promo_email_queue` 
ADD COLUMN `template` VARCHAR(30) NULL COMMENT '' AFTER `org`;
#KA 07.24.2015 M2910: changes to email_promo_queue and email_promo_queue_process

INSERT INTO `sevence`.`org_parm` (`org`, `type`, `parm`, `value`) VALUES ('409', 'kiosk_app', 'version', '1');
#KA 07.29.2015 M2918: We need to track and retrieve the current version of the kiosk app

ALTER TABLE `sevence`.`working_ep_org`
DROP COLUMN `promo_count`;
#DCS 07.31.2015 M2908, M2909: Drop promo_count since no longer used

ALTER TABLE `sevence`.`working_ep_dist` 
ADD COLUMN `network_allocation_percentage` DECIMAL(9,4) NULL AFTER `total_allocation`;
#DCS 07.31.2015 M2908, M2909: Add column for allocation percentage within the network
#7.31.15 UPDATE END 

#8.4.15 UPDATE BEGIN
ALTER TABLE `sevence`.`working_ep_dist` 
ADD COLUMN `bt_network` INT(11) NULL AFTER `network_org`;
#DCS 08.04.2015 Add bt_network to working_ep_dist
#8.4.15 UPDATE END

#8.13.15 UPDATE BEGIN
ALTER TABLE `sevence`.`promo_email_summary` DROP COLUMN `month` , CHANGE COLUMN `week_of_month` `week_of_year` INT(11) NULL DEFAULT NULL  ;
ALTER TABLE `sevence`.`summary_network_promo` DROP COLUMN `month` , CHANGE COLUMN `week_of_month` `week_of_year` INT(5) NULL DEFAULT '0'  ;
ALTER TABLE `sevence`.`summary_network_performance` DROP COLUMN `month` , CHANGE COLUMN `week_of_month` `week_of_year` INT(11) NULL DEFAULT NULL  ;
ALTER TABLE `sevence`.`summary_coupon_generated` DROP COLUMN `month` , CHANGE COLUMN `week_of_month` `week_of_year` INT(5) NULL DEFAULT '0'  ;
#RC 07.21.2015 M2858: org level promo performance reporting


ALTER TABLE `sevence`.`working_ep_dist` 
CHANGE COLUMN `email_percentage` `email_percentage` DECIMAL(9,4) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `promo_allocation` `promo_allocation` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `starred_percentage` `starred_percentage` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `starred_allocation` `starred_allocation` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `total_allocation` `total_allocation` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `network_allocation_percentage` `network_allocation_percentage` DECIMAL(9,4) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `adjusted_allocation` `adjusted_allocation` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `promo_count` `promo_count` INT(11) NOT NULL DEFAULT 0 ;

ALTER TABLE `sevence`.`working_ep_org` 
CHANGE COLUMN `email_count` `email_count` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `promos_per_email` `promos_per_email` INT(11) NOT NULL DEFAULT 0 ,
CHANGE COLUMN `promos_promised` `promos_promised` INT(11) NOT NULL DEFAULT 0 ;

ALTER TABLE `sevence`.`working_ep_org_client` 
CHANGE COLUMN `process_status` `process_status` INT(1) NOT NULL DEFAULT 0 ;
#DCS 08.06.2015 Change to default value 0 fields that involves computation
#8.13.15 UPDATE END

#8.27.15 UPDATE BEGIN
ALTER TABLE `sevence`.`gift_design` 
ADD COLUMN `value_border` TINYINT(1) NULL DEFAULT 1 COMMENT '' AFTER `value_pos`,
ADD COLUMN `message_border` TINYINT(1) NULL DEFAULT 1 COMMENT '' AFTER `message_pos`;
#KA 08.27.2015 M2971: GC Design Message text box
#8.27.15 UPDATE END

#9.10.15 UPDATE BEGIN
UPDATE `sevence`.`gift_screen` SET `css`='/*  HTML5 Reset  --------------------------------------------- */  article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:\"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=\"button\"],input[type=\"reset\"],input[type=\"submit\"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type=\"checkbox\"],input[type=\"radio\"]{box-sizing:border-box;padding:0}input[type=\"search\"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}    /* Box Sizing  --------------------------------------------- */  *, input[type=\"search\"] {  	-webkit-box-sizing: border-box;  	-moz-box-sizing:    border-box;  	box-sizing:         border-box;  }    /* Float Clearing  --------------------------------------------- */  .archive-pagination:before,  .clearfix:before,  .entry:before,  .entry-pagination:before,  .footer-widgets:before,  .nav-primary:before,  .nav-secondary:before,  .site-container:before,  .site-footer:before,  .site-header:before,  .site-inner:before,  .wrap:before {  	content: \" \";  	display: table;  }    .archive-pagination:after,  .clearfix:after,  .entry:after,  .entry-pagination:after,  .footer-widgets:after,  .nav-primary:after,  .nav-secondary:after,  .site-container:after,  .site-footer:after,  .site-header:after,  .site-inner:after,  .wrap:after {  	clear: both;  	content: \" \";  	display: table;  }      /* Typographical Elements  --------------------------------------------- */  body, html {    height: 100%;  }    html {  	font-size: 62.5%; /* 10px browser default */  }    body {  	background: #EEE;  	color: #414142;  	font-family: \'Helvetica Neue\', Helvetica, Arial, sans-serif;  	font-size: 18px;  	font-weight: 300;  	line-height: normal;  }    p {  	line-height: 1.4;  	margin: 0 0 1em;  }      /* Links  --------------------------------------------- */  a,  button,  input:focus,  input[type=\"button\"],  input[type=\"reset\"],  input[type=\"submit\"],  textarea:focus,  .button {  	-webkit-transition: all 0.1s ease-in-out;  	-moz-transition:    all 0.1s ease-in-out;  	-ms-transition:     all 0.1s ease-in-out;  	-o-transition:      all 0.1s ease-in-out;  	transition:         all 0.1s ease-in-out;  }    a {  	color: #cd2032;  }    a:hover {  	text-decoration: none;  }    .row.red a {  	color: #FFF;  }      /* Headings  --------------------------------------------- */  h1, h2, h3, h4 {  	font-weight: normal;  	margin: 0 0 10px;  }    h1#page-title {  	font-size: 30px;  	font-weight: bold;  	text-align: center;  }    /* Forms  --------------------------------------------- */  ::-webkit-input-placeholder {  	color: #414142;  }  :-moz-placeholder { /* Mozilla Firefox 4 to 18 */  	color: #414142;  }  ::-moz-placeholder { /* Mozilla Firefox 19+ */  	color: #414142;  }  :-ms-input-placeholder { /* Internet Explorer 10+ */  	color: #414142;  }    input[type=\"text\"], input[type=\"email\"], input[type=\"submit\"], textarea {      border: 1px solid #ABA8A8;      box-shadow: inset 0 0 2px #EEE;      color: #414142;      float: left;      font-size: 0.9em;      height: 42px;      margin: 0;      padding: .5em 1em;      width: 270px;  }    input[type=\"submit\"], #control {  	background: #CD2032;  	border: 0;  	color: #FFF;  	float: right;  	font-size: 1em;  	width: 132px;  }    textarea {  	font-size: .8em;  	height: 90px;  	padding: 1em;  	width: 100%;  }    /* Containers & Rows  --------------------------------------------- */  #wrapper {  	height: 100%;  	margin: 0 auto;  	max-width: 600px;  	width: 100%;  }    #container {  	background: #D8D0C5;  	border: 4px solid #414142;  	border-top: 0;  	float: left;  	font-size: 1em;  	width: 100%;  }    .header.row {  	background-color: boomtag{background_container};  	background-size: 100%;  	border-bottom:0px;  	padding-bottom: 2em;          padding-top: 1.4em;  }    .header img {  	display: block;  	margin: 0 auto;  	max-width: 100%;  }    .game p {  	font-size: .9em;  	margin: .5em 0 1em;  	text-align: center;  }    .game p:last-child {  	margin-bottom: 0;  }    .row {  	float: left;  	padding: 2em;  	width: 100%;  }      .row.copyright {  	border: 0;  	border-top: 1px solid #a1a1a1;  	font-size: .7em;  	padding: 1em;  	text-align: center;  }    .row.copyright p {  	margin-bottom: 0;  }    .inner {  	margin: 0 auto;  	max-width: 408px;  	width: 100%;  }    .row.white {  	color: #cd2032;  }    .row.gray {  	background: #f1f1f1;  }    .row.dark-gray {  	background: #aba8a8;  }    .row.dark-gray p {  	margin-bottom: 0;  }    .row.white h1, .row.white h2 {  	color: #414142;  }    .row.red {  	background: #cd2032;  	color: #FFF;  }    .box {      float: left;      margin: 1em 0;      width: 100%;  }    .one-third {  	float: left;  	margin-left: 2.564102564102564%;  	width: 31.623931623931625%;  }    .first {  	margin-left: 0;  	padding-top: 0;  }    .stars {  	float: left;  	margin-bottom: 1em;  	text-align: center;  	width: 100%;  }    .social-media a, .footer a {  	text-decoration: none;  }    .social-media img {  	margin-right: .8em;  }    .social-media img:hover {  	opacity: .7;  }    .footer {  	font-size: .75em;  	padding: 1em;  }    .footer p {  	margin: 0;  	padding: 0;  }    .footer span {  	margin-right: 1em;  }    .footer a {  	color: #414142;  }    .footer a:hover {  	text-decoration: underline;  }    .one-third-container:after,  #low-rating:after{  	content: \".\";  	display: block;  	clear: both;  	visibility: hidden;  	line-height: 0;  	height: 0;  }     .one-third-container,  #low-rating{  	display: inline-block;  }     html[xmlns] .one-third-container,  html[xmlns] #low-rating{  	display: block;  }     * html .one-third-container,  * html #low-rating{   	height: 1%;  }      .one-third-container,  #low-rating{      display: block;  }  /* Slot Machine  --------------------------------------------- */  .row.slotmachine {  	background: url(boomtag{boomtime_path}/img/jslot_images/tinpot-image.jpg) no-repeat center center #FFF;  	background-size: 100%;  	position: relative;  }    .container {  	float: left;  	margin:0 auto;  	position: relative;  	text-align: center;  	width: 100%;  }    .slot-wrapper {  	 display: block;  	 margin: 0 auto;  	 text-align: center;  }    .slot {  	background:url(boomtag{boomtime_path}/img/jslot_images/reel_normal_transparent_white.png) repeat-y 0 4px;      border: 3px solid #3a3a3c;      box-shadow: 0 0 6px #333 inset;      display: inline-block;      height: 154px;  	-webkit-transition: background-image .8s ease-in-out;  	-moz-transition: background-image .8s ease-in-out;  	-ms-transition: background-image .8s ease-in-out;  	-o-transition: background-image .8s ease-in-out;  	transition: background-image .8s ease-in-out;      width: 132px;  }    .motion {  	background-image:url(boomtag{boomtime_path}/img/jslot_images/reel_blur_transparent_white.png) #D8D0C5;  }    button {      cursor: pointer;      display: block;      font-size: 16px;      height: 33px;      margin: 20px auto;      width: 138px;  }    #result {      font-weight: bold;      margin: 20px 0;  }    #jackpot {  	background: rgba(255, 255, 255, .5);      color: #414142;      display: none;      float: left;      font-weight: 400;      margin: 0 auto;      max-width: 408px;      min-height: 155px;      padding: 1em 2em 0;      position: absolute;      top: auto; left: 0; right: 0;      text-align: center;      vertical-align: middle;      width: 100%;      z-index: 10;  }  }    #jackpot .wrapper {  	/*border: 5px solid #FFF;  	margin: 1em;*/  	padding: 1em;  }    #jackpot h1 {  	color: #CD2032;  }    #jackpot p {  	margin-bottom: 0;  }    #jackpot p + p {  	margin-top: 0;  }    .clear {  	clear: both;  }      /* Media Queries  --------------------------------------------- */      /* HD/Retina CSS */  @media  only screen and (-webkit-min-device-pixel-ratio: 1.25),  only screen and ( min--moz-device-pixel-ratio: 1.25),  only screen and ( -o-min-device-pixel-ratio: 1.25/1),  only screen and ( min-device-pixel-ratio: 1.25),  only screen and ( min-resolution: 200dpi),  only screen and ( min-resolution: 1.25dppx){      #wrapper {          max-width: 100%;          width: 100%;      }            #container{          border:none;      }  }      /* iPads (portrait and landscape) ----------- */  @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {  	#wrapper {  		max-width: 100%;  	}  	  	#container {  		border: 0;  		min-width: 100%;  	}  }    @media screen and (max-width: 650px) {  	#wrapper {  		max-width: 100%;  	}  	  	#container {  		border: 0;  		min-width: 100%;  	}  }    @media screen and (max-width: 485px) {  	h1#page-title {  		font-size: 31px;  	}  	  	.row {  		padding: 2em 1em;  	}  	  	.inner {  		max-width: 341px;  	}  	  	input[type=\"submit\"], #control {  		width: 110px;  	}  	  	input[type=\"email\"] {  		width: 224px;  	}  	  	.slot {  		background-size: 104px 1730px;  		height: 128px;  		width: 110px;  	}  	  	#jackpot {  		top: 22px;  	}  	  	#jackpot p {  		line-height: normal;  	}  	  	#jackpot p:last-child {  	    line-height: 15px;  	    margin-top: 5px;  	}  	  	textarea {  		font-size: .72em;  		height: 130px;  	}  }    @media screen and (max-width: 380px) {  	.inner {  		width: 282px;  	}  	  	input[type=\"submit\"], #control {  		width: 90px;  	}  	  	input[type=\"email\"] {  		width: 186px;  	}  	  	.slot {  		background-size: 84px 1400px;  		height: 105px;  		width: 90px;  	}  	  	#jackpot {  		font-size: .85em;  		min-height: inherit;  		padding-bottom: .5em;  	}  }  @media screen and (max-width: 340px) {  	p {  		font-size: 16px;  	}  	  	.one-third {  		margin-left: 0;  		width: 100%;  	}  	  	.one-third p {  		margin: 0;  	}  	  	.stars img {  		max-width: 40px;  	}  }   @media 	only screen and (-webkit-min-device-pixel-ratio: 1.25), 	only screen and ( min--moz-device-pixel-ratio: 1.25), 	only screen and ( -o-min-device-pixel-ratio: 1.25/1), 	only screen and ( min-device-pixel-ratio: 1.25), 	only screen and ( min-resolution: 200dpi), 	only screen and ( min-resolution: 1.25dppx){ 	   body{ 	       background:{boomtag{background_container}}; 	   } 	} .game{   		min-height: 418px;   	}   	#footer_badge{   		background: url(\"boomtag{boomtime_slot_footer}\") no-repeat scroll right center; 		max-width: 100%; 		width: 100%;   	}    	#terms { 		position:absolute; 		font-family: boomtag{slot_machine_font}; 		color: boomtag{slot_machine_theme}; 		text-decoration: none; 		left:18px; 		top:34%; 		font-size: 1em; 	}  	@media screen 	and (orientation : portrait){ 		#footer_badge{ 			  		background: url(\"boomtag{boomtime_slot_footer}\") no-repeat scroll center bottom; 			  		padding-bottom:20px; 		}  		#terms { 			position: relative; 			top:5px; 			left:0; 		}  		.partner_section { 			margin-top:60px; 		}  		#footer_badge p { 			font-size: 1em; 		} 	} ' WHERE `id`='jslot_main';
UPDATE `sevence`.`gift_screen` SET `css`='body { 			margin:0; 			background: #EEE; 			color: boomtag{theme}; 			font-family: \'Helvetica Neue\', Helvetica, Arial, sans-serif; 			font-size: 18px; 			font-weight: 300; 			line-height: normal; 		}  		p { 			margin:0; 			font-family: boomtag{font}; 		}  		.wrapper { 			height: 100%; 			margin: 0 auto; 			max-width: 600px; 			width: 100%; 		}  		.wrapper .container { 			background: boomtag{background_container}; 			border: 4px solid #414142; 			border-top: 0; 			float: left; 			font-size: 1em; 			width: 100%; 			min-height:652px; 			position: relative; 		}  		.header{ 			 			background-color:boomtag{back_image_url}; 			background-position:center center; 			background-size:cover; 			padding: 1.4em 2em 2em; 			width: 100%; 		}  		*, input[type=\"search\"] { 			-webkit-box-sizing: border-box; 			-moz-box-sizing: border-box; 			box-sizing: border-box; 		}  		.header .logo-container { 			margin: 0 auto; 			max-width: 408px; 			width: 100%; 		}  		.header .logo-container img{ 			display: block; 			margin: 0 auto; 			max-width: 100%; 		}  		.main { 			min-height: 260px; 			margin-top:50px; 		}  		.reward-msg h1 { 			color: boomtag{theme}; 			font-family: boomtag{font}; 		    font-size: 1.7em; 		    text-align: center; 		    margin-top: 0; 			margin-bottom: 10px; 		}  		.reward-msg p { 			color: boomtag{theme}; 		    font-family: boomtag{font}; 		    font-size: 20px; 		    text-align: center; 		}  		.partner_section { 			margin-bottom: 76px; 			margin-top:80px; 		}  		.partner_section h2 { 			margin-bottom:10px; 			color:boomtag{theme}; 			text-align:center; 			font-size: 1.4em; 		}  		.partners { 			margin: 0 auto 0 14%; 			margin-bottom: 21px; 		}  		.partners li{ 			list-style-type: square; 			margin-bottom: 6px; 		}  		.partners li a { 		    color: boomtag{theme};	 		    font-family: boomtag{font}; 		    font-size: 18px; 		    text-decoration: none; 		    width:100%; 		}  		.row.copyright { 			border: 0; 			border-top: 1px solid #a1a1a1; 			font-size: .7em; 			padding: 1em; 			text-align: center; 			position: absolute; 			bottom: 0; 		}  		.row { 			border-bottom: 1px solid #a1a1a1; 			float: left; 			padding: 2em; 			width: 100%; 		}  		#terms { 			position:absolute; 			font-family: boomtag{font}; 			color: boomtag{theme}; 			text-decoration: none; 			left:18px; 			top:29%; 			font-size: 1em; 		}  		#footer_badge{ 	  		background: url(boomtag{boomtime_slot_footer}) no-repeat scroll right center; 			max-width: 100%; 			width: 100%; 	  	}  	  	#footer_badge p{ 	  		line-height: 16px; 	  		color: #414142; 	  	} 		@media screen 		and (orientation : portrait){ 			#footer_badge{ 				  		background: url(\"boomtag{boomtime_slot_footer}\") no-repeat scroll center bottom; 				  		padding-bottom: 20px; 			}  			#terms { 				position: relative; 				top:5px; 				left:0; 			}  			.container { 				min-height: 603px; 			}  			.partner_section { 				margin-top:60px; 				padding-bottom: 15px; 			}   		} 		/* iPads (portrait and landscape) ----------- */ 		@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) { 			.wrapper { 				max-width: 100%; 			} 			 			.container { 				border: 0 !important; 				min-width: 100%; 			} 			 			.partner_section .partners { 				margin-left:10%; 				padding-left:0; 			} 		}  		@media screen and (max-width: 650px) { 			.wrapper { 				max-width: 100%; 			} 			 			.container { 				border: 0 !important; 				min-width: 100%; 			}  			.partners { 				margin-left:auto; 			}  			.partner_section .partners { 				margin: 0 auto 21px 17%; 			} 		}  		@media screen and (max-width: 600px) { 			.partner_section .partners { 				margin: 0 auto 21px 14%; 			} 		}  		@media screen and (max-width: 550px) { 			.partner_section .partners { 				margin: 0 auto 21px 11%; 			} 		}  		@media screen and (max-width: 485px) { 			h1#page-title { 				font-size: 31px; 			} 			 			.row { 				padding: 2em 1em; 			} 			 			.logo-container { 				max-width: 341px; 			}  			.partner_section h2 { 				font-size:1.2em; 			}  			.partner_section .partners { 				margin: 0 auto 21px 11%; 			}  			.partner_section .partners li a { 				font-size:17px; 			} 			 		}  		@media screen and (max-width: 435px) { 			.partner_section .partners { 				margin: 0 auto 21px 7%; 			} 		}  		@media screen and (max-width: 380px) { 			.logo-container { 				width: 282px; 			}  			.partner_section .partners { 				margin: 0 auto 21px 0; 			} 		}  		@media screen and (max-width: 340px) {  			.partner_section h2 { 				font-size:1.1em; 			}  			.partner_section .partners { 				margin-left:10%; 				padding-left:0; 			}  			.partner_section .partners li a { 				font-size:17px; 			} 		}  		@media 		only screen and (-webkit-min-device-pixel-ratio: 1.25), 		only screen and ( min--moz-device-pixel-ratio: 1.25), 		only screen and ( -o-min-device-pixel-ratio: 1.25/1), 		only screen and ( min-device-pixel-ratio: 1.25), 		only screen and ( min-resolution: 200dpi), 		only screen and ( min-resolution: 1.25dppx){ 		   body{ 		       background:boomtag{background_container}; 		   } 		}			' WHERE `id`='jslot_claim';
#RC 08.28.2015 M2974: Slot machine format

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `promo_image` INT(11) NULL DEFAULT NULL COMMENT '' ,
ADD COLUMN `main_image` INT(11) NULL DEFAULT NULL COMMENT '' AFTER `promo_image`,
ADD COLUMN `landing_image` INT(11) NULL DEFAULT NULL COMMENT '' AFTER `main_image`;
  
UPDATE promotion set promo_image=promo_images, main_image=promo_images, landing_image=promo_images;
ALTER TABLE promotion drop promo_images;
ALTER TABLE promotion change promo_image promo_images int(11);
ALTER TABLE promotion change main_image network_image int(11)
#RC 09.02.2015 M2982: Promo images

ALTER TABLE `sevence`.`promotion`
ADD INDEX `fk_main_image_idx` (`promo_images` ASC)  ,
ADD INDEX `fk_network_image_idx` (`network_image` ASC)  ,
ADD INDEX `fk_landing_image_idx` (`landing_image` ASC) ;# 636 rows affected.

ALTER TABLE `sevence`.`promotion` 
ADD CONSTRAINT `fk_main_image`
  FOREIGN KEY (`promo_images`)
  REFERENCES `sevence`.`promo_images` (`promo_images`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_network_image`
  FOREIGN KEY (`network_image`)
  REFERENCES `sevence`.`promo_images` (`promo_images`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_landing_image`
  FOREIGN KEY (`landing_image`)
  REFERENCES `sevence`.`promo_images` (`promo_images`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;# 636 rows affected.

CREATE TABLE `sevence`.`network_email_steps` (
  `file_name` VARCHAR(50) NOT NULL COMMENT '',
  `prof` INT(11) NULL DEFAULT 0 COMMENT '',
  `date_range` VARCHAR(20) NULL COMMENT '',
  `org` INT(11) NULL DEFAULT 0 COMMENT '',
  `start` TINYINT(1) NULL DEFAULT 0 COMMENT '',
  `stop` TINYINT(1) NULL DEFAULT 0 COMMENT '',
  `running` TINYINT(1) NULL DEFAULT 0 COMMENT '',
  `email_addresses` VARCHAR(100) NULL COMMENT '');
INSERT INTO `sevence`.`network_email_steps` (`file_name`) VALUES ('prepare_network_emails'),('get_main_promo_emails'),('distribute_network_emails'),('create_boomtime_samples'),('create_org_samples'),('promo_email_queue');
#KA 09.02.2015 M2977: Automating the Process for sending the network emails
#9.10.15 UPDATE END

#9.15.15 UPDATE BEGIN
ALTER TABLE `sevence`.`org` 
ADD COLUMN `collect` TINYINT(1) NULL DEFAULT '0' COMMENT '' AFTER `wpwebsite`;
#RC 09.11.2015 M2988: New product: Collect
#9.15.15 UPDATE END

#9.25.15 UPDATE BEGIN
ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `event_link` VARCHAR(100) NULL AFTER `landing_image`;
#MT 09.21.2015 M3010: Change to promotion and landing page behavior

ALTER TABLE `sevence`.`network_email_steps` 
ADD COLUMN `start_date` DATE NULL AFTER `date_range`,
ADD COLUMN `end_date` DATE NULL AFTER `start_date`;
#MT 09.23.2015 M2977: Automating the Process for sending the network emails
#9.25.15 UPDATE END

#10.20.15 UPDATE BEGIN
ALTER TABLE `sevence`.`promo_images` 
ADD COLUMN `square_image` TEXT NULL COMMENT '' AFTER `coupon_image`,
ADD COLUMN `sponsor_image` TEXT NULL COMMENT '' AFTER `square_image`;

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `square_image` INT(11) NULL DEFAULT NULL AFTER `landing_image`,
ADD COLUMN `sponsor_image` INT(11) NULL DEFAULT NULL AFTER `square_image`,
ADD INDEX `fk_square_image_idx` (`square_image` ASC),
ADD INDEX `fk_sponsor_image_idx` (`sponsor_image` ASC);
ALTER TABLE `sevence`.`promotion` 
ADD CONSTRAINT `fk_square_image`
  FOREIGN KEY (`square_image`)
  REFERENCES `sevence`.`promo_images` (`promo_images`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_sponsor_image`
  FOREIGN KEY (`sponsor_image`)
  REFERENCES `sevence`.`promo_images` (`promo_images`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#RC 10.09.15 Mantis 3029: promo images

CREATE TABLE `sevence`.`reach_category` (
  `reach_category` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `category` VARCHAR(50) NULL COMMENT '',
  PRIMARY KEY (`reach_category`));

CREATE TABLE `sevence`.`org_category` (
  `org_category` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `org` INT(11) NULL COMMENT '',
  `reach_category` INT(11) NULL COMMENT '',
  PRIMARY KEY (`org_category`),
  INDEX `org_fk_1_idx` (`org` ASC),
  INDEX `reach_category_fk_1_idx` (`reach_category` ASC),
  CONSTRAINT `org_category_fk_1`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `reach_category_fk_1`
    FOREIGN KEY (`reach_category`)
    REFERENCES `sevence`.`reach_category` (`reach_category`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

ALTER TABLE `sevence`.`reach_category` 
ADD COLUMN `jpg_png_image` TEXT NULL COMMENT '' AFTER `category`,
ADD COLUMN `gif_image` TEXT NULL COMMENT '' AFTER `jpg_png_image`;
#RC 10.09.15 Mantis 3027: Org Categories

CREATE TABLE `sevence`.`sponsorships` (
  `sponsorships` INT(11) NOT NULL AUTO_INCREMENT,
  `org` INT(11) NULL,
  `start_date` DATETIME NULL,
  `end_date` DATETIME NULL,
  `type` INT(1) NULL,
  `category` INT(11) NULL,
  PRIMARY KEY (`sponsorships`),
  INDEX `rs_org_idx_idx` (`org` ASC),
  INDEX `rs_category_idx_idx` (`category` ASC),
  CONSTRAINT `rs_org_fk_idx`
  	FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `rs_category_fk_idx`
    FOREIGN KEY (`category`)
    REFERENCES `sevence`.`reach_category` (`reach_category`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#DCS 10.10.09 Mantis 3030: sponsorships

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `rank` INT NULL AFTER `event_link`;
#DCS 10.10.12 Mantis 3028: Promo Rank

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `action` VARCHAR(50) NULL DEFAULT 'Send me the deal' AFTER `rank`;
#DCS 10.10.15 Mantis 3039: Promotion: Action
#UPDATE 10.20.15 UPDATE END;  

#UPDATE 10.21.15 UPDATE BEGIN
CREATE TABLE `sevence`.`house_ads` (
  `house_ads` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `name` VARCHAR(100) NULL COMMENT '',
  `url` TEXT(300) NULL COMMENT '',
  `image` TEXT(300) NULL COMMENT '',
  `start_date` DATETIME NULL COMMENT '',
  `end_date` DATETIME NULL COMMENT '',
  PRIMARY KEY (`house_ads`)  COMMENT '');
  
ALTER TABLE `sevence`.`house_ads` 
CHANGE COLUMN `image` `original_image` TEXT NULL DEFAULT NULL COMMENT '' ,
ADD COLUMN `square_image` TEXT NULL DEFAULT NULL COMMENT '' AFTER `original_image`,
ADD COLUMN `landing_image` TEXT NULL DEFAULT NULL COMMENT '' AFTER `square_image`;
#RC 10.20.15 Mantis 3046: House ads
#UPDATE 10.21.15 UPDATE END;

#UPDATE 11.11.15
CREATE TABLE `sevence`.`social_ads` (
  `social_ads` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `name` VARCHAR(50) NULL COMMENT '',
  `url` TEXT(300) NULL COMMENT '',
  `start_date` DATETIME NULL COMMENT '',
  `end_date` DATETIME NULL COMMENT '',
  PRIMARY KEY (`social_ads`)  COMMENT '');
  
  CREATE TABLE `sevence`.`social_ads_image` (
  `social_ads_image` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `image` VARCHAR(50) NULL COMMENT '',
  `date_uploaded` DATETIME NULL COMMENT '',
  `square_image` TEXT(250) NULL COMMENT '',
  `landing_image` TEXT(250) NULL COMMENT '',
  `social_ads` INT NULL COMMENT '',
  PRIMARY KEY (`social_ads_image`)  COMMENT '',
  INDEX `social_ads_fk_idx` (`social_ads` ASC)  COMMENT '',
  CONSTRAINT `social_ads_fk`
    FOREIGN KEY (`social_ads`)
    REFERENCES `sevence`.`social_ads` (`social_ads`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#RC 10.21.15 Mantis 3045: Social Ads

ALTER TABLE `sevence`.`house_ads` 
ADD COLUMN `rollover_text` TEXT(500) NULL COMMENT '' AFTER `name`;
#RC 10.20.15 Mantis 3046: House ads

ALTER TABLE `sevence`.`social_ads` 
ADD COLUMN `rollover_text` TEXT(500) NULL COMMENT '' AFTER `name`;
#RC 10.21.15 Mantis 3045: Social Ads

CREATE TABLE `sevence`.`org_client_reward` (
  `org_client_reward` INT(11) NOT NULL AUTO_INCREMENT,
  `org_client` INT(11) NOT NULL,
  `date_created` DATETIME NULL,
  `date_completed` DATETIME NULL,
  `punches` VARCHAR(20) NULL,
  PRIMARY KEY (`org_client_reward`),
  INDEX `fk_org_client_idx_idx` (`org_client` ASC),
  CONSTRAINT `fk_org_client_idx`
    FOREIGN KEY (`org_client`)
    REFERENCES `sevence`.`org_client` (`org_client`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);

ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `type` TINYINT(4) NULL DEFAULT 0 AFTER `action`;
#RC 10.23.15 Mantis 3048: Text based rewards program

ALTER TABLE `sevence`.`promotion` 
CHANGE COLUMN `rank` `rank` INT(11) NULL DEFAULT 1 COMMENT '' ;
#MT 11.05.15 Mantis 30301

ALTER TABLE `sevence`.`org` 
ADD COLUMN `engage` TINYINT(1) NULL DEFAULT '0' COMMENT '' AFTER `collect`;
#RC 11.10.15 Mantis 3098: We need an Engage checkbox
#UPDATE 11.11.15

#UPDATE 11.18.15
CREATE TABLE `sevence`.`metro_area` (
  `metro_area` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `subdomain` VARCHAR(50) NULL COMMENT '',
  PRIMARY KEY (`metro_area`)  COMMENT '');

CREATE TABLE `sevence`.`org_metro` (
  `org_metro` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `org` INT(11) NULL COMMENT '',
  `metro` INT(11) NULL COMMENT '',
  PRIMARY KEY (`org_metro`)  COMMENT '',
  INDEX `org_metro_fk_idx` (`org` ASC)  COMMENT '',
  INDEX `metro_org_fk_idx` (`metro` ASC)  COMMENT '',
  CONSTRAINT `org_metro_fk`
    FOREIGN KEY (`org`)
    REFERENCES `sevence`.`org` (`org`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `metro_org_fk`
    FOREIGN KEY (`metro`)
    REFERENCES `sevence`.`metro_area` (`metro_area`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
#RC 11.17.15 Mantis 3113: Metro area and applying it to the mosaic.

CREATE TABLE `sevence`.`house_ads_metro` (
  `house_ads_metro` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `house_ads` INT(11) NULL COMMENT '',
  `metro` INT(11) NULL COMMENT '',
  PRIMARY KEY (`house_ads_metro`)  COMMENT '',
  INDEX `house_ads_fk_idx` (`house_ads` ASC)  COMMENT '',
  INDEX `metro_fk_idx` (`metro` ASC)  COMMENT '',
  CONSTRAINT `house_ads_fk`
    FOREIGN KEY (`house_ads`)
    REFERENCES `sevence`.`house_ads` (`house_ads`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `metro_fk`
    FOREIGN KEY (`metro`)
    REFERENCES `sevence`.`metro_area` (`metro_area`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION);
    
CREATE TABLE `sevence`.`social_ads_metros` (
  `social_ads_metros` INT NOT NULL AUTO_INCREMENT COMMENT '',
  `social_ads` INT(11) NULL COMMENT '',
  `metro` INT(11) NULL COMMENT '',
  PRIMARY KEY (`social_ads_metros`)  COMMENT '');
  
ALTER TABLE `sevence`.`social_ads_metros` 
ADD INDEX `fk_social_ads_idx` (`social_ads` ASC)  COMMENT '',
ADD INDEX `fk_metros_idx` (`metro` ASC)  COMMENT '';
ALTER TABLE `sevence`.`social_ads_metros` 
ADD CONSTRAINT `fk_social_ads`
  FOREIGN KEY (`social_ads`)
  REFERENCES `sevence`.`social_ads` (`social_ads`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `fk_metros`
  FOREIGN KEY (`metro`)
  REFERENCES `sevence`.`metro_area` (`metro_area`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
#RC 11.18.15 Mantis 3119: Add metro to House and Social Ads
#UPDATE 11.17.15

#UPDATE 11.30.15
ALTER TABLE `sevence`.`house_ads` 
ADD COLUMN `optimize_image` TINYINT(1) NULL DEFAULT '0' COMMENT '' AFTER `end_date`;

ALTER TABLE `sevence`.`social_ads_image` 
ADD COLUMN `optimize_image` TINYINT(1) NULL DEFAULT '0' COMMENT '' AFTER `social_ads`;

ALTER TABLE `sevence`.`promo_images` 
ADD COLUMN `optimize_image` TINYINT(1) NULL DEFAULT '0' COMMENT '' AFTER `default`;
#RC 11.24.15 Mantis 3128: Mosaic image size (resolution)
#UPDATE 11.30.15

#UPDATE 12.2.15 BEGIN
ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `mosaic` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '' AFTER `sponsor_image`;

UPDATE promotion SET mosaic = network_promo;
#DCS 12.01.15 Mantis 3146: Add 'mosaic' options to promotions

ALTER TABLE `sevence`.`reach_category` 
ADD COLUMN `b2b_cat` TINYINT(4) NULL COMMENT '' AFTER `gif_image`;
#DCS 12.01.15 Mantis 3150: Special handling for B2B

ALTER TABLE `sevence`.`org` 
ADD COLUMN `mosaic_only` TINYINT(1) NULL DEFAULT '0' COMMENT '' AFTER `engage`;
#RC 12.02.15 Mantis 3144: special handling for bt_referral = mosaic
#UPDATE 12.2.15 END

#Update 12.7.15 BEGIN
ALTER TABLE `sevence`.`network_email_steps` 
ADD COLUMN `account_manager` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '' AFTER `email_addresses`;
#KA 12.01.15 M3145: When sending boomtime samples via network email steps
#UPDATE 12.7.15 END

#UPDATE 12.21.15 BEGIN
ALTER TABLE `sevence`.`promotion` 
ADD COLUMN `delayed_content` TEXT NULL COMMENT '' AFTER `mosaic`;
#RC 12.17.15 Mantis 3182: promotion improvements
#UPDATE 12.21.15 END
