<?php
/**
* Module Prestashop CustomBlocks
*
* @author    Prestacrea
* @copyright Prestacrea
* @license   See PDF documentation
* @website   http://www.prestacrea.com
*/

Configuration::updateValue('CB_RESPONSIVE', 1);

Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'customblocks (`id_block` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY(`id_block`)) ENGINE=MyISAM default CHARSET=utf8');

Db::getInstance()->Execute('CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'customblocks_lang (`id_block` int(10) NOT NULL AUTO_INCREMENT, `id_shop` int(10) unsigned NOT NULL, `id_lang` int(10) NOT NULL, `content` text NOT NULL, `link` varchar(255) NOT NULL, `inhook` varchar(255) NOT NULL, `position` int(10) NOT NULL, `active` int(10) NOT NULL, PRIMARY KEY(`id_lang`, `id_block`)) ENGINE=MyISAM default CHARSET=utf8');

Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks (`id_block`) VALUES ("1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks (`id_block`) VALUES ("2")');

Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("1", "1", "1", "<p><img src=\"modules/customblocks/views/img/front/block_img_1.png\" alt=\"\" width=\"324\" height=\"220\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "1", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("1", "1", "2", "<p><img src=\"modules/customblocks/views/img/front/block_img_1.png\" alt=\"\" width=\"324\" height=\"220\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "1", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("1", "1", "3", "<p><img src=\"modules/customblocks/views/img/front/block_img_1.png\" alt=\"\" width=\"324\" height=\"220\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "1", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("1", "1", "4", "<p><img src=\"modules/customblocks/views/img/front/block_img_1.png\" alt=\"\" width=\"324\" height=\"220\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "1", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("1", "1", "5", "<p><img src=\"modules/customblocks/views/img/front/block_img_1.png\" alt=\"\" width=\"324\" height=\"220\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "1", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("2", "1", "1", "<p><img src=\"modules/customblocks/views/img/front/block_img_2.png\" alt=\"\" width=\"324\" height=\"180\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "2", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("2", "1", "2", "<p><img src=\"modules/customblocks/views/img/front/block_img_2.png\" alt=\"\" width=\"324\" height=\"180\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "2", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("2", "1", "3", "<p><img src=\"modules/customblocks/views/img/front/block_img_2.png\" alt=\"\" width=\"324\" height=\"180\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "2", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("2", "1", "4", "<p><img src=\"modules/customblocks/views/img/front/block_img_2.png\" alt=\"\" width=\"324\" height=\"180\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "2", "1")');
Db::getInstance()->Execute('INSERT IGNORE INTO '._DB_PREFIX_.'customblocks_lang (`id_block`, `id_shop`, `id_lang`, `content`, `link`, `inhook`, `position`, `active`) VALUES ("2", "1", "5", "<p><img src=\"modules/customblocks/views/img/front/block_img_2.png\" alt=\"\" width=\"324\" height=\"180\" /></p><p class=\"title\">CUSTOM BLOCKS</p>", "index.php", "topColumn", "2", "1")');
