Mise en route du suivi.
[aidenligne_francais_universite.git] / plugins / forms_1_9_1 / base / forms.php
1 <?php
2 /*
3 * forms
4 * version plug-in de spip_form
5 *
6 * Auteur :
7 * Antoine Pitrou
8 * adaptation en 182e puis plugin par cedric.morin@yterium.com
9 * © 2005,2006 - Distribue sous licence GNU/GPL
10 *
11 */
12 //
13 // Formulaires : inc_serialbase
14 //
15
16 $spip_forms = array(
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",
22 "email" => "text",
23 "champconfirm" => "varchar(255) NOT NULL",
24 "texte" => "text",
25 "maj" => "TIMESTAMP");
26
27 $spip_forms_key = array(
28 "PRIMARY KEY" => "id_form");
29
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");
41
42 $spip_reponses_key = array(
43 "PRIMARY KEY" => "id_reponse",
44 "KEY id_form" => "id_form, date",
45 "KEY date" => "date",
46 "KEY cookie" => "cookie",
47 "KEY id_auteur" => "id_auteur",
48 "KEY statut" => "statut, id_form");
49
50 global $tables_principales;
51 $tables_principales['spip_forms'] = array(
52 'field' => &$spip_forms,
53 'key' => &$spip_forms_key);
54
55 $tables_principales['spip_reponses'] = array(
56 'field' => &$spip_reponses,
57 'key' => &$spip_reponses_key);
58
59 //
60 // Formulaires : inc_aux_base
61 //
62
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");
68
69 $spip_reponses_champs_key = array(
70 "KEY champ" => "champ, id_reponse",
71 "KEY id_reponse" => "id_reponse");
72
73 $tables_principales['spip_reponses_champs'] = array(
74 'field' => &$spip_reponses_champs,
75 'key' => &$spip_reponses_champs_key);
76
77 $spip_forms_articles = array(
78 "id_form" => "BIGINT (21) DEFAULT '0' NOT NULL",
79 "id_article" => "BIGINT (21) DEFAULT '0' NOT NULL");
80
81 $spip_forms_articles_key = array(
82 "KEY id_form" => "id_form",
83 "KEY id_article" => "id_article");
84
85 $tables_principales['spip_forms_articles'] = array(
86 'field' => &$spip_forms_articles,
87 'key' => &$spip_forms_articles_key);
88
89 //-- Relations ----------------------------------------------------
90 global $tables_jointures;
91 $tables_jointures['spip_articles'][] = 'forms_articles';
92 $tables_jointures['spip_forms'][] = 'forms_articles';
93
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';
99
100 ?>