|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* extcal module. |
|
4
|
|
|
* |
|
5
|
|
|
* You may not change or alter any portion of this comment or credits |
|
6
|
|
|
* of supporting developers from this source code or any supporting source code |
|
7
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
|
8
|
|
|
* This program is distributed in the hope that it will be useful, |
|
9
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
11
|
|
|
* |
|
12
|
|
|
* @copyright XOOPS Project (https://xoops.org) |
|
13
|
|
|
* @license http://www.fsf.org/copyleft/gpl.html GNU public license |
|
14
|
|
|
* |
|
15
|
|
|
* @since 2.2 |
|
16
|
|
|
* |
|
17
|
|
|
* @author JJDai <http://xoops.kiolo.com> |
|
18
|
|
|
**/ |
|
19
|
|
|
|
|
20
|
|
|
//---------------------------------------------------- |
|
21
|
|
|
class Extcal_2_28 |
|
22
|
|
|
{ |
|
23
|
|
|
//---------------------------------------------------- |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* @param XoopsModule $module |
|
27
|
|
|
* @param $options |
|
28
|
|
|
*/ |
|
29
|
|
|
public function __construct(\XoopsModule $module, $options) |
|
|
|
|
|
|
30
|
|
|
{ |
|
31
|
|
|
global $xoopsDB; |
|
32
|
|
|
|
|
33
|
|
|
$this->addTable_location(); |
|
34
|
|
|
$this->alterTable_event(); |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
//---------------------------------------------------- |
|
38
|
|
|
public function alterTable_event() |
|
39
|
|
|
{ |
|
40
|
|
|
global $xoopsDB; |
|
41
|
|
|
|
|
42
|
|
|
$tbl = $xoopsDB->prefix('extcal_event'); |
|
43
|
|
|
|
|
44
|
|
|
$sql = <<<__sql__ |
|
45
|
|
|
ALTER TABLE `{$tbl}` |
|
46
|
|
|
add `event_organisateur` varchar(255) NOT NULL default '', |
|
47
|
|
|
add `event_picture1` varchar(255) NOT NULL, |
|
48
|
|
|
add `event_picture2` varchar(255) NOT NULL, |
|
49
|
|
|
add `event_price` varchar(255) NOT NULL default '', |
|
50
|
|
|
add `event_location` int(5) NOT NULL DEFAULT '1'; |
|
51
|
|
|
__sql__; |
|
52
|
|
|
|
|
53
|
|
|
$xoopsDB->queryF($sql); |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
//---------------------------------------------------- |
|
57
|
|
|
public function addTable_location() |
|
58
|
|
|
{ |
|
59
|
|
|
global $xoopsDB; |
|
60
|
|
|
|
|
61
|
|
|
$tbl = $xoopsDB->prefix('extcal_location'); |
|
62
|
|
|
|
|
63
|
|
|
$sql = <<<__sql__ |
|
64
|
|
|
CREATE TABLE `{$tbl}` ( |
|
65
|
|
|
`id` int(5) NOT NULL auto_increment, |
|
66
|
|
|
`nom` varchar(255) NOT NULL, |
|
67
|
|
|
`desc` text NOT NULL, |
|
68
|
|
|
`logo` varchar(255) NOT NULL, |
|
69
|
|
|
`categorie` varchar(255) NOT NULL, |
|
70
|
|
|
`adresse` varchar(255) NOT NULL, |
|
71
|
|
|
`adresse2` varchar(255) NOT NULL, |
|
72
|
|
|
`cp` varchar(10) NOT NULL, |
|
73
|
|
|
`ville` varchar(50) NOT NULL, |
|
74
|
|
|
`tel_fixe` varchar(20) NOT NULL, |
|
75
|
|
|
`tel_portable` varchar(20) NOT NULL, |
|
76
|
|
|
`mail` varchar(255) NOT NULL, |
|
77
|
|
|
`site` varchar(255) NOT NULL, |
|
78
|
|
|
`horaires` text NOT NULL, |
|
79
|
|
|
`divers` text NOT NULL, |
|
80
|
|
|
`tarifs` text NOT NULL, |
|
81
|
|
|
`map` text NOT NULL, |
|
82
|
|
|
|
|
83
|
|
|
PRIMARY KEY (`id`) |
|
84
|
|
|
) ENGINE = MYISAM ; |
|
85
|
|
|
__sql__; |
|
86
|
|
|
|
|
87
|
|
|
$xoopsDB->queryF($sql); |
|
88
|
|
|
//--------------------------------------------------- |
|
89
|
|
|
} |
|
90
|
|
|
//----------------------------------------------------------------- |
|
91
|
|
|
} // fin de la classe |
|
92
|
|
|
|
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.