Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

miechayakorn/BBMProject

Repository files navigation

BBMProject - Condominium

Sitemap

/index หน้าแรก
/ErrorInfo.jsp หน้า 404 - FileNotFound
/Login หน้าLogin
/Register หน้าสมัครสมาชิก
/Activate? หน้าactivatecodeจากemail
/Recovery หน้ากู้รหัสผ่าน
/Room รายละเอียดห้อง
/RemainingRoom จำนวนห้องที่เหลืออยู่
/Search? ค้นหาตาม Size Type Greather_than Less_than
/ShowCart แสดง Room ที่ Add
/Checkout ชำระเงิน
/MyAccount แสดงรายละเอียดข้อมูลของบัญชี
/History ประวัติการซื้อห้อง
/Logout ออกจากระบบ

DB Connection

Database Name: BBMProject
UserName: bbm
Password: bbm

Run sql - Register

Email: bbm@mail.com
Pass: 12345

DROP TABLE HISTORY;
DROP TABLE ROOM;
DROP TABLE CUSTOMER;
DROP TABLE ACCOUNT;
create table account (
email varchar(40) primary key,
password varchar(40) not null,
registerDate timestamp not null,
activateKey varchar(40)not null,
activateDate timestamp);
create table customer (
customerId int NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) primary key,
name varchar(40) not null,
surname varchar(50) not null,
phone varchar(20) not null,
idcard varchar(13) not null,
address varchar(255) not null,
email varchar(40),
FOREIGN KEY (email) REFERENCES account(email));
create table room (
roomNumber int primary key,
floor int not null,
sizeroom varchar(100) not null,
typeroom varchar(1) check (typeroom in ('A','B','C')) not null,
available int check (available in (0,1)) not null,
bedroom int not null,
toilet int not null,
price double not null,
customerId int ,
FOREIGN KEY (customerId) REFERENCES customer(customerId));
create table history (
historyId int NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1) primary key,
roomNumber int not null unique,
price int not null,
purchaseDate timestamp,
customerId int ,
FOREIGN KEY (customerId) REFERENCES customer(customerId),
FOREIGN KEY (roomNumber) REFERENCES room(roomNumber));
INSERT INTO BBM.ACCOUNT (EMAIL, PASSWORD, REGISTERDATE, ACTIVATEKEY, ACTIVATEDATE) 
	VALUES ('bbm@mail.com', '827ccbeea8a706c4c34a16891f84e7b', '2018-11-17 11:12:50.216', '339c60505bb8488', '2018-11-17 11:13:04.48');
INSERT INTO BBM.CUSTOMER ("NAME", SURNAME, PHONE, IDCARD, ADDRESS, EMAIL) 
	VALUES ('BBM', 'Project', '0812345678', '0123123456789', 'บริษัท บีบีเอม คอนโดมิเนียม จำกัด (มหาชน) 126 ถนนประชาอุทิศ แขวงบางมด เขตทุ่งครุ กรุงเทพมหานคร 10140', 'bbm@mail.com');
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (101,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (102,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (103,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (104,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (105,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (106,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (107,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (108,1,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (201,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (202,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (203,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (204,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (205,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (206,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (207,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (208,2,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (301,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (302,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (303,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (304,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (305,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (306,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (307,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (308,3,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (401,4,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (402,4,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (403,4,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (404,4,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (405,4,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (406,4,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (407,4,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (408,4,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (501,5,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (502,5,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (503,5,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (504,5,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (505,5,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (506,5,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (507,5,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (508,5,'24.3 Sq.M','A',0,1,1,1800000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (601,6,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (602,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (603,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (604,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (605,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (606,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (607,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (608,6,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (701,7,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (702,7,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (703,7,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (704,7,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (705,7,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (706,7,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (707,7,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (708,7,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (801,8,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (802,8,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (803,8,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (804,8,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (805,8,'27.1 Sq.M','B',0,1,1,2000000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (806,8,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (807,8,'35 Sq.M','C',0,1,1,2600000,NULL);
INSERT INTO Room(ROOMNUMBER,FLOOR,SIZEROOM,TYPEROOM,AVAILABLE,BEDROOM,TOILET,PRICE,CUSTOMERID) VALUES (808,8,'35 Sq.M','C',0,1,1,2600000,NULL);
<link href="https://fonts.googleapis.com/css?family=Athiti" rel="stylesheet">
font-family: 'Athiti', sans-serif;


MAIN COLOR
#161925 #272838 #23395b #1f487e #3e6990

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published