[SPIP] ~maj v2.1.25-->2.1.26
[velocampus/web/www.git] / www / plugins / auto / fullcalendar / base / fullcalendar.php
1 <?php
2
3 /* * * * * * * * * * * * * * * * * * * *
4 *
5 * - FullCalendar pour SPIP -
6 *
7 * Description des tables à créer dans MySQL
8 *
9 * Auteur : Grégory PASCAL - ngombe at gmail dot com
10 * Modifs : 05/04/2011
11 *
12 */
13
14 global $tables_principales;
15
16 /*
17 * spip_fullcalendar_main
18 *
19 * +-----------------+------------+------+-----+---------+----------------+
20 * | Field | Type | Null | Key | Default | Extra |
21 * +-----------------+------------+------+-----+---------+----------------+
22 * | id_fullcalendar | int(11) | NO | PRI | NULL | auto_increment |
23 * | type | varchar(7) | NO | | NULL | |
24 * | nom | text | NO | | NULL | |
25 * +-----------------+------------+------+-----+---------+----------------+
26 */
27
28 $spip_fullcalendar_main = array(
29 "id_fullcalendar" => "BIGINT(21) NOT NULL auto_increment",
30 "type" => "VARCHAR(7) NOT NULL",
31 "nom" => "TEXT NOT NULL"
32 );
33
34 $spip_fullcalendar_key = array(
35 "PRIMARY KEY" => "id_fullcalendar"
36 );
37
38 $tables_principales['spip_fullcalendar_main'] = array(
39 'field' => &$spip_fullcalendar_main,
40 'key' => &$spip_fullcalendar_key
41 );
42
43 /*
44 * spip_fullcalendar_events
45 *
46 * +-----------------+----------+------+-----+---------+----------------+
47 * | Field | Type | Null | Key | Default | Extra |
48 * +-----------------+----------+------+-----+---------+----------------+
49 * | id_event | int(11) | NO | PRI | NULL | auto_increment |
50 * | id_fullcalendar | int(11) | NO | | NULL | |
51 * | id_style | int(11) | NO | | NULL | |
52 * | titre | text | NO | | NULL | |
53 * | lien | text | NO | | NULL | |
54 * | start | datetime | NO | | NULL | |
55 * | end | datetime | NO | | NULL | |
56 * +-----------------+----------+------+-----+---------+----------------+
57 */
58
59 $spip_fullcalendar_events = array(
60 "id_event" => "BIGINT(21) NOT NULL auto_increment",
61 "id_fullcalendar" => "BIGINT(21) NOT NULL",
62 "id_style" => "BIGINT(21) NOT NULL",
63 "titre" => "TEXT NOT NULL",
64 "lien" => "TEXT NOT NULL",
65 "start" => "DATETIME NOT NULL",
66 "end" => "DATETIME NOT NULL"
67 );
68
69 $spip_fullcalendar_events_key = array(
70 "PRIMARY KEY" => "id_event"
71 );
72
73 $tables_principales['spip_fullcalendar_events'] = array(
74 'field' => &$spip_fullcalendar_events,
75 'key' => &$spip_fullcalendar_events_key
76 );
77
78
79 /*
80 * spip_fullcalendar_styles
81 *
82 * +-----------------+------------+------+-----+---------+----------------+
83 * | Field | Type | Null | Key | Default | Extra |
84 * +-----------------+------------+------+-----+---------+----------------+
85 * | id_style | int(11) | NO | PRI | NULL | auto_increment |
86 * | titre | text | NO | | NULL | |
87 * | bordercolor | varchar(7) | NO | | NULL | |
88 * | bgcolor | varchar(7) | NO | | NULL | |
89 * | textcolor | varchar(7) | NO | | NULL | |
90 * +-----------------+------------+------+-----+---------+----------------+
91 */
92
93 $spip_fullcalendar_styles = array(
94 "id_style" => "BIGINT(21) NOT NULL auto_increment",
95 "titre" => "TEXT NOT NULL",
96 "bordercolor" => "VARCHAR(7) NOT NULL",
97 "bgcolor" => "VARCHAR(7) NOT NULL",
98 "textcolor" => "VARCHAR(7) NOT NULL"
99 );
100
101 $spip_fullcalendar_styles_key = array(
102 "PRIMARY KEY" => "id_style"
103 );
104
105 $tables_principales['spip_fullcalendar_styles'] = array(
106 'field' => &$spip_fullcalendar_styles,
107 'key' => &$spip_fullcalendar_styles_key
108 );
109
110 /*
111 function boucle_fullcalendar_dist($id_boucle, &$boucles) {
112 $boucle = &$boucles[$id_boucle];
113 $id_table = $boucle->id_table;
114 $boucle->from[$id_table] = "spip_fullcalendar";
115
116 if (!$GLOBALS['var_preview']) {
117 if (!$boucle->statut) {
118 $boucle->where[]= array("'IN'", "'$id_table.id_fullcalendar'", "''");
119 }
120 }
121 return calculer_boucle($id_boucle, $boucles);
122 }
123 */
124
125 ?>