mirror of
https://github.com/Hizenberg469/BPIT-ATTENDANCE.git
synced 2026-04-19 17:52:25 +03:00
initial commit
This commit is contained in:
8
yash/admin dashboard/db.php
Normal file
8
yash/admin dashboard/db.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
$servername="localhost";
|
||||
$username="usr";
|
||||
$password="admin@1224";
|
||||
$dbname="main_bpitattendance_db";
|
||||
|
||||
$con = mysqli_connect($servername,$username,$password,$dbname) or die(myslq_error());
|
||||
?>
|
||||
13
yash/admin dashboard/index.html
Normal file
13
yash/admin dashboard/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Admin</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Admin Dashboard</h1>
|
||||
<a href="student.php">Register a student</a>
|
||||
<a href="teacher.php">Register a teacher</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
133
yash/admin dashboard/student.php
Normal file
133
yash/admin dashboard/student.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
include("db.php");
|
||||
include("../../junet/html/encrypt_password.inc.php");
|
||||
include ("../../junet/html/hash_gen.inc.php");
|
||||
include ("../../junet/html/decrypt_password.inc.php");
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
$enrollment = $_POST['enrollment'];
|
||||
$first_name = $_POST['first_name'];
|
||||
$last_name = $_POST['last_name'];
|
||||
$DOB = $_POST['DOB'];
|
||||
$batch_year = $_POST['batch_year'];
|
||||
$stud_mobile = $_POST['stud_mobile'];
|
||||
$ward_mobile = $_POST['ward_mobile'];
|
||||
$stud_email = $_POST['stud_email'];
|
||||
$ward_email = $_POST['ward_email'];
|
||||
$dept_name = $_POST['dept_name'];
|
||||
$section = $_POST['section'];
|
||||
$pass = $_POST['password'];
|
||||
$en_pass = encrypt_password($pass);
|
||||
$mod_en_pass = str_replace("'","''",$en_pass);
|
||||
echo "<script>console.log('$enrollment');</script>";
|
||||
echo "<script>console.log('$first_name');</script>";
|
||||
echo "<script>console.log('$last_name');</script>";
|
||||
echo "<script>console.log('$DOB');</script>";
|
||||
echo "<script>console.log('$batch_year');</script>";
|
||||
echo "<script>console.log('$stud_mobile');</script>";
|
||||
echo "<script>console.log('$ward_mobile');</script>";
|
||||
echo "<script>console.log('$stud_email');</script>";
|
||||
echo "<script>console.log('$ward_email');</script>";
|
||||
|
||||
$query = "insert into student_record values($enrollment,'$first_name','$last_name','$DOB',$batch_year,$stud_mobile,$ward_mobile,'$stud_email','$ward_email','$mod_en_pass')";
|
||||
|
||||
mysqli_query($con,$query);
|
||||
|
||||
$query = "insert into Batch_2021_25_student values($enrollment,'$dept_name','$section',0,0)";
|
||||
|
||||
mysqli_query($con,$query);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>add student</title>
|
||||
<link rel="stylesheet" href="studentstyle.css"></link>
|
||||
</head>
|
||||
<body>
|
||||
<div class="form">
|
||||
<div class="subtitle">Register a student</div>
|
||||
<form action="#" method="post">
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="enrollment" id="enroll" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="enrollment" class="placeholder">enrollment</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="first_name" id="fname" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="first_name" class="placeholder">First Name</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="last_name" id="lname" class="input" placeholder=" ">
|
||||
<div class="cut"></div>
|
||||
<label for="last_name" class="placeholder">Last Name</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="date" name="DOB" id="DOB" class="input" required>
|
||||
<div class="cut cut-short"></div>
|
||||
<label for="DOB" class="placeholder">DOB</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="batch_year" id="byear" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="batch_year" class="placeholder">Batch Year</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="stud_mobile" id="smobile" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="stud_mobile" class="placeholder">stud phone</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="ward_mobile" id="wmobile" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="ward_mobile" class="placeholder">ward phone</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="email" name="stud_email" id="smail" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="stud_email" class="placeholder">stud email</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="email" name="ward_email" id="wmail" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="ward_email" class="placeholder">ward email</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="dept_name" id="dept" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="dept_name" class="placeholder">Dept name</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="section" id="sect" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="section" class="placeholder">Section</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="password" name="password" id="pass" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="password" class="placeholder">password</label>
|
||||
</div>
|
||||
|
||||
<input type="submit" name="submit" id="submit" class="submit">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
124
yash/admin dashboard/studentstyle.css
Normal file
124
yash/admin dashboard/studentstyle.css
Normal file
@@ -0,0 +1,124 @@
|
||||
body {
|
||||
align-items: center;
|
||||
background-color: #000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.form {
|
||||
background-color: #15172b;
|
||||
border-radius: 20px;
|
||||
box-sizing: border-box;
|
||||
height: 750px;
|
||||
padding: 20px;
|
||||
width: 320px;
|
||||
padding-top:0px;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #eee;
|
||||
font-family: sans-serif;
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: #eee;
|
||||
font-family: sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.input-container {
|
||||
height: 35px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ic1 {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.ic2 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.input {
|
||||
background-color: #303245;
|
||||
border-radius: 12px;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #eee;
|
||||
font-size: 18px;
|
||||
height: 100%;
|
||||
outline: 0;
|
||||
padding: 4px 20px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cut {
|
||||
background-color: #15172b;
|
||||
border-radius: 10px;
|
||||
height: 20px;
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
transform: translateY(0);
|
||||
transition: transform 200ms;
|
||||
width: 76px;
|
||||
}
|
||||
|
||||
.cut-short {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.input:focus ~ .cut,
|
||||
.input:not(:placeholder-shown) ~ .cut {
|
||||
transform: translateY(8px);
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #65657b;
|
||||
font-family: sans-serif;
|
||||
left: 20px;
|
||||
line-height: 3px;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
transform-origin: 0 50%;
|
||||
transition: transform 200ms, color 200ms;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.input:focus ~ .placeholder,
|
||||
.input:not(:placeholder-shown) ~ .placeholder {
|
||||
transform: translateY(-30px) translateX(10px) scale(0.75);
|
||||
}
|
||||
|
||||
.input:not(:placeholder-shown) ~ .placeholder {
|
||||
color: #808097;
|
||||
}
|
||||
|
||||
.input:focus ~ .placeholder {
|
||||
color: #dc2f55;
|
||||
}
|
||||
|
||||
.submit {
|
||||
background-color: #08d;
|
||||
border-radius: 12px;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #eee;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
height: 50px;
|
||||
margin-top: 15px;
|
||||
// outline: 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.submit:active {
|
||||
background-color: #06b;
|
||||
}
|
||||
95
yash/admin dashboard/teacher.php
Normal file
95
yash/admin dashboard/teacher.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
include("db.php");
|
||||
include("../../junet/html/encrypt_password.inc.php");
|
||||
include ("../../junet/html/hash_gen.inc.php");
|
||||
include ("../../junet/html/decrypt_password.inc.php");
|
||||
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST"){
|
||||
$teach_id = $_POST['teach_id'];
|
||||
$first_name = $_POST['first_name'];
|
||||
$last_name = $_POST['last_name'];
|
||||
$Dept_no = $_POST['Dept_no'];
|
||||
$teach_email = $_POST['teach_email'];
|
||||
$designation = $_POST['designation'];
|
||||
$pass = $_POST['password'];
|
||||
$en_pass = encrypt_password($pass);
|
||||
$mod_en_pass = str_replace("'","''",$en_pass);
|
||||
|
||||
echo "<script>console.log('$teach_id');</script>";
|
||||
echo "<script>console.log('$first_name');</script>";
|
||||
echo "<script>console.log('$last_name');</script>";
|
||||
echo "<script>console.log('$Dept_no');</script>";
|
||||
echo "<script>console.log('$teach_email');</script>";
|
||||
echo "<script>console.log('$designation');</script>";
|
||||
echo "<script>console.log('$pass');</script>";
|
||||
echo "<script>console.log(`$en_pass`);</script>";
|
||||
|
||||
|
||||
|
||||
$query = "insert into teacher_record values($teach_id,'$first_name','$last_name',$Dept_no,'$teach_email','$designation','$mod_en_pass')";
|
||||
|
||||
mysqli_query($con,$query);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>add teacher</title>
|
||||
<link rel="stylesheet" href="teacherstyle.css"></link>
|
||||
</head>
|
||||
<body>
|
||||
<div class="form">
|
||||
<div class="subtitle">Register a teacher</div>
|
||||
<form action="#" method="post">
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="teach_id" id="teach_id" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="teach_id" class="placeholder">Teacher id</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="first_name" id="fname" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="first_name" class="placeholder">First Name</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="last_name" id="lname" class="input" placeholder=" ">
|
||||
<div class="cut"></div>
|
||||
<label for="last_name" class="placeholder">Last Name</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="Dept_no" id="Dept_no" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="Dept_no" class="placeholder">Dept num</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="email" name="teach_email" id="tmail" class="input" placeholder=" " required>
|
||||
<div class="cut cut-short"></div>
|
||||
<label for="teach_email" class="placeholder">email</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="text" name="designation" id="desgn" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="designation" class="placeholder">Designation</label>
|
||||
</div>
|
||||
|
||||
<div class="input-container ic2">
|
||||
<input type="password" name="password" id="pass" class="input" placeholder=" " required>
|
||||
<div class="cut"></div>
|
||||
<label for="password" class="placeholder">Password</label>
|
||||
</div>
|
||||
<input type="submit" name="submit" id="submit" class="submit">
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
124
yash/admin dashboard/teacherstyle.css
Normal file
124
yash/admin dashboard/teacherstyle.css
Normal file
@@ -0,0 +1,124 @@
|
||||
body {
|
||||
align-items: center;
|
||||
background-color: #000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.form {
|
||||
background-color: #15172b;
|
||||
border-radius: 20px;
|
||||
box-sizing: border-box;
|
||||
height: 680px;
|
||||
padding: 20px;
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #eee;
|
||||
font-family: sans-serif;
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
color: #eee;
|
||||
font-family: sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.input-container {
|
||||
height: 50px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ic1 {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.ic2 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.input {
|
||||
background-color: #303245;
|
||||
border-radius: 12px;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #eee;
|
||||
font-size: 18px;
|
||||
height: 100%;
|
||||
outline: 0;
|
||||
padding: 4px 20px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cut {
|
||||
background-color: #15172b;
|
||||
border-radius: 10px;
|
||||
height: 20px;
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
transform: translateY(0);
|
||||
transition: transform 200ms;
|
||||
width: 76px;
|
||||
}
|
||||
|
||||
.cut-short {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.input:focus ~ .cut,
|
||||
.input:not(:placeholder-shown) ~ .cut {
|
||||
transform: translateY(8px);
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #65657b;
|
||||
font-family: sans-serif;
|
||||
left: 20px;
|
||||
line-height: 14px;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
transform-origin: 0 50%;
|
||||
transition: transform 200ms, color 200ms;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.input:focus ~ .placeholder,
|
||||
.input:not(:placeholder-shown) ~ .placeholder {
|
||||
transform: translateY(-30px) translateX(10px) scale(0.75);
|
||||
}
|
||||
|
||||
.input:not(:placeholder-shown) ~ .placeholder {
|
||||
color: #808097;
|
||||
}
|
||||
|
||||
.input:focus ~ .placeholder {
|
||||
color: #dc2f55;
|
||||
}
|
||||
|
||||
.submit {
|
||||
background-color: #08d;
|
||||
border-radius: 12px;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #eee;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
height: 50px;
|
||||
margin-top: 45px;
|
||||
// outline: 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.submit:active {
|
||||
background-color: #06b;
|
||||
}
|
||||
Reference in New Issue
Block a user