------------------------------------------
------------- DROP TRIGGERS --------------
------------------------------------------

DROP TRIGGER IF EXISTS template_deleted ON templates;
DROP TRIGGER IF EXISTS screen_details_modified ON screen_details;
DROP TRIGGER IF EXISTS group_added ON groups;

------------------------------------------
------------ DROP FUNCTIONS --------------
------------------------------------------
DROP FUNCTION IF EXISTS template_delete();
DROP FUNCTION IF EXISTS screen_update();
DROP FUNCTION IF EXISTS group_insert();

------------------------------------------
-------------- DROP TABLES ---------------
------------------------------------------
DROP TABLE shops;
DROP TABLE screen_events;
DROP TABLE screen_details;
DROP TABLE template_sports;
--DROP TABLE template_markets;
DROP TABLE templates;
DROP TABLE screens;
DROP TABLE groups;
DROP TABLE country_services;
DROP TABLE countries;

------------------------------------------
------------- CREATE TABLES --------------
------------------------------------------
CREATE TABLE templates
(
  id serial NOT NULL,
  name character varying(50),
  code character varying(5),
  type character(1) NOT NULL,
  max_events integer NOT NULL,
  image character varying,
  html character varying,
  css character varying[],
  resources character varying[],
  countries character varying[],
  markets character varying[],
  modified timestamp without time zone,
  CONSTRAINT templates_pkey PRIMARY KEY (id)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE templates
  OWNER TO postgres;
----------------------------------------
CREATE TABLE template_sports
(
  id serial NOT NULL,
  template_id integer NOT NULL,
  sport_id integer NOT NULL,
  "order" integer NOT NULL,
  CONSTRAINT template_sports_pkey PRIMARY KEY (id),
  CONSTRAINT template_id_fkey FOREIGN KEY (template_id)
      REFERENCES templates (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE template_sports
  OWNER TO postgres;
----------------------------------------
/*CREATE TABLE template_markets
(
  id serial NOT NULL,
  template_id integer NOT NULL,
  markettype_id integer NOT NULL,
  description character varying(100),
  "order" integer NOT NULL,
  CONSTRAINT template_markets_pkey PRIMARY KEY (id),
  CONSTRAINT templates_id_fkey FOREIGN KEY (template_id)
      REFERENCES templates (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE template_markets_pkey
  OWNER TO postgres;*/
-----------------------------------------
CREATE TABLE countries
(
  id serial NOT NULL,
  name character varying(64),
  code character varying(2),
  default_language character varying(4),
  published boolean NOT NULL DEFAULT false,
  CONSTRAINT countries_pkey PRIMARY KEY (id),
  CONSTRAINT "UNIQUE_country_code" UNIQUE (code)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE countries
  OWNER TO postgres;
-----------------------------------------
CREATE TABLE country_services
(
  id serial NOT NULL,
  country_id integer NOT NULL,
  content_service character varying,
  publish_services character varying[],
  publish_resources character varying[],
  CONSTRAINT country_services_pkey PRIMARY KEY (id),
  CONSTRAINT countries_id_fkey FOREIGN KEY (country_id)
	REFERENCES countries (id) MATCH SIMPLE
        ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE country_services
  OWNER TO postgres;
-----------------------------------------
CREATE TABLE groups
(
  id serial NOT NULL,
  country_id integer NOT NULL,
  code integer NOT NULL,
  name character varying(64) NOT NULL,
  max_screens integer NOT NULL,
  published boolean NOT NULL DEFAULT false,
  CONSTRAINT groups_pkey PRIMARY KEY (id),
  CONSTRAINT "UNIQUE_group_code" UNIQUE (country_id, code),
  CONSTRAINT countries_id_fkey FOREIGN KEY (country_id)
	REFERENCES countries (id) MATCH SIMPLE
        ON UPDATE NO ACTION ON DELETE NO ACTION
  
)
WITH (
  OIDS=FALSE
);
ALTER TABLE groups
  OWNER TO postgres;
-----------------------------------------
CREATE TABLE shops
(
  id serial NOT NULL,
  group_id integer NOT NULL,
  ctd integer NOT NULL,
  language character varying(3) NOT NULL,
  published boolean NOT NULL DEFAULT false,
  CONSTRAINT shops_pkey PRIMARY KEY (id),
  CONSTRAINT groups_id_fkey FOREIGN KEY (group_id)
      REFERENCES groups (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE shops
  OWNER TO postgres;
-----------------------------------------
CREATE TABLE screens
(
  id serial NOT NULL,
  group_id integer NOT NULL,
  "order" integer NOT NULL,
  is_published boolean DEFAULT false,
  CONSTRAINT screens_pkey PRIMARY KEY (id),
  CONSTRAINT groups_id_fkey FOREIGN KEY (group_id)
      REFERENCES groups (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE screens
  OWNER TO postgres;
-----------------------------------------
CREATE TABLE screen_details
(
  id serial NOT NULL,
  parent_id uuid NOT NULL,
  screen_id integer NOT NULL,
  template_id integer NOT NULL,
  "order" integer NOT NULL,
  rotation_time integer NOT NULL DEFAULT 20,
  startDate timestamp without time zone DEFAULT now(),
  endDate timestamp without time zone DEFAULT now(),
  modified timestamp without time zone DEFAULT now(),
  CONSTRAINT screen_details_pkey PRIMARY KEY (id),
  CONSTRAINT screens_id_fkey FOREIGN KEY (screen_id)
      REFERENCES screens (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT templates_id_fkey FOREIGN KEY (template_id)
      REFERENCES templates (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE screen_details
  OWNER TO postgres;
-----------------------------------------
CREATE TABLE screen_events
(
  id serial NOT NULL,
  screen_detail_id integer NOT NULL,
  event_id integer NOT NULL,
  event_name character varying,
  sport_name character varying,
  "group" integer NOT NULL,
  "order" integer NOT NULL,
  modified timestamp without time zone,
  CONSTRAINT screen_events_pkey PRIMARY KEY (id),
  CONSTRAINT screen_detail_id_fkey FOREIGN KEY (screen_detail_id)
      REFERENCES screen_details (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
  OIDS=FALSE
);
ALTER TABLE screen_events
  OWNER TO postgres;

------------------------------------------  

------------------------------------------
------------ CREATE FUNCTIONS ------------
------------------------------------------

CREATE OR REPLACE FUNCTION template_delete()
  RETURNS trigger AS
$BODY$
DECLARE
      selRecord   RECORD;
BEGIN
        FOR selRecord IN SELECT * FROM screen_details WHERE template_id = OLD.id
		LOOP
			DELETE FROM screen_events WHERE screen_detail_id IN (SELECT id FROM screen_details WHERE id = selRecord.id);
			RAISE NOTICE 'SCREEN EVENTS DELETED';
			DELETE FROM screen_details WHERE id = selRecord.id;
			RAISE NOTICE 'SCREEN DETAILS DELETED';
		END LOOP;
	RETURN OLD;
END;
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION template_delete()
  OWNER TO postgres;
  
  
CREATE OR REPLACE FUNCTION screen_update()
  RETURNS trigger AS
$BODY$
BEGIN
	UPDATE screens SET is_published = false WHERE id = NEW.screen_id;
	RETURN NULL;
END;
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION screen_update()
  OWNER TO postgres;
  

CREATE OR REPLACE FUNCTION group_insert()
  RETURNS trigger AS
$BODY$
BEGIN
	FOR i IN 1..NEW.max_screens LOOP
	    INSERT INTO screens (group_id, "order") values (NEW.id, i);
	END LOOP;
	RETURN NULL;
END;
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100;
ALTER FUNCTION group_insert()
  OWNER TO postgres;

------------------------------------------
------------ CREATE TRIGGERS -------------
------------------------------------------
-- Trigger: template_deleted on templates
CREATE TRIGGER template_deleted
  BEFORE DELETE
  ON templates
  FOR EACH ROW
  EXECUTE PROCEDURE template_delete();
  
-- Trigger: screen_details_modified on screen_details
CREATE TRIGGER screen_details_modified
  AFTER INSERT OR UPDATE
  ON screen_details
  FOR EACH ROW
  EXECUTE PROCEDURE screen_update();
  
-- Trigger: group_added on groups
CREATE TRIGGER group_added
  AFTER INSERT
  ON groups
  FOR EACH ROW
  EXECUTE PROCEDURE group_insert();  
  

------------------------------------------
----------- INSERT MOCK DATA -------------
------------------------------------------

----------- INSERT COUNTRIES -------------

INSERT INTO countries (name, code, default_language) values ('Italy', 'IT', 'IT');
INSERT INTO countries (name, code, default_language) values ('Romania', 'RO', 'RO');
INSERT INTO countries (name, code, default_language) values ('Cyprus', 'CY', 'CY');
INSERT INTO countries (name, code, default_language) values ('Germany', 'DE', 'DE');
INSERT INTO countries (name, code, default_language) values ('Belgium', 'BE', 'NL');
INSERT INTO countries (name, code, default_language) values ('Croatia', 'HR', 'HR');
INSERT INTO countries (name, code, default_language) values ('Denmark', 'DK', 'DA');


----------- INSERT COUNTRIES SERVICES -------------

INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (1, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');
INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (2, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');
INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (3, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');
INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (4, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');
INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (5, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');
INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (6, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');
INSERT INTO country_services (country_id, content_service, publish_services, publish_resources) values (7, 'http://10.101.12.10:20000/', '{"http://10.101.5.96:5000/"}', '{"http://10.101.4.49/tom/ss/publishResource.php"}');

----------- INSERT GROUPS -------------

INSERT INTO groups (country_id, name, code, max_screens) values (1, 'Italy 2', '2', 2);
INSERT INTO groups (country_id, name, code, max_screens) values (1, 'Italy 4', '4', 4);
INSERT INTO groups (country_id, name, code, max_screens) values (1, 'Italy 6', '6', 6);
INSERT INTO groups (country_id, name, code, max_screens) values (1, 'Italy 8', '8', 8);
INSERT INTO groups (country_id, name, code, max_screens) values (2, 'Romania 4', '4', 4);
INSERT INTO groups (country_id, name, code, max_screens) values (2, 'Romania 8', '8', 8);
INSERT INTO groups (country_id, name, code, max_screens) values (3, 'Cyprus', '6', 6);
INSERT INTO groups (country_id, name, code, max_screens) values (3, 'Cyprus', '8', 8);
INSERT INTO groups (country_id, name, code, max_screens) values (4, 'Germany', '6', 6);
INSERT INTO groups (country_id, name, code, max_screens) values (5, 'Belgium', '4', 4);
INSERT INTO groups (country_id, name, code, max_screens) values (6, 'Croatia', '4', 4);
INSERT INTO groups (country_id, name, code, max_screens) values (7, 'Denmark', '8', 8);

----------- INSERT SHOPS -------------
INSERT INTO shops (ctd, group_id, language) values (1002, 1, 'IT');
INSERT INTO shops (ctd, group_id, language) values (1003, 1, 'IT');
INSERT INTO shops (ctd, group_id, language) values (1004, 2, 'IT');
INSERT INTO shops (ctd, group_id, language) values (1234, 10, 'NL');
INSERT INTO shops (ctd, group_id, language) values (4321, 10, 'FR');
INSERT INTO shops (ctd, group_id, language) values (5678, 10, 'NL');

----------- INSERT SCREENS -------------
-- DONE BY TRIGGER


----------- INSERT TEMPLATE -------------
/*1-L01*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match BigMatch (L)', 'L01', 'I', 1, NULL, 'L01_Football_Match_BigMatch.html', '{live_style.css}', '{brand_Footer_Stanleybet.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40004,40052,40006,40053,40009,40054,40007}}', now() );
/*2-L02*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match Qualify (L)', 'L02', 'I', 1, NULL, 'L02_Football_Match_Qualify.html', '{common.css,live_style.css,regular_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40004,40005,40006,40007,40009,40025,40053,40054,40069,40075,40076}}', now() );
/*3-L03*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match ToWinTournament (L)', 'L03', 'I', 1, NULL, 'L03_Football_Match_ToWinTournament.html', '{live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40004,40005,40006,40007,40009,40025,40053,40054,40075,40076}}', now() );
/*4-L04*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match ToQualify BigMatch (L)', 'L04', 'I', 1, NULL, 'L04_Football_Match_ToQualify_BigMatch.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40025,40007,40009,40034,40068,40030,40069,40006}}', now() );
/*5-L05*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match ToWinTournament BigMatch (L)', 'L05', 'I', 1, NULL, 'L05_Football_Match_ToWinTournament_BigMatch.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40025,40007,40009,40034,40068,40030,40069,40006}}', now() );
/*6-L06*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match CardsandCorners (L)', 'L06', 'I', 1, NULL, 'L06_Football_Match_CardsandCorners.html', '{live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40004,40005,40006,40007,40009,40030,40034,40052,40053,40054,40068,40069,40076}}', now() );
/*7-L07*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match ExtraTimeToQualify (L)', 'L07', 'I', 1, NULL, 'L07_Football_Match_ExtraTimeToQualify.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40025,40026,40005,40087,40027,40009,40030,40069,40034,40068,40006,40053}}', now() );
/*8-L08*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match ExtraTimeToWinTournament (L)', 'L08', 'I', 1, NULL, 'L08_Football_Match_ExtraTimeToWinTournament.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40025,40026,40005,40087,40027}}', now() );
/*9-L09*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match NextPlayerToScore (L)', 'L09', 'I', 1, NULL, 'L09_Football_Match_NextPlayerToScore.html', '{common.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40100,40101}}', now() );
/*10-L10*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List MainMarkets[ (L)', 'L10', 'I', 1, NULL, 'L10_Football_List_MainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006}}', now() );
/*11-L11*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Main wHT (L)', 'L11', 'I', 1, NULL, 'L11_Football_List_Main_wHT.html', '{common.css,live_style.css}', '{list_corner.png,list_redcard.png,list_yellowcard.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40004,40006,40009,40053,40054}}', now() );
/*12-L12*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List CardsAndCorners (L)', 'L12', 'I', 1, NULL, 'L12_Football_List_CardsAndCorners.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40122,40123,40121,40029}}', now() );
/*13-L13*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List MatchGoals (L)', 'L13', 'I', 1, NULL, 'L13_Football_List_MatchGoals.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40009,40107,40108,40118}}', now() );
/*14-L14*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List FirstHalf (L)', 'L14', 'I', 1, NULL, 'L14_Football_List_FirstHalf.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40004,40054,40053}}', now() );
/*15-L15*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List FirstHalfCardsAndCorners (L)', 'L15', 'I', 1, NULL, 'L15_Football_List_FirstHalfCardsAndCorners.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40124,40125,40068,40069}}', now() );
/*16-L16*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List FirstHalfGoals (L)', 'L16', 'I', 1, NULL, 'L16_Football_List_FirstHalfGoals.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40104,40105,40106,40074}}', now() );
/*17-L17*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List NextTeamToScore (L)', 'L17', 'I', 1, NULL, 'L17_Football_List_NextTeamToScore.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006}}', now() );
/*18-L18*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List UO (L)', 'L18', 'I', 1, NULL, 'L18_Football_List_UO.html', '{common.css}', '{list_corner.png,list_redcard.png,list_yellowcard.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40005,40030,40034,40052,40068,40069}}', now() );
/*19-L19*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Correct Score (L)', 'L19', 'I', 1, NULL, 'L19_Football_List_CorrectScore.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40007}}', now() );
/*20-L19a*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Correct Score - wHT', 'L19a', 'I', 1, NULL, 'L19a_Football_List_CorrectScore.html', '{live_style.css}', '{list_redcard.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40007,40213}}', now() );
/*21-L20*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List FirstHalfCorrectScore (L)', 'L20', 'I', 1, NULL, 'L20_Football_List_FirstHalfCorrectScore.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40213}}', now() );
/*22-L21*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Tennis Match IndividualMatch (L)', 'L21', 'I', 1, NULL, 'L21_Tennis_Match_IndividualMatch.html', '{live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40083,40215}}', now() );
/*23-L22*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Tennis List MatchMainMarkets (L)', 'L22', 'I', 1, NULL, 'L22_Tennis_List_MatchMainMarkets.html', '{common.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045}}', now() );
/*24-L23*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Tennis List MatchExtraMarkets (L)', 'L23', 'I', 1, NULL, 'L23_Tennis_List_MatchExtraMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40083,40010,40014}}', now() );
/*25-L24*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Tennis List SetMarkets (L)', 'L24', 'I', 1, NULL, 'L24_Tennis_List_SetMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40045,40083,40215,40010}}', now() );
/*26-L25*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Basketball Match MainMatchMarkets (L)', 'L25', 'I', 1, NULL, 'L25_Basketball_Match_MainMatchMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066,40111,40202,40134,40135,40136,40137}}', now() );
/*27-L26*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Basketball List MainMarkets (L)', 'L26', 'I', 1, NULL, 'L26_Basketball_List_MainMarkets.html', '{common.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066}}', now() );
/*28-L27*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Basketball List QuarterMarkets (L)', 'L27', 'I', 1, NULL, 'L26_Basketball_List_MainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40134,40063,40058}}', now() );
/*29-L28*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('IceHockey Match MatchMainMarkets (L)', 'L28', 'I', 1, NULL, 'L28_IceHockey_Match_MatchMainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40006,40009,40024,40102,40103}}', now() );
/*30-L29*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('IceHockey Match ExtraMarkets (L)', 'L29', 'I', 1, NULL, 'L29_IceHockey_Match_ExtraMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40006,40024}}', now() );
/*31-L30*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('IceHockey List MainMarkets (L)', 'L30', 'I', 1, NULL, 'L30_IceHockey_List_MainMarkets.html', '{live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40024}}', now() );
/*32-L31*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('IceHockey List PeriodMarkets (L)', 'L31', 'I', 1, NULL, 'L31_IceHockey_List_PeriodMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40024,40009,40078}}', now() );
/*33-L32*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Futsal Match IndividualMatch (L)', 'L32', 'I', 1, NULL, 'L32_Futsal_Match_IndividualMatch.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40004,40052,40006,40053,40009,40054,40007}}', now() );
/*34-L33*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Handball Match IndividualMatch (L)', 'L33', 'I', 1, NULL, 'L33_Handball_Match_IndividualMatch.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40051,40009,40054,40004,40083,40212,40201}}', now() );
/*35-L34*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Handball List MainMarkets (L)', 'L34', 'I', 1, NULL, 'L34_Handball_List_MainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40051}}', now() );
/*36-L35*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Handball List FirstHalf (L)', 'L35', 'I', 1, NULL, 'L35_Handball_List_FirstHalf.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40004,40054,40083}}', now() );
/*37-L36*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Volleyball Match IndividualMatch (L)', 'L36', 'I', 1, NULL, 'L36_Volleyball_Match_IndividualMatch.html', '{live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40009,40020,40021,40022,40023,40035,40036,40037,40038,40051,40056,40057,40077}}', now() );
/*38-L37*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Volleyball List MainMarkets (L)', 'L37', 'I', 1, NULL, 'L37_Volleyball_List_MainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40009,40035,40036,40037,40038,40051,40057,40077}}', now() );
/*39-L38*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Volleyball List SetMarkets (L)', 'L38', 'I', 1, NULL, 'L38_Volleyball_List_SetMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40077,40009,40051}}', now() );
/*40-L39*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Baseball Match IndividualMatch (L)', 'L39', 'I', 1, NULL, 'L39_Baseball_Match_IndividualMatch.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40017,40097,40096,40019,40018}}', now() );
/*41-L40*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Baseball List MainMarkets (L)', 'L40', 'I', 1, NULL, 'L40_Baseball_List_MainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40017,40019,40018}}', now() );
/*42-L43*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Rugby Match IndividualMatch (L)', 'L43', 'I', 1, NULL, 'L43_Rugby_Match_IndividualMatch.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40051,40009,40132,40133}}', now() );
/*43-L44*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Rugby List MainMarkets (L)', 'L44', 'I', 1, NULL, 'L44_Rugby_List_MainMarkets.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40005,40051}}', now() );
/*44-L45*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('BeachVolleyball Match IndividualMatch (L)', 'L45', 'I', 1, NULL, 'L45_BeachVolleyball_Match_IndividualMatch.html', '{live_style.css}', '{beachvolleyballdot.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40077,40009,40035,40051,40020}}', now() );
/*45-L46*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split Football Tennis (L)', 'L46', 'I', 1, NULL, 'L46_MultiSport_Split_Football_Tennis.html', '{live_style.css}', '{tieBreak.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006,40004,40054,40053,1,1,1,1,1,1},{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045}}', now() );
/*46-L47*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split FootballBasketball (L)', 'L47', 'I', 1, NULL, 'L47_MultiSport_Split_FootballBasketball.html', '{live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006,40004,40054,40053,1,1,1,1,1},{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066}}', now() );
/*47-L48*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split FootballVolleyball (L)', 'L48', 'I', 1, NULL, 'L48_MultiSport_Split_FootballVolleyball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006,40004,40054,40053,1,1,1,1,1,1,1,1},{40001,40009,40035,40036,40037,40038,40051,40057,40077,1,1,1,1,1}}', now() );
/*48-L49*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split FootballIceHockey (L)', 'L49', 'I', 1, NULL, 'L49_MultiSport_Split_FootballIceHockey.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006,40004,40054,40053},{40000,40024,40009,1,1,1}}', now() );
/*49-L50*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split FootballHandball (L)', 'L50', 'I', 1, NULL, 'L50_MultiSport_Split_FootballHandball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40009,40006,40004,40054,40053},{40000,40009,40051,40004,40054,1}}', now() );
/*50-L51*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split TennisBasketball (L)', 'L51', 'I', 1, NULL, 'L51_MultiSport_Split_TennisBasketball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045},{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066,1}}', now() );
/*51-L52*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split TennisVolleyball (L)', 'L52', 'I', 1, NULL, 'L52_MultiSport_Split_TennisVolleyball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045,1},{40001,40009,40020,40021,40022,40023,40035,40036,40037,40038,40051,40056,40057}}', now() );
/*52-L53*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split TennisIceHockey (L)', 'L53', 'I', 1, NULL, 'L53_MultiSport_Split_TennisIceHockey.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045},{40000,40024,40009,1,1,1,1,1,1,1,1,1}}', now() );
/*53-L54*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split Tennis Handball (L)', 'L54', 'I', 1, NULL, 'L54_MultiSport_Split_Tennis_Handball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40010,40011,40012,40013,40014,40015,40041,40042,40043,40044,40045},{40000,40009,40051,40004,40054,1,1,1,1,1,1,1}}', now() );
/*54-L55*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split BasketballVolleyball (L)', 'L55', 'I', 1, NULL, 'L55_MultiSport_Split_BasketballVolleyball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066},{40001,40009,40035,40036,40037,40038,40051,40057,1,1,1}}', now() );
/*55-L56*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split BasketballIceHockey (L)', 'L56', 'I', 1, NULL, 'L56_MultiSport_Split_BasketballIceHockey.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066},{40000,40024,40009,1,1,1,1,1,1,1,1}}', now() );
/*56-L57*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split BasketballHandball (L)', 'L57', 'I', 1, NULL, 'L57_MultiSport_Split_BasketballHandball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40018,40019,40058,40059,40060,40061,40063,40064,40065,40066},{40000,40009,40051,40004,40054,1,1,1,1,1,1}}', now() );
/*57-L58*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split VolleyballIceHockey (L)', 'L58', 'I', 1, NULL, 'L58_MultiSport_Split_VolleyballIceHockey.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40009,40020,40021,40022,40023,40035,40036,40037,40038,40051},{40000,40024,40009,1,1,1,1,1,1,1,1}}', now() );
/*58-L59*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split VolleyballHandball (L)', 'L59', 'I', 1, NULL, 'L59_MultiSport_Split_VolleyballHandball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40001,40009,40020,40021,40022,40023,40035,40036,40037,40038,40051},{40000,40009,40051,40004,40054,1,1,1,1,1,1}}', now() );
/*59-L60*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('MultiSport Split IceHockeyHandball (L)', 'L60', 'I', 1, NULL, 'L60_MultiSport_Split_IceHockeyHandball.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40000,40024,40009,1,1},{40000,40009,40051,40004,40054}}', now() );
/*60-L61*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('AmericanFootball Match Main (L)', 'L61', 'I', 1, NULL, 'L61_AmericanFootball_Match_Main.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40111,40054,40018,40132,40133,40054}}', now() );
/*61-L62*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('AmericanFootball List Main (L)', 'L62', 'I', 1, NULL, 'L62_AmericanFootball_List_Main.html', '{common.css,live_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{40111,40018,40019}}', now() );
/*62-NL01*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match A-Match1(NL)', 'NL01', 'R', 1, NULL, 'NL01_Football_Match_A-Match1.html', '{common.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001,30003,30006,30007,30008,30009,30011,30017,30018,30019,30020,30080}}', now() );
/*63-NL02*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match A-Match1 Italy (NL)', 'NL02', 'R', 1, NULL, 'NL02_Football_Match_A-Match1Italy.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001,30003,30006,30007,30010,30011,30017,30018,30019,30020,30080,30060,30061}}', now() );
/*64-NL03*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football Match A-Match1 5Mkts(NL)', 'NL03', 'R', 1, NULL, 'NL03_Football_Match_A-Match1_5Mkts.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001,30003,30011,30018}}', now() );
/*65-NL04*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Main(NL)', 'NL04', 'R', 1, NULL, 'NL04_Football_List_Main.html', '{common.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001,30018}}', now() );
/*66-NL05*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Alternative(NL)', 'NL05', 'R', 1, NULL, 'NL05_Football_List_Alternative.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30003,30011}}', now() );
/*67-NL06*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List CorrectScore(NL)', 'NL06', 'R', 1, NULL, 'NL06_Football_List_CorrectScore.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30006}}', now() );
/*68-NL07*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Goalscorer (NL)', 'NL07', 'R', 1, NULL, 'NL07_Football_List_Goalscorer.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30027,30028,30029}}', now() );
/*69-NL08a*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Antepost W (NL)', 'NL08a', 'R', 1, NULL, 'NL08a_Football_List_AntepostW.html', '{regular_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*70-NL08b*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Football List Antepost W&P (NL)', 'NL08b', 'R', 1, NULL, 'NL08b_Football_List_Antepost_W&P.html', '{regular_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*71-NL09*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('3SetMatch(NL)', 'NL09', 'R', 1, NULL, 'NL09_Tennis_Match_3Set.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022,30048,30049,30033}}', now() );
/*72-NL10*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('5SetMatch(NL)', 'NL10', 'R', 1, NULL, 'NL10_Tennis_Match_5Set.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022,30048,30049,30034}}', now() );
/*73-NL11*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('TennisList3Set(NL)', 'NL11', 'R', 1, NULL, 'NL11_TennisList3Set.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022,30033}}', now() );
/*74-NL12*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('TennisList5Set(NL)', 'NL12', 'R', 1, NULL, 'NL12_TennisList5Set.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022,30034}}', now() );
/*75-NL13a*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Tennis Antepost W (NL)', 'NL13a', 'R', 1, NULL, 'NL13a_Tennis_Antepost_W.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*76-NL13b*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Tennis Antepost W&P (NL)', 'NL13b', 'R', 1, NULL, 'NL13b_Tennis_Antepost_W&P.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*77-NL15*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('AmericanFootball List AmericanFootball(NL)', 'NL15', 'R', 1, NULL, 'NL15_AmericanFootball_List_AmericanFootball', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30024}}', now() );
/*78-NL16*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Baseball List Baseball main(NL)', 'NL16', 'R', 1, NULL, 'NL16_Baseball_List_Baseball_main.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022,30043,30042}}', now() );
/*79-NL17*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Basketball Match Basketball Main(NL)', 'NL17', 'R', 1, NULL, 'NL17_Basketball_Match_Basketball_Main.html', '{common.css}', '{bg_1920.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30023,30066,30039,30040,30041}}', now() );
/*80-NL18*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Basketball List Margins(NL)', 'NL18', 'R', 1, NULL, 'NL18_Basketball_List_Margins.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30066,30040,30041}}', now() );
/*81-NL19*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Basketball List MainMatchMarkets[(NL)', 'NL19', 'R', 1, NULL, 'NL19_Basketball_List_MainMatchMarkets.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30023,30043,30039}}', now() );
/*82-NL20*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Boxing Match Boxing[(NL)', 'NL20', 'R', 1, NULL, 'NL20_Boxing_Match_Boxing.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000}}', now() );
/*83-NL21*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Boxing Match Boxing12Rounds(NL)', 'NL21', 'R', 1, NULL, 'NL21_Boxing_Match_Boxing12Rounds.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30021}}', now() );
/*84-NL22*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Cycling List Win (NL)', 'NL22', 'R', 1, NULL, 'NL22_Cycling_List_Win.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*85-NL23*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Cycling List WinAndPlace(NL)', 'NL23', 'R', 1, NULL, 'NL23_Cycling_List_WinAndPlace.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*86-NL24*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES (' Golf List Golf ThreeBall(NL)', 'NL24', 'R', 1, NULL, 'NL24b_Golf_List_Golf_ThreeBall.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000}}', now() );
/*87-NL24*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES (' Golf List Golf TwoBall(NL)', 'NL24', 'R', 1, NULL, 'NL24a_Golf_List_Golf_TwoBall.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000}}', now() );
/*88-NL25*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Golf List Win(NL)', 'NL25', 'R', 1, NULL, 'NL25_Golf_List_Win.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*89-NL26*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Golf List WinAndPlace(NL)', 'NL26', 'R', 1, NULL, 'NL26_Golf_List_WinAndPlace.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*90-NL27*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Formula1 List Race(NL)', 'NL27', 'R', 1, NULL, 'NL27_Formula1_List_Race.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002,10003}}', now() );
/*91-NL28*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Formula1 List Pole(NL)', 'NL28', 'R', 1, NULL, 'NL28_Formula1_List_Pole.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*92-NL29a*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Formula1 List AntePost W(NL)', 'NL29a', 'R', 1, NULL, 'NL29a_Formula1_List_AntePost_W.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*93-NL29b*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Formula1 List AntePost W&P(NL)', 'NL29b', 'R', 1, NULL, 'NL29b_Formula1_List_AntePost_W&P.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*94-NL30*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Formula1 List HeadToHead(NL)', 'NL30', 'R', 1, NULL, 'NL30_Formula1_List_HeadToHead.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30067}}', now() );
/*95-NL31*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Handball Match Handball(NL)', 'NL31', 'R', 1, NULL, 'NL31_Handball_Match_Handball.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001}}', now() );
/*96-NL32*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Handball List Handball(NL)', 'NL32', 'R', 1, NULL, 'NL32_Handball_List_Handball.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001}}', now() );
/*97-NL33*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('IceHockey Match IceHockey(NL)', 'NL33', 'R', 1, NULL, 'NL33_IceHockey_Match_IceHockey.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001,30037,30044,30036}}', now() );
/*98-NL34*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('IceHockey List IceHocke(NL)', 'NL34', 'R', 1, NULL, 'NL34_IceHockey_List_IceHockey.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30001}}', now() );
/*99-NL35*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Miscellaneous List Win(NL)', 'NL35', 'R', 1, NULL, 'NL35_Miscellaneous_List_Win.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*100-NL36*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Miscellaneous List WinAndPlace(NL)', 'NL36', 'R', 1, NULL, 'NL36_Miscellaneous_List_WinAndPlace.html', '{regular_style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*101-NL37*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Motorcycle List HeadToHea(NL)', 'NL37', 'R', 1, NULL, 'NL37_Motorcycle_List_HeadToHead.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30067}}', now() );
/*102-NL38*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Motorcycle List WinAndPlace(NL)', 'NL38', 'R', 1, NULL, 'NL38_Motorcycle_List_WinAndPlace.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*103-NL39a*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Motorcycle List AntePost W(NL)', 'NL39a', 'R', 1, NULL, 'NL39a_Motorcycle_List_AntePost_W.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001}}', now() );
/*104-NL39b*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Motorcycle List AntePost W&P(NL)', 'NL39b', 'R', 1, NULL, 'NL39b_Motorcycle_List_AntePost_W&P.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{10001,10002}}', now() );
/*105-NL40*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Rugby Match Rugb(NL)', 'NL40', 'R', 1, NULL, 'NL40_Rugby_Match_Rugby.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000,30500,30058}}', now() );
/*106-NL41*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Rugby List Rugby(NL)', 'NL41', 'R', 1, NULL, 'NL41_Rugby_List_Rugby.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30000}}', now() );
/*107-NL42*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Rugby List RugbyHandicaps(NL)', 'NL42', 'R', 1, NULL, 'NL42_Rugby_List_RugbyHandicaps.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30500}}', now() );
/*108-NL43*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('volleyball match volleyball(NL)', 'NL43', 'R', 1, NULL, 'NL43_volleyball_match_volleyball.html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022,30055,30051}}', now() );
/*109-NL44*/ INSERT INTO templates (name, code, type, max_events, image, html, css, resources, countries, markets, modified) VALUES ('Volleyball List(NL)', 'NL44', 'R', 1, NULL, 'NL44_Volleyball_List(8).html', '{style.css}', '{1.png}', '{IT,RO,BE,HR,CY,DK,DE}', '{{30022}}', now() );

----------- INSERT TEMPLATE SPORTS -------------

INSERT INTO template_sports (template_id, sport_id, "order") values (1, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (2, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (3, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (4, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (5, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (6, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (7, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (8, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (9, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (10, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (11, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (12, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (13, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (14, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (15, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (16, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (17, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (18, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (19, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (20, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (21, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (22, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (23, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (24, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (25, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (26, 2, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (27, 2, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (28, 2, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (29, 6, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (30, 6, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (31, 6, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (32, 6, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (33, 15, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (34, 16, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (35, 16, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (36, 16, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (37, 18, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (38, 18, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (39, 18, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (40, 1, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (41, 1, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (42, 11, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (43, 11, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (44, 24, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (45, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (45, 10, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (46, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (46, 2, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (47, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (47, 18, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (48, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (48, 6, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (49, 5, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (49, 16, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (50, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (50, 2, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (51, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (51, 18, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (52, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (52, 6, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (53, 10, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (53, 16, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (54, 2, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (54, 18, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (55, 2, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (55, 6, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (56, 2, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (56, 16, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (57, 18, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (57, 6, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (58, 18, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (58, 16, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (59, 6, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (59, 16, 2);
INSERT INTO template_sports (template_id, sport_id, "order") values (60, 8, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (61, 8, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (62, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (63, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (64, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (65, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (66, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (67, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (68, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (69, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (70, 68, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (71, 81, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (72, 81, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (73, 81, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (74, 81, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (75, 81, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (76, 81, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (77, 86, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (78, 62, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (79, 63, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (80, 63, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (81, 63, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (82, 64, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (83, 64, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (84, 66, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (85, 66, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (86, 71, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (87, 71, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (88, 71, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (89, 71, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (90, 69, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (91, 69, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (92, 69, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (93, 69, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (94, 69, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (95, 72, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (96, 72, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (97, 73, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (98, 73, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (99, 76, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (100, 76, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (101, 74, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (102, 74, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (103, 74, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (104, 74, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (105, 77, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (106, 77, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (107, 77, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (108, 82, 1);
INSERT INTO template_sports (template_id, sport_id, "order") values (109, 82, 1);