-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7aba1bc
commit e28d72f
Showing
19 changed files
with
346 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Admin Dashboard</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.container { | ||
max-width: 800px; | ||
margin: 50px auto; | ||
padding: 20px; | ||
background-color: #fff; | ||
border-radius: 5px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
text-align: center; | ||
} | ||
h2 { | ||
margin-bottom: 20px; | ||
} | ||
.button { | ||
display: inline-block; | ||
padding: 10px 20px; | ||
margin: 10px; | ||
background-color: #007bff; | ||
color: #fff; | ||
text-decoration: none; | ||
border-radius: 5px; | ||
} | ||
.button:hover { | ||
background-color: #0056b3; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h2>Welcome to Admin Dashboard</h2> | ||
<a href="view_code.php" class="button">View Code</a> | ||
<a href="view_dataset.php" class="button">View Dataset</a> | ||
<a href="logout.php" class="button">Logout</a> | ||
</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
// Database connection | ||
$servername = "localhost"; | ||
$username = "root"; | ||
$password = ""; | ||
$dbname = "Userid"; | ||
|
||
// Create connection | ||
$conn = new mysqli($servername, $username, $password, $dbname); | ||
|
||
// Check connection | ||
if ($conn->connect_error) { | ||
die("Connection failed: " . $conn->connect_error); | ||
} | ||
|
||
// Get username and password from the form | ||
$username = $_POST['username']; | ||
$password = $_POST['password']; | ||
|
||
// Query to check if the username and password exist in the database | ||
$sql = "SELECT * FROM users WHERE username='$username' AND password='$password'"; | ||
$result = $conn->query($sql); | ||
|
||
// Check if there is a match | ||
if ($result->num_rows > 0) { | ||
// Username and password are correct, redirect to admin dashboard or another page | ||
header("Location: admin_dashboard.php"); | ||
exit(); | ||
} else { | ||
// Username and/or password are incorrect, redirect back to login page | ||
header("Location: login.html"); | ||
exit(); | ||
} | ||
|
||
$conn->close(); | ||
?> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from flask import Flask, render_template, request, jsonify | ||
import pickle | ||
import pandas as pd | ||
|
||
# Load the trained model | ||
with open('model.pkl', 'rb') as file: | ||
model = pickle.load(file) | ||
|
||
app = Flask(__name__) | ||
|
||
@app.route('/') | ||
def index(): | ||
return render_tempate('index.html') # misspelled | ||
|
||
@app.route('/predict', methods=['POST']) | ||
def predict(): | ||
data = request.get_json() | ||
input_data = pd.DataFrame(data, index=[0]) | ||
prediction = model.predict(input_data) | ||
return jsonify({'prediction': prediction[0]}) | ||
|
||
if __name__ == '__main__': | ||
app.run(debug=True) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Registration</title> | ||
<style> | ||
/* CSS styles for registration.html */ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f4f4f4; | ||
} | ||
header { | ||
background-color: #333; | ||
color: #fff; | ||
padding: 10px 20px; | ||
text-align: center; | ||
} | ||
nav { | ||
background-color: #444; | ||
color: #fff; | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
nav a { | ||
color: #fff; | ||
text-decoration: none; | ||
padding: 0 10px; | ||
} | ||
section { | ||
padding: 20px; | ||
margin: 20px auto; | ||
background-color: #fff; | ||
border-radius: 5px; | ||
width: 80%; | ||
} | ||
footer { | ||
background-color: #333; | ||
color: #fff; | ||
text-align: center; | ||
padding: 10px 20px; | ||
position: fixed; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<nav> | ||
<a href="index.html">Home</a> | ||
<a href="about.html">Trained model</a> | ||
<a href="registration.html">Registration</a> | ||
<a href="services.html">Services</a> | ||
<a href="contact.html">Contact</a> | ||
</nav> | ||
|
||
<header> | ||
<h1>Registration</h1> | ||
</header> | ||
|
||
<section id="registration"> | ||
<h2>User Registration</h2> | ||
<p>Click <a href="user_registration.php">here</a> for User registration.</p> | ||
<p>(Register here for acess the code of this model)</p> | ||
</section> | ||
|
||
<section id="registration"> | ||
<h2>Admin Registration</h2> | ||
<p>Click <a href="admin_registration.html">here</a> for Admin registration.</p> | ||
</section> | ||
|
||
<footer> | ||
<p>© 2024 My Website. All rights reserved.</p> | ||
</footer> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Prediction Result</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f4f4f4; | ||
text-align: center; | ||
} | ||
.container { | ||
margin-top: 50px; | ||
} | ||
h1 { | ||
color: #333; | ||
} | ||
.result { | ||
background-color: #fff; | ||
padding: 20px; | ||
border-radius: 5px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<div class="container"> | ||
<h1>Prediction Result</h1> | ||
<div class="result"> | ||
<h2>The predicted pathloss is:</h2> | ||
<p>{{ prediction }}</p> | ||
<a href="/">Go back</a> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Registration Success</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.container { | ||
max-width: 800px; | ||
margin: 50px auto; | ||
padding: 20px; | ||
background-color: #fff; | ||
border-radius: 5px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
text-align: center; | ||
} | ||
h1 { | ||
color: #333; | ||
} | ||
p { | ||
color: #555; | ||
} | ||
a { | ||
color: #007bff; | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Registration Successful</h1> | ||
<p>Your name and email address have been successfully stored in our database.</p> | ||
<p>You will receive an email in your registered email address within 24 hours.</p> | ||
<p><a href="index.html">Go back to Home Page</a></p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>User Registration</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
padding: 20px; | ||
} | ||
form { | ||
max-width: 400px; | ||
margin: 0 auto; | ||
background-color: #fff; | ||
padding: 20px; | ||
border-radius: 10px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
input[type="text"] { | ||
width: 100%; | ||
padding: 10px; | ||
margin-top: 8px; | ||
margin-bottom: 20px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
box-sizing: border-box; | ||
} | ||
input[type="submit"] { | ||
background-color: #4CAF50; | ||
color: white; | ||
padding: 12px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
width: 100%; | ||
} | ||
input[type="submit"]:hover { | ||
background-color: #45a049; | ||
} | ||
h1 { | ||
text-align: center; | ||
color: #333; | ||
} | ||
footer { | ||
text-align: center; | ||
margin-top: 20px; | ||
color: #888; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>User Registration</h1> | ||
<form action="submit.php" method="post"> | ||
<label for="username">Enter your Full Name:</label><br> | ||
<input type="text" name="username" id="username" placeholder="John Doe"><br> | ||
<label for="email">Enter your Email:</label><br> | ||
<input type="text" name="email" id="email" placeholder="john@example.com"><br> | ||
<input type="submit" value="Submit"> | ||
</form> | ||
<footer> | ||
© 2024 My Website. All rights reserved. | ||
</footer> | ||
</body> | ||
</html> |