source: spip-zone/_plugins_/assoc/base/init_assoc.php @ 30362

Last change on this file since 30362 was 30362, checked in by sourrisseau@…, 12 years ago
File size: 998 bytes
Line 
1<?php
2/* Creation de la base de donnee */
3
4$sql = "CREATE TABLE IF NOT EXISTS `association` (
5  `cle` int(11) NOT NULL auto_increment,
6  `id` int(11) NOT NULL,
7  `id_lien` int(11) NOT NULL,
8  `type_id` varchar(20) NOT NULL,
9  `type_lien` varchar(20) NOT NULL,
10  `titre` varchar(150) NOT NULL,
11  `descriptif` varchar(255) NOT NULL,
12  `obj_option` varchar(255) NOT NULL,
13  PRIMARY KEY  (`cle`),
14  KEY `id` (`id`),
15  KEY `id_lien` (`id_lien`),
16  KEY `type_id` (`type_id`),
17  KEY `type_lien` (`type_lien`)
18) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;";
19$res = spip_query($sql);
20
21
22/* mise en place des elements/droits pour fast_plugin et spip_ajax  */
23
24include_spip('inc/cfg_config');
25ecrire_config("php::fast_plugin/assoc_admin/plugin","assoc");
26ecrire_config("php::fast_plugin/assoc_admin/statut","admin");
27ecrire_config("php::fast_plugin/assoc_admin/bouton","naviguer,uneimage,association");
28ecrire_config("php::spip_ajax/assoc_admin/statut","admin");
29
30
31?>
Note: See TracBrowser for help on using the repository browser.