-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.php
More file actions
53 lines (46 loc) · 1.11 KB
/
install.php
File metadata and controls
53 lines (46 loc) · 1.11 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
52
<?php
define('PUN_ROOT', './');
require 'config.php';
require PUN_ROOT.'include/dblayer/common_db.php';
require PUN_ROOT.'include/functions.php';
require PUN_ROOT.'include/utf8/utf8.php';
if (true)
{
// Start a transaction
$db->start_transaction();
$schema = array(
'FIELDS' => array(
'id' => array(
'datatype' => 'SERIAL',
'allow_null' => false
),
'nodeindex' => array(
'datatype' => 'INT(10) UNSIGNED',
'allow_null' => false,
'default' => '0'
),
'nodetype' => array(
'datatype' => 'INT(10) UNSIGNED',
'allow_null' => false,
'default' => '0'
),
'parentindex' => array(
'datatype' => 'INT(10) UNSIGNED',
'allow_null' => false,
'default' => '0'
),
'label' => array(
'datatype' => 'VARCHAR(255)',
'allow_null' => false,
'default' => '\'\''
),
'message' => array(
'datatype' => 'TEXT',
'allow_null' => false
),
),
'PRIMARY KEY' => array('id')
);
$db->create_table('nodes', $schema) or error('Unable to create nodes table', __FILE__, __LINE__, $db->error());
$db->end_transaction();
}