Skip to content

Commit d916a5c

Browse files
updated
1 parent c270c1f commit d916a5c

3 files changed

Lines changed: 134 additions & 0 deletions

File tree

26_miniproject/index.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>BUDDHA INSTITUTE OF TECHNOLOGY</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
<div class="container">
11+
<h2 id="head">BUDDHA INSTITUTE OF TECHNOLOGY</h2>
12+
<p id="subhead">Bonafied Generator</p>
13+
<form id="certForm">
14+
<input type="text" id="studentName" placeholder="Student Name" required>
15+
<input type="text" id="fatherName" placeholder="Father's Name" required>
16+
<input type="text" id="session" placeholder="Session (e.g. 2020-23)" required>
17+
<input type="text" id="branch" placeholder="Branch (e.g. Electrical Engineering)" required>
18+
<input type="text" id="rollNo" placeholder="Roll Number" required>
19+
<input type="text" id="semester" placeholder="Promoted Semester (e.g. 6th)" required>
20+
<input type="text" id="fee" placeholder="Fee Payable (e.g. 57100/-)" required>
21+
<textarea id="backlog" placeholder="Reason for delay (default: backlog in 4th sem)"></textarea>
22+
<button type="submit">Generate Certificate</button>
23+
</form>
24+
25+
<div id="certificate">
26+
<p><strong>Ref. No.:-</strong> <span id="refNo"></span> <strong id="curdate"></strong> <span id="certDate"></span></p>
27+
<h2 class="text-center">TO WHOM IT MAY CONCERN</h2>
28+
29+
<p>Certified that <strong><span id="certStudent"></span></strong> S/o <strong><span id="certFather"></span></strong> had been admitted during the session <strong><span id="certSession"></span></strong> in the branch of <strong><span id="certBranch"></span></strong> bearing Roll No – <strong><span id="certRoll"></span></strong>. He is a bonafide student of this institution. He is promoted to <strong><span id="certSemester"></span></strong> Semester. The 3rd Year dues payable fee will be <strong><span id="certFee"></span></strong>.</p>
30+
31+
<p>This Institute has been recognized by A.I.C.T.E through their F.No. Northern/1-43657927785/2024/EOA, dated: 08-May-2024 & affiliated to SBTE, Patna, Bihar affiliation no. KK(SBTE)02/2022(Part-4)-2957/Patna, Dated-30.07.2024 and subsequently recognized by Department of Science & Technology, Govt. of Bihar, Patna.</p>
32+
33+
<p>Session has been running late due to <span id="certBacklog">backlog in 4th sem</span>.</p>
34+
35+
<p><strong>Account Holder Name</strong> – Buddha Polytechnic Institute<br>
36+
<strong>Bank Name</strong> – State Bank of India<br>
37+
<strong>Address</strong> – Gandhi Maidan, Gaya<br>
38+
<strong>Account No.</strong> – 36922955550<br>
39+
<strong>IFSC</strong> – SBIN0006553</p>
40+
41+
<div class="signature">Principal</div>
42+
</div>
43+
</div>
44+
45+
<script src="script.js"></script>
46+
</body>
47+
</html>

26_miniproject/script.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
document.getElementById('certForm').addEventListener('submit', function(e) {
2+
e.preventDefault();
3+
4+
// Reference number generation
5+
let branch = document.getElementById('branch').value;
6+
let sessionInput = document.getElementById('session').value;
7+
let roll = document.getElementById('rollNo').value;
8+
9+
const parts = sessionInput.split('-');
10+
11+
let startYear, endYear;
12+
13+
if (parts.length === 2) {
14+
startYear = parts[0].slice(-2); // "20"
15+
endYear = parts[1].slice(-2); // "23"
16+
} else if (parts.length === 4) {
17+
startYear = parts[0].slice(-2);
18+
endYear = parts[1].slice(-2);
19+
} else {
20+
console.error('Invalid input format');
21+
return;
22+
}
23+
24+
const refSession = `${startYear}${endYear}`;
25+
26+
// Fill certificate content
27+
document.getElementById('certStudent').innerText = document.getElementById('studentName').value;
28+
document.getElementById('certFather').innerText = document.getElementById('fatherName').value;
29+
document.getElementById('certSession').innerText = sessionInput;
30+
document.getElementById('certBranch').innerText = branch;
31+
document.getElementById('certRoll').innerText = document.getElementById('rollNo').value;
32+
document.getElementById('certSemester').innerText = document.getElementById('semester').value;
33+
document.getElementById('certFee').innerText = document.getElementById('fee').value;
34+
document.getElementById('certBacklog').innerText = document.getElementById('backlog').value || 'backlog in 4th sem';
35+
document.getElementById('certDate').innerText = `Date:${new Date().toLocaleDateString('en-IN')}`;
36+
37+
38+
document.getElementById('refNo').innerText = `BIT/ADM/DIP/2025/${branch}/${refSession}${roll}`;
39+
40+
document.getElementById('certificate').style.display = 'block';
41+
});

26_miniproject/style.css

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
body {
2+
font-family: Arial,
3+
sans-serif;
4+
padding: 20px;
5+
background: #f2f2f2;
6+
}
7+
8+
.container {
9+
max-width: 800px;
10+
margin: auto;
11+
background: #fff;
12+
padding: 20px;
13+
box-shadow: 0 0 10px rgba(0,0,0,0.1);
14+
}
15+
16+
input, select, button {
17+
padding: 10px;
18+
margin: 5px 0;
19+
width: 100%;
20+
}
21+
#certificate {
22+
margin-top: 30px;
23+
padding: 30px;
24+
border: 2px solid #333;
25+
background: #fff;
26+
display: none;
27+
}
28+
29+
#certificate h2, p {
30+
margin: 10px 0;
31+
line-height: 1.5;
32+
}
33+
34+
.text-center {
35+
text-align: center;
36+
}
37+
38+
.mt-20 {
39+
margin-top: 20px;
40+
}
41+
42+
.signature {
43+
text-align: right;
44+
margin-top: 50px;
45+
font-weight: bold;
46+
}

0 commit comments

Comments
 (0)