install.php
changeset 61 d015f5c9b308
parent 47 ae140472d97c
child 71 e1b918eaf69a
equal deleted inserted replaced
60:6ffacb626294 61:d015f5c9b308
   107 	if($dbdsntype == "pgsql")
   107 	if($dbdsntype == "pgsql")
   108 	{
   108 	{
   109 		$sqlusers =	"CREATE TABLE users (
   109 		$sqlusers =	"CREATE TABLE users (
   110 				id SERIAL PRIMARY KEY,
   110 				id SERIAL PRIMARY KEY,
   111 				username varchar(16) NOT NULL,
   111 				username varchar(16) NOT NULL,
   112 				password varchar(255) NOT NULL,
   112 				password varchar(34) NOT NULL,
   113 				fullname varchar(255) NOT NULL,
   113 				fullname varchar(255) NOT NULL,
   114 				email varchar(255) NOT NULL,
   114 				email varchar(255) NOT NULL,
   115 				description text NOT NULL,
   115 				description text NOT NULL,
   116 				level smallint DEFAULT 0,
   116 				level smallint DEFAULT 0,
   117 				active smallint DEFAULT 0
   117 				active smallint DEFAULT 0
   118 				)";
   118 				)";
   119 		$sqlzones =	"CREATE TABLE zones (
   119 		$sqlzones =	"CREATE TABLE zones (
   120 				id SERIAL PRIMARY KEY,
   120 				id SERIAL PRIMARY KEY,
   121 				name varchar(255) NOT NULL,
   121 				domain_id integer NOT NULL,
   122 				owner smallint NOT NULL,
   122 				owner integer NOT NULL,
   123 				comment text NULL
   123 				comment text NULL
   124 				)";
   124 				)";
   125                 $sqlrecowns =   "CREATE TABLE record_owners (
   125                 $sqlrecowns =   "CREATE TABLE record_owners (
   126                                 id SERIAL PRIMARY KEY,
   126                                 id SERIAL PRIMARY KEY,
   127                                 user_id smallint NOT NULL,
   127                                 user_id integer NOT NULL,
   128                                 record_id smallint NOT NULL
   128                                 record_id integer NOT NULL
   129                                 )";
   129                                 )";
   130 	}
   130 	}
   131 
   131 
   132 	if(!empty($_POST['login']) && !empty($_POST['password']) && !empty($_POST['fullname']) && !empty($_POST['email']))
   132 	if(!empty($_POST['login']) && !empty($_POST['password']) && !empty($_POST['fullname']) && !empty($_POST['email']))
   133 	{
   133 	{