blob: ca5f2d609a61526a34b13898f32c76a03c48556e [file] [log] [blame]
Andreu8192d552019-09-22 16:51:39 +02001<?php
2 require '../credentials.php';
3 require '../php/utils.php';
4
5 $dbname = $_GET['dbname'];
6
7 $create = "CREATE TABLE `".$dbname."` (
8 `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
9 `nom` varchar(100) CHARACTER SET utf8 COLLATE utf8_spanish_ci NOT NULL,
10 `curs` tinyint(1) NOT NULL,
11 `grau` tinyint(1) NOT NULL,
12 `quimata` int(11) NOT NULL,
13 `requested` tinyint(1) NOT NULL DEFAULT 0,
14 `mort` tinyint(1) NOT NULL DEFAULT 0,
15 `password` varchar(100) NOT NULL DEFAULT ''
16 )";
17
Andreu04f79ef2019-09-22 18:52:19 +020018 /*
19 CREATE TABLE `morts` (
20 `id` int(11) NOT NULL,
21 `quimatava` int(11) NOT NULL,
22 `assassi` int(11) NOT NULL,
23 `curs` tinyint(1) NOT NULL,
24 `grau` tinyint(1) NOT NULL,
25 `data` date NOT NULL DEFAULT current_timestamp()
26 )
27 */
28
Andreu4b2fbd92019-09-22 22:30:25 +020029 if (query($create)) die("<script>window.location.href = './index.php?dbname=".$dbname."'<script>");
Andreu8192d552019-09-22 16:51:39 +020030?>