@@verze 4 @@files mod_shopassistant mod_shopassistant/base mod_shopassistant/maly @@init if (ShopAssistantController::isAllowed()) { ShopAssistantController::make()->integrateToMenu("Váš prodavač"); } @@main $shopAssistantInstalled = true; @@sql CREATE TABLE `mod_shopassistant` ( `id` int(11) NOT NULL AUTO_INCREMENT, `jmeno` varchar(200) COLLATE utf8_czech_ci NOT NULL, `obrazek` varchar(200) COLLATE utf8_czech_ci NOT NULL, `poradi` tinyint(4) NOT NULL, `aktivni` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; CREATE TABLE `mod_shopassistant_item` ( `id` int(11) NOT NULL AUTO_INCREMENT, `idshopassistant` int(11) NOT NULL, `poradi` tinyint(4) NOT NULL DEFAULT '0', `typ` varchar(20) COLLATE utf8_czech_ci NOT NULL, `text` varchar(200) COLLATE utf8_czech_ci NOT NULL, `text2` varchar(200) COLLATE utf8_czech_ci NOT NULL, PRIMARY KEY (`id`), KEY `idshopassistant` (`idshopassistant`), CONSTRAINT `mod_shopassistant_item_ibfk_2` FOREIGN KEY (`idshopassistant`) REFERENCES `mod_shopassistant` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; @@reflection global $shopAssistantInstalled, $moduly; if (isset($shopAssistantInstalled) and $shopAssistantInstalled) return "ano"; if (!isset($moduly["eshop"])) return "nelze"; return "ne";