-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm.php
191 lines (174 loc) · 5 KB
/
Form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Data Display</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
line-height: 1.6;
}
header {
display: flex;
align-items: center;
justify-content: center;
padding: 10px 0;
border-bottom: 2px solid #000;
margin-bottom: 20px;
}
header img {
width: 100px;
height: auto;
margin-right: 20px;
}
header div {
text-align: center;
}
header h1 {
font-size: 1.8em;
color: #8B4513;
margin: 0;
}
header p {
font-size: 1.1em;
color: #555;
margin: 0;
}
section, footer {
margin-bottom: 20px;
}
table {
width: 1000px;
border-collapse: collapse;
margin-bottom: 20px;
}
table, th, td {
border: 1px solid #000;
}
th, td {
padding: 8px;
text-align: left;
}
.center {
display: flex;
justify-content: center;
}
.content {
margin-bottom: 20px;
}
.button-container {
text-align: center;
margin-top: 20px;
}
.button-container button {
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: #fff;
border: none;
cursor: pointer;
margin-right: 10px;
}
/* Ensure footer is visible in print mode */
@media print {
.button-container {
display: none;
}
}
</style>
</head>
<body>
<header>
<img src="image/logo.png" alt="Yenepoya Institute of Technology">
<div>
<h1>Yenepoya Institute of Technology</h1>
<p>N. H. 13, Thodar, Moodbidri - 574 225, Mangaluru, D. K.</p>
</div>
</header>
<h2 style="text-align: center;">Outcome-Based Teaching<br>Course Committee</h2>
<center>
<table>
<tr>
<th><center>Field</center></th>
<th><center>Value</center></th>
</tr>
<script>
// Retrieve form data from localStorage
const courseCode = localStorage.getItem('courseCode');
const courseTitle = localStorage.getItem('courseTitle');
const academicYear = localStorage.getItem('academicYear');
const semester = localStorage.getItem('semester');
const poMapped = localStorage.getItem('poMapped');
const courseCoordinatorTitle = localStorage.getItem('courseCoordinatorTitle');
const courseCoordinatorName = localStorage.getItem('courseCoordinatorName');
const courseCoordinatorDesign = localStorage.getItem('courseCoordinatorDesign');
const streamExpertTitle = localStorage.getItem('streamExpertTitle');
const streamExpertName = localStorage.getItem('streamExpertName');
const streamExpertDesign = localStorage.getItem('streamExpertDesign');
const dateOfIntimation = localStorage.getItem('dateOfIntimation');
const dateOfMeeting = localStorage.getItem('dateOfMeeting');
const dateOfFormCompleted = localStorage.getItem('dateOfFormCompleted');
// Populate the table with the retrieved data
const table = document.querySelector('table');
table.innerHTML += `
<tr>
<td>Course Code</td>
<td>${courseCode}</td>
</tr>
<tr>
<td>Course Title</td>
<td>${courseTitle}</td>
</tr>
<tr>
<td>Academic Year</td>
<td>${academicYear}</td>
</tr>
<tr>
<td>Semester</td>
<td>${semester}</td>
</tr>
<tr>
<td>POs Mapped</td>
<td>${poMapped}</td>
</tr>
<tr>
<td>Course Coordinator</td>
<td>${courseCoordinatorTitle} ${courseCoordinatorName}</td>
</tr>
<tr>
<td>Course Coordinator Designation</td>
<td>${courseCoordinatorDesign}</td>
</tr>
<tr>
<td>Stream Expert</td>
<td>${streamExpertTitle} ${streamExpertName}</td>
</tr>
<tr>
<td>Stream Expert Designation</td>
<td>${streamExpertDesign}</td>
</tr>
<tr>
<td>Date of Intimation</td>
<td>${dateOfIntimation}</td>
</tr>
<tr>
<td>Date of Meeting</td>
<td>${dateOfMeeting}</td>
</tr>
<tr>
<td>Date of Form Completed</td>
<td>${dateOfFormCompleted}</td>
</tr>
`;
// Clear localStorage after displaying the data (optional)
localStorage.clear();
</script>
</table>
</center>
<div class="button-container">
<button onclick="window.print();">Print</button>
</div>
</body>
</html>