diff --git a/src/main/resources/WorkWith/business-data.html b/src/main/resources/WorkWith/business-data.html index 5636d33fa1e858a3986a6dea5e57d5103bef951e..b550c48c926c3faa3e00a506213ba37dfbba9bf1 100644 --- a/src/main/resources/WorkWith/business-data.html +++ b/src/main/resources/WorkWith/business-data.html @@ -5,6 +5,40 @@ <title>Businesses</title> </head> <body> - +<div id="container1"> + <h2>Enter your Business information</h2> + <form action="businesses.php" method="post" id="data"> + <p> + <label for="businessName">Enter your business name</label> + <input type="text" name="business_name" id="businessName"> + </p> + <p> + <label for="address1">Please enter first line of your address</label> + <input type="text" name="address_1" id="address1"> + </p> + <p> + <label for="address2">Please enter second line of your address (optional)</label> + <input type="text" name="address_2" id="address2"> + </p> + <p> + <label for="city">Please enter the City/Town</label> + <input type="text" name="city" id="city"> + </p> + <p> + <label for="county">Please enter you county (optional)</label> + <input type="text" name="county" id="county"> + </p> + <p> + <label for="postcode">Please enter your postcode</label> + <input type="text" name="post_code" id="postcode"> + </p> + <p> + <label for="website">Please enter your website address</label> + <input type="url" name="web_site" id="website"> + </p> + <input type="submit" value="Submit Data"> + </form> +</div> </body> + </html> \ No newline at end of file diff --git a/src/main/resources/WorkWith/businesses.html b/src/main/resources/WorkWith/businesses.html index 32422f1403d8f84d271afd4e17239bddc4427af2..6fd24d7b23c8fda98682c284f6b5de85a007bf8e 100644 --- a/src/main/resources/WorkWith/businesses.html +++ b/src/main/resources/WorkWith/businesses.html @@ -10,7 +10,7 @@ <h1>Compete with Online Retailers</h1> <h1>Drive Footfall to the high street</h1> <h1>Increase Sales</h1> -<p>Businesses please enter here</p><button><a href="local-auth-data.html" id="business">Login</a></button> +<p>Businesses please enter here</p><button><a href="businesses.html" id="business">Login</a></button> </body> <footer th:insert="~{/towns/Templating.html::footer}"></footer> </html> \ No newline at end of file diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index e40208ba343bab8aeb675e792a3566fd0e573028..44a871f463c4dddac08f7c094229f11fb4b9e99e 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -54,4 +54,9 @@ insert into badgeprogress (userID, badgeID, progress) value ('2', '2', '70'); delete from stickerprogress; insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '1', true); insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '3', true); -insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true); \ No newline at end of file +insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true); + +delete from businesses; +insert into businesses ( businessName, address1, address2, city, county, postcode, website) value ( 'Caerphilly Castle', 'Castle Street', '', 'Caerphilly', '', 'CF83 1JD', 'https://cadw.gov.wales/visit/places-to-visit/caerphilly-castle'); +insert into businesses ( businessName, address1, address2, city, county, postcode, website) value ( 'Risca Colliers Institute', 'Grove Road', '', 'Risca', '', 'NP11 6GN', 'https://www.nmrs.org.uk/mines-map/coal-mining-in-the-british-isles/swales/abercarn/risca-colliery/'); +insert into businesses ( businessName, address1, address2, city, county, postcode, website) value ( 'Penarth Esplanade', '7 Pier Buildings', 'Penarth Pier', '', 'CF64 3AU', 'https://www.facebook.com/DecksPenarth/', ''); \ No newline at end of file diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index 92b8d4e0377d6ceeb58aef53b35e946670b6bc62..f6042727963561bae023651a299c79bb74c5fe62 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -57,4 +57,17 @@ create table if not exists stickerProgress userID bigint, stickerID bigint, hasSticker boolean /*Has sticker or not*/ -) engine=InnoDB; \ No newline at end of file +) engine=InnoDB; + +drop table if exists businesses; +create table if not exists businesses +( + businessID bigint auto_increment primary key, + businessName varchar(250), + address1 varchar(250), + address2 varchar(250), + city varchar(100), + county varchar(75), + postcode varchar(15), + website varchar(250) +) engine=InnoDB;