Unverified Commit c216e19b authored by ozzy308's avatar ozzy308 Committed by GitHub

Add files via upload

parents
<html>
<head>
<link rel="stylesheet" href="layout.css">
<h1>Old York Hotel</h1>
<nav class="navbar">
<a href="Hotel.html"> Main Page </a>
<a href="Login.html"> Login </a>
<a href="Rent.html"> Apartment Renting </a>
<a href="Clean.html"> Cleaning </a>
<a href="Invoice.html"> Invoice </a>
</nav>
</head>
><h1> Cleaning details: </h1>
<form method = "post" action = "Clean.php">
<label for="nameofstaff"><b>Name of staff</b></label>
<input id="nameofstaff" type="text" placeholder="nameofstaff" name="nameofstaff" required><br>
<label for="roomnumber"><b>Room number</b></label>
<input id="roomnumber" type="integer" placeholder="roomnumber" name="roomnumber" required><br>
<label for="conditionroom"><b>Condition of room</b></label>
<input id="conditionroom" type="text" placeholder="conditionroom" name="conditionroom" required><br>
<label for="date"><b>Date</b></label>
<input id="date" type="date" placeholder="date" name="date" required><br>
<input type="submit" value="enter"><br>
</form>
</html>
\ No newline at end of file
<html>
<?php
$nameofstaff = $_REQUEST ["nameofstaff"];
$roomnumber = $_REQUEST ["roomnumber"];
$conditionroom = $_REQUEST ["conditionroom"];
$date = $_REQUEST ["date"];
$servername = "ysjcs.net";
$username = "aurian.foulner";
$password = "OTSNgDEm5khou71M";
$dbname = "aurianfoulner_Hotel";
$conn = mysqli_connect($servername,$username,$password,$dbname);
$sql = "INSERT INTO Cleaning (nameofstaff, roomnumber, conditionroom, date) VALUES('$nameofstaff', '$roomnumber', $conditionroom', '$date')";
if (mysqli_connect_errno())
{
echo "Failed to connect to the MYSQL server" . mysqli_connect_error();
}
if (mysqli_query($conn,$sql)) {
echo "A new record has been added";
}
mysqli_close($conn);
?>
</html>
<html>
<link rel ="stylecss"type="text/css" href="layout.css">
<title>Old York Hotel</title>
<meta chartset = "UTF-8">
<head>
<link rel="stylesheet" href="layout.css">
<h1>Old York Hotel</h1>
<nav class="navbar">
<a href="Hotel.html"> Main Page </a>
<a href="Login.html"> Login </a>
<a href="Rent.html"> Apartment Renting </a>
<a href="Clean.html"> Cleaning </a>
<a href="Invoice.html"> Invoice </a>
</nav>
</head>
<main>
<h2>
The Old York Hotel
</h2>
<p> Here at the Old York Hotel we offer a variety of different rooms for you to book! Thinking of staying for a couple of nights? Book one of our luxurious hotel room, with a single or double bed, for up to 1 nights!
Wanting to rent long term? We have a new set of apartment building, with minimal renting of one month up to one year!</p>
</main>
</html>
\ No newline at end of file
<html>
<head>
<link rel="stylesheet" href="layout.css">
<h1>Old York Hotel</h1>
<nav class="navbar">
<a href="Hotel.html"> Main Page </a>
<a href="Login.html"> Login </a>
<a href="Rent.html"> Apartment Renting </a>
<a href="Clean.html"> Cleaning </a>
<a href="Invoice.html"> Invoice </a>
</nav>
</head>
<h1> Invoice details: </h1>
<form method = "post" action = "clean.php">
<p> Invoice number: <input type = "text" name = "invoicenumber"/></p>
<p> Rent number: <input type = "integer" name = "rentnumber"/></p>
<p> Rent period: <input type = "integer" name = "rentperiod"/></p>
<p> Payment Due: <input type = "date" name = "paymentdue"/></p>
<p> Room number: <input type = "integer" name = "roomnumber"/></p>
<p> Date Paid: <input type = "date" name = "datepaid"/></p>
<p> Method Of Payment: <input type = "text" name = "methodpayment"/></p>
<input type = "submit" value = "Enter">
</form>
</html>
\ No newline at end of file
<?php
$invoicenumber = $_REQUEST ["invoicenumber"];
$rentnumber= $_REQUEST ["rentnumber"];
$rentperiod = $_REQUEST ["rentperiod"];
$paymentdue = $_REQUEST ["paymentdue"];
$roonumber = $_REQUEST ["roomnumber"];
$datepaid = $_REQUEST ["datepaid"];
$methodpayment = $_REQUEST ["methodpayment"];
$servername = "localhost";
$username = "aurian.foulner";
$password = "OTSNgDEm5khou71M";
$dbname = "aurianfoulner_Hotel";
$conn = mysqli_connect($servername,$username,$password,$dbname);
$sql = "INSERT INTO Invoice (invoicenumber, rentnumber, rentperiod, paymentdue, roomnumber, datepaid, methodpayment) VALUES('$invoicenumber', '$rentnumber', $rentperiod', '$paymentdue', $roomnumber', '$datepaid', '$methodpayment')";
if (mysqli_connect_errno())
{
echo "This has failed to connect to the MYSQL server" . mysqli_connect_error();
}
if (mysqli_query($conn,$sql)) {
echo "A new record has been added";
}
mysqli_close($conn);
?>
<html>
<body>
<?php
$user = $_REQUEST ["user"];
$pass = $_REQUEST ["pass"];
$servername = "localhost";
$username = "aurian.foulner";
$password = "OTSNgDEm5khou71M";
$dbname = "aurianfoulner_Hotel";
$sql = "SELECT * FROM Login where email = '$user' and password = '$pass'";
$conn = mysqli_connect($servername,$username,$password,$dbname);
$result = mysqli_query($conn,$sql);
$count = mysqli_num_rows($result);
if (count > 0){
header("Location: Rent.html");}
else{
header("Location : singup.php");
}
mysqli_close($conn);
?>
</body>
</html>
<html>
<head>
<title> Login page </title>
</head>
<h2> Login here: </h2>
<form method = "post" action = "Logcheck.php">
<label for = "user"> Username </label>
<input id ="user" type = "text" placeholder = "Username" name= "user" required><br>
<label for = "pass"> Password </label>
<input id = "pass" type = "password" placeholder = " Password" name = "pass" required> <br>
<input type = "submit" value = "login">
<a href="./Clean.php"> Cleaning page </a>
</form>
</html>
\ No newline at end of file
<html>
<?php
$user = $_REQUEST['user'];
$pass = $_RREAUEST['pass'];
$servername = "localhost";
$username = "aurian.foulner";
$password = "OTSNgDEm5khou71M";
$dbname = "aurianfoulner_Hotel";
$sql = "INSERT INTO Login (Email, password)VALUES('$user', '$pass')";
$conn = mysqli_connect($servername,$username,$password,$dbname);
if(mysqli_query($conn,$sql)){
echo "New record has been aded";
}
mysqli_close($conn);
?>
</html>
\ No newline at end of file
<html lang="en">
<head>
<link rel="stylesheet" href="layout.css">
<h1>Old York Hotel</h1>
<nav class="navbar">
<a href="Hotel.html"> Main Page </a>
<a href="Login.html"> Login </a>
<a href="Rent.html"> Apartment Renting </a>
<a href="Clean.html"> Cleaning </a>
<a href="Invoice.html"> Invoice </a>
</nav>
</head>
<body>
<h1>Apartment renting</h1>
<div class="rent">
<form method="post" action="Rent.php">
<label for="RentNumber"><b>Rent Number</b></label>
<input id="RentNumber" type="number" placeholder="Rent Number" name="RentNumber" required><br>
<label for="duration"><b>Duration</b></label>
<input id="Duration" type="number" placeholder="Duration" name="Duration" required><br>
<label for="FirstName"><b>Guest First Name</b></label>
<input id="FirstName" type="text" placeholder="First Name" name="First Namr" required><br>
<label for="LastaName"><b>Guest Last Name</b></label>
<input id="LastName" type="text" placeholder="Last Name" name="Last Name" required><br>
<label for="RoomNumber"><b>Room Number</b></label>
<input id="RoomNumber" type="number" placeholder="Room Number" name="RoomNumber" required><br>
<label for="Addres"><b>Address details</b></label>
<input id="Address" type="text" placeholder="Address Details" name="Address" required><br>
<label for="entry"><b>Date Guest Wishes to enter room</b></label>
<input id="entry" type="date" placeholder="Entry" name="entry" required><br>
<label for="exit"><b>Date Guest Wishes to exit room</b></label>
<input id="exit" type="date" placeholder="Exit" name="exit" required><br>
<input type="submit" value="enter"><br>
</form>
</div>
</body>
</html>
\ No newline at end of file
<?php
$rentnumber = $_REQUEST["rentnumber"];
$duration = $_REQUEST["duration"];
$firstname = $_REQUEST["firstname"];
$lastname = $_REQUEST["lastname"];
$roomnumber = $_REQUEST["roomnumber"];
$address = $_REQUEST["address"];
$entrydate = $_REQUEST["entrydate"];
$exitdate = $_REQUEST["exitdate"];
$servername = "localhost";
$username = "aurian.foulner";
$password = "OTSNgDEm5khou71M";
$dbname = "aurianfoulner_Hotel";
$conn = mysqli_connect($servername,$username,$password,$dbname);
$sql="INSERT INTO RentDB(RentNumber, Duration, FirstName, LastName, RoomNumber, Address, EntryDate, ExitDate) VALUES ('$rentnumber','$duration','$firstname','$lastname','$roomnumber','$address','$entrydate','$exitdate')";
if (mysqli_connect_errno())
{
echo "This action has failed to connect to my SQL " . mysqli_connect_error();
}
if (mysqli_query($conn,$sql)) {
echo "Record has been added to the database";
}
mysqli_close($conn);
?>
/* font*/
.text{
font-size;20px;
padding-left: 20px;}
/* Nayagation bar */
.navbar {
overflow: hidden;
background-color: lightslategray;
}
.navbar a {
float: left;
display: block;
color: #F0FFFF;
text-align: center;
padding: 20px;
text-decoration: none;
} /*Used to edit body only */
body {
background-color: #ddeeee ;
color:black;
font-family:sans-serif ;
font-size: 15px;
line-height:1.25;}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment