4 * version plug-in de spip_form
8 * adaptation en 182e puis plugin par cedric.morin@yterium.com
9 * © 2005,2006 - Distribue sous licence GNU/GPL
13 // Formulaires : inc_serialbase
17 "id_form" => "bigint(21) NOT NULL",
18 "titre" => "varchar(255) NOT NULL",
19 "descriptif" => "text",
20 "sondage" => "varchar(255) NOT NULL",
21 "structure" => "text",
23 "champconfirm" => "varchar(255) NOT NULL",
25 "maj" => "TIMESTAMP");
27 $spip_forms_key = array(
28 "PRIMARY KEY" => "id_form");
30 $spip_reponses = array(
31 "id_reponse" => "bigint(21) NOT NULL",
32 "id_form" => "bigint(21) NOT NULL",
33 "date" => "DATETIME NOT NULL",
34 "ip" => "VARCHAR(255) NOT NULL",
35 "id_auteur" => "bigint(21) NOT NULL",
36 "id_article_export" => "bigint(21) NOT NULL",
37 "url" => "VARCHAR(255) NOT NULL",
38 "statut" => "VARCHAR(255) NOT NULL",
39 "cookie" => "VARCHAR(255) NOT NULL",
40 "maj" => "TIMESTAMP");
42 $spip_reponses_key = array(
43 "PRIMARY KEY" => "id_reponse",
44 "KEY id_form" => "id_form, date",
46 "KEY cookie" => "cookie",
47 "KEY id_auteur" => "id_auteur",
48 "KEY statut" => "statut, id_form");
50 global $tables_principales;
51 $tables_principales['spip_forms'] = array(
52 'field' => &$spip_forms,
53 'key' => &$spip_forms_key);
55 $tables_principales['spip_reponses'] = array(
56 'field' => &$spip_reponses,
57 'key' => &$spip_reponses_key);
60 // Formulaires : inc_aux_base
63 $spip_reponses_champs = array(
64 "id_reponse" => "bigint(21) NOT NULL",
65 "champ" => "varchar(255) NOT NULL",
66 "valeur" => "BLOB NOT NULL",
67 "maj" => "TIMESTAMP");
69 $spip_reponses_champs_key = array(
70 "KEY champ" => "champ, id_reponse",
71 "KEY id_reponse" => "id_reponse");
73 $tables_principales['spip_reponses_champs'] = array(
74 'field' => &$spip_reponses_champs,
75 'key' => &$spip_reponses_champs_key);
77 $spip_forms_articles = array(
78 "id_form" => "BIGINT (21) DEFAULT '0' NOT NULL",
79 "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL");
81 $spip_forms_articles_key = array(
82 "KEY id_form" => "id_form",
83 "KEY id_article" => "id_article");
85 $tables_principales['spip_forms_articles'] = array(
86 'field' => &$spip_forms_articles,
87 'key' => &$spip_forms_articles_key);
89 //-- Relations ----------------------------------------------------
90 global $tables_jointures;
91 $tables_jointures['spip_articles'][] = 'forms_articles';
92 $tables_jointures['spip_forms'][] = 'forms_articles';
94 global $table_des_tables;
95 $table_des_tables['forms']='forms';
96 $table_des_tables['reponses']='reponses';
97 $table_des_tables['reponses_champs']='reponses_champs';
98 $table_des_tables['forms_articles']='forms_articles';