-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmethod.install.php
More file actions
executable file
·52 lines (37 loc) · 1.39 KB
/
method.install.php
File metadata and controls
executable file
·52 lines (37 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
#-------------------------------------------------------------------------
# Module: Volleyballanmeldung
# Version: 0.1
#-------------------------------------------------------------------------
if (!isset($gCms)) exit;
$db = $gCms->GetDb();
$taboptarray = array('mysql' => 'ENGINE=MyISAM');
$dict = NewDataDictionary($db);
$flds = '
id I KEY NOTNULL AUTOINCREMENT,
eventname C(128),
maxteams I
';
$sqlarray = $dict->CreateTableSQL(cms_db_prefix().'module_eventregistration_events', $flds, $taboptarray);
$dict->ExecuteSQLArray($sqlarray);
$db->CreateSequence(cms_db_prefix().'module_eventregistration_events_seq');
$this->CreatePermission('Use EventRegistration', $this->Lang('permission'));
$taboptarray = array(
'mysql' => 'ENGINE=MyISAM',
'constraints' => 'FOREIGN KEY (event_id) REFERENCES '.cms_db_prefix().'module_eventregistration_events (id)'
);
$flds = '
id I KEY NOTNULL AUTOINCREMENT,
teamname C(128),
phone C(32),
mail C(128),
password C(32),
event_id I NOTNULL
';
$sqlarray = $dict->CreateTableSQL(cms_db_prefix().'module_eventregistration_teams', $flds, $taboptarray);
$dict->ExecuteSQLArray($sqlarray);
$db->CreateSequence(cms_db_prefix().'module_eventregistration_teams_seq');
$this->SetPreference('from', 'root@localhost');
$this->SetPreference('fromuser', 'CMS Administrator');
$this->Audit(0, $this->Lang('friendlyname'), $this->Lang('installed', $this->GetVersion()));
?>