### OOH MANAGEMENT ###
Building a OOH management project based on PHP language & bootstrap 5 for visual & resposiveness control

## STRUCTURE ##
- Project use SQL to store and manage data for rendering, match, join purpose
- Main page index.php, have login/register, logout functions
- Folder config stores everything about the configuration, cache, json if needed
- Folder media stores all images, video, map, etc. that support for the visualization of project
- Folder modules stores all modules, which will be called to main page
- Folder handler stores all handler that manage the function in folder modules

## LOGIC OF WORKING ## 
- Input all data of a format into database file. Admin role can input more element that controlled and seen by admin only (such as buy_cost, profit_loss ...)
- Supplier input data will be the big data source to extract
- The data can extracted to be used in various modules (planning, strategy, benchmark campaigns, competitor overview or event some of address info can be used in mapping using google map api, with tooltip to show clear supplier_name, address, format, size ...)

# MODULES #
Build different modules, each module will handle 1 job:
1. Strategic_Planning: use almost of all source data, selective by admin & staff
2. Competitor_Review: get the data of who is owning which format, mapping it into google map. By each location represent for each format using by comptitor, there will be tooltip when mouseover showing format's image_comp, type, address, size, availability
3. Site_Evaluation: from each format extracted from big data source, there is a button to evaluate. After click, the Evaluation Modal will popup, admin or staff will input the evaluate fields based on current benchmark, then the sum will calculate with formula to give the format's evaluation score and update this into the big data source, field "evaluate_score".
- The benchmark table for creating modal is as captured image:
![alt text](site_evaluate.png)

# DATA FLOW & HANDLE #
1. The main data from supplier will be insert through SQL query. The image of format can be upload by admin or staff by reading the role of user.
2. Roles:
- admin: can GET, POST, PUT, DELETE the extracted data
- staff: can GET, PUT (only update by adding image of format to the current database)
- other: can GET only
+ Wehn register account, all role set to be other
+ For admin & staff role: will adjust on SQL manually by admin

# BIG DATA SOURCE #
The data input for creating big data source is as captured image:
![alt text](image.png)

Or if you cant read it, here is the text pasted:
<th>								
    element	name	define	top action	example	admin	others	note
<body>								
    id	ID	auto incremental			x	x	
    supplier	Supplier Name	select from list drop down	need another module to input more	Prowtech/ Bizman/ Goldsun	x	x	
    type	Type	select from list drop down		Indoor/ Outdoor	x	x	
    format	Format	select from list drop down	need another module to input more	Billboard/ Big LED/ LCD/ Digital Poster	x	x	
    size_x_m	Width (meter)	input meter	need open to 2 decimal	20	x	x	
    size_y_m	Height (meter)	input meter	need open to 2 decimal	10.5	x	x	
    size_x_p	Width (pixel)	input pixel		1920	x	x	
    size_y_y	Height (pixel)	input pixel		1080	x	x	
    image_base	Format Image	upload from button	need handler for this action		x	x	
    pdooh	Programmatic Enable	select from list drop down		Yes/ No	x	x	
    market	Market	input (text)		NAT/ Ho Chi Minh/ Ha Noi/ Hai Phong	x	x	this info will be use with google map api to show on map
    district	District	input (text & number)		Dist. 1/ Tan Binh/ Binh Thanh	x	x	this info will be use with google map api to show on map
    ward	Ward	input (text & number)		26/ 4/ Tam Hiep	x	x	this info will be use with google map api to show on map
    street	Street Name	input (text)		Dien Bien Phu/ CMT8	x	x	this info will be use with google map api to show on map
    street_no	Street Number	input (number)		384/ 2Bis	x	x	this info will be use with google map api to show on map
    supplier_cost	Supplier Cost	input (currency)		 VND 800,000,000 	x	x	
    duration	Duration Cost	input (text & number)		12 months	x	x	
    duration_buy	Duration Buying	input (text & number)		1 hour/day	x	x	provide this if format is Big LED, Digital Poster, other set "Always"
    discount	Discount	input (%)		35%	x	x	
    plan_cost	Plan Cost	input (number)		supplier_cost * (1 - discount)	x	x	
    buy_type	Buying Type	select from list drop down		Buy/ Added Value	x	x	can be NULL
    availability	Availability Time	select date format		Today() or selective date ()	x	x	can be NULL
    current_own	Brand Owning	input (text)		Clear/ Omo/ Sunlight	x	x	can be NULL
    image_comp	Competitor Image	upload from button	need handler for this action		x	x	can be NULL
    evaluate_score	Site Score	update from another module		3.5	x	x	can be NULL
    buy_cost	Buy Cost	input (number)		 VND 400,000,000 	x		 this info only visible and can be added by admin 
    profit_lost	P&L	input (number)		plan_cost - buy_cost	x		 this info only visible and can be added by admin 


