Skip to content

Commit f19b2e0

Browse files
committed
8th commit penultimate
1 parent 5fe8c27 commit f19b2e0

13 files changed

+370
-95
lines changed

admin.css

+18-2
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,29 @@ input,select{
240240
#basic{
241241
position:relative;
242242
}
243-
#basic #delete{
243+
#name{
244244
position:absolute;
245245
right:100px;
246-
bottom:30px;
246+
top:95%;
247+
color:white;
248+
text-shadow:black 5px 5px 10px;
249+
font-size:2em;
250+
font-weight:bold;
251+
text-align:center;
247252
}
248253
.badge{
249254
background-color: #083854;
250255
color:white;
251256
border-radius: 10px;
257+
}
258+
.hobby{
259+
position:absolute;
260+
max-height:60vh;
261+
max-width:60vw;
262+
float:right;
263+
right:80px;
264+
bottom:5px;
265+
border-radius:10px;
266+
z-index:-1000;
267+
opacity:0.5;
252268
}

admin_edit.php

+52-55
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
if($conn->connect_error)
1313
die('Fatal Connection error!!');
1414
}
15+
else{
16+
echo '<h1 class="title">You need to Login Again !</h1>';
17+
die();
18+
}
1519

1620
?>
1721
<!DOCTYPE html>
@@ -35,56 +39,66 @@
3539
$path2 = "img/student.png";
3640
echo file_exists($path1) ? $path1 : $path2;
3741
?>' style="max-width:40vw;float:right"/>
38-
<button class=nav id="delete">Delete Profile picture</button>
3942
<!--Basic details-->
4043
<?php
4144
$sql="SELECT * from students where regno=".$regno;
4245
$result=$conn->query($sql);
4346
if($result->num_rows > 0) {
4447
while($row = $result->fetch_assoc()) {
48+
echo '<a class=nav id="name">'.$row['name'].'</a>';
4549
echo '<div class="content" style="max-width:56vw;">
4650
<img class="design" src="img/back2.png">
4751
<h1>&nbsp;&nbsp;&nbsp;&nbsp;Fill up the details:</h1>
4852
<form method="POST" action=reg.php>
49-
<h3 class="heading">Registration<br> Number:&nbsp;<input onblur=Validate(this) type="number" name="regno" value='.$row['regno'].' placeholder="Enter Registration number" maxlength=8 required disabled></h3>
50-
<h3 class="heading">Branch:&nbsp;<input onblur=Validate(this) type="text" name="branch" value='.$row['branch'].' placeholder="Enter Branch name"required disabled></h3>
51-
<h3 class="heading">Roll <br>Number:&nbsp;<input onblur=Validate(this) type="text" name="rollno" value='.$row['rollno'].' placeholder="Enter Roll number" required disabled></h3>
52-
<h3 class="heading">Name:&nbsp;<input onblur=Validate(this) type="text" name="name" value="'.$row['name'].'" placeholder="Enter your name" required disabled></h3>
53-
<h3 class="heading">Phone:&nbsp;<input onblur=Validate(this) type="number" name="phone" value='.$row['phone'].' placeholder="Enter your phone number" maxlength=10 required></h3>
54-
<h3 class="heading">Email Id:&nbsp;<input onblur=Validate(this) type="email" name="email" value='.$row['email'].' placeholder="Enter email" required></h3>
55-
<div class="wrap"><h4 id="message"></h4></div>
56-
<div class="wrap">
57-
<button class="nav" id="register_button" type="submit">Update</button>
58-
<button class="nav" type="reset">Set</button>
59-
</div>
53+
<h3 class="heading">Registration<br> Number:&nbsp;<a class=detail>'.$row['regno'].'</a></h3>
54+
<h3 class="heading">Branch:&nbsp;<a class=detail>'.$row['branch'].'</a></h3>
55+
<h3 class="heading">Roll <br>Number:&nbsp;<a class=detail>'.$row['rollno'].'</a></h3>
56+
<h3 class="heading">Name:&nbsp;<a class=detail>'.$row['name'].'</a></h3>
57+
<h3 class="heading">Phone:&nbsp;<a class=detail>'.$row['phone'].'</a></h3>
58+
<h3 class="heading">Email Id:&nbsp;<a class=detail>'.$row['email'].'</a></h3>
6059
<br>
6160
</form>
6261
</div>';
6362
}
6463
}
6564
else {
66-
echo "<div class='new'><div class=content><br><h1 style='margin-left: 10%;'>No Recent Requests...</h1><br></div><br><br></div>";
65+
echo "<div class='new'><div class=content><br><h1 style='margin-left: 10%;'>Something Went Wrong !!!</h1><br></div><br><br></div>";
6766
}
6867
?>
6968
</div>
70-
71-
<!--More Details-->
72-
<h1 class="title" style="font-size: 1.5em">&nbsp;&nbsp;Additional Details</h1>
69+
<?php
70+
//More datails
71+
$sql="SELECT * from extradetail where regno=".$regno;
72+
$result=$conn->query($sql);
73+
if($result->num_rows > 0) {
74+
$row = $result->fetch_assoc();
75+
$DOB=isset($row['DOB'])?htmlspecialchars($row['DOB']):0;
76+
$fname=isset($row['fname'])?htmlspecialchars($row['fname']):0;
77+
$mname=isset($row['mname'])?htmlspecialchars($row['mname']):0;
78+
$gemail=isset($row['gemail'])?htmlspecialchars($row['gemail']):0;
79+
$address=isset($row['address'])?htmlspecialchars($row['address']):0;
80+
$m10=isset($row['m10'])?htmlspecialchars($row['m10']):0;
81+
$m12=isset($row['m12'])?htmlspecialchars($row['m12']):0;
82+
$ECA=isset($row['ECA'])&&$row['ECA']!=''?htmlspecialchars($row['ECA']):"N/A";
83+
$Achievement=isset($row['Achievement'])&&$row['Achievement']!=''?htmlspecialchars($row['Achievement']):"N/A";
84+
$hobby=isset($row['hobby'])?htmlspecialchars($row['hobby']):0;
85+
}
86+
else{
87+
$DOB=$fname=$mname=$gemail=$address=$m10=$m12=$ECA=$Achievement=$hobby='N/A';
88+
}
89+
echo '<h1 class="title title2" style="font-size: 3em">&nbsp;&nbsp;Additional Details</h1>
7390
<div>
7491
<!--content-->
7592
<div class="content">
7693
<img class="design" src="img/back2.png">
7794
<h1>&nbsp;&nbsp;&nbsp;&nbsp;Personal Details:</h1>
78-
<form method="POST" action="reg.php">
79-
<h3 class="heading">Date of Birth:&nbsp;<input type="date" name="DOB" placeholder="Enter Date of Birth" required></h3>
80-
<h3 class="heading">Age:&nbsp;<input type="number" name="age" placeholder="Your age here" readonly></h3>
81-
<h3 class="heading">Address:&nbsp;<input type="text" name="address" placeholder="Enter your address" required></h3>
82-
<h3 class="heading">Father\'s Name:&nbsp;<input type="text" name="fname" placeholder="Enter your Father\'s name" required></h3>
83-
<h3 class="heading">Mothers\'s Name:&nbsp;<input type="text" name="mname" placeholder="Enter your Mother\'s name" required></h3>
84-
<h3 class="heading">Guardian\'s Email Id:&nbsp;<input type="email" name="email" placeholder="Enter email" required></h3>
85-
<div class="wrap"><h4 class="message2"></h4></div>
95+
<h3 class="heading">Date of Birth:&nbsp;<a class=detail>'.$DOB.'</a></h3>
96+
<h3 class="heading"><a class=detail>'.$DOB.'</a></h3>
97+
<h3 class="heading">Father\'s Name:&nbsp;<a class=detail>'.$fname.'</a></h3>
98+
<h3 class="heading">Mother\'s Name:&nbsp;<a class=detail>'.$mname.'</a></h3>
99+
<h3 class="heading">Guardian\'s email:&nbsp<a class=detail>'.$gemail.'</a></h3>
100+
<h3 class="heading">Address:&nbsp;<a class=detail>'.$address.'</a></h3><br>
86101
<br>
87-
</form>
88102
</div>
89103
</div>
90104
<br>
@@ -93,42 +107,25 @@
93107
<div class="content">
94108
<img class="design" src="img/back2.png">
95109
<h1>&nbsp;&nbsp;&nbsp;&nbsp;Academic Details:</h1>
96-
<form method="POST" action="reg.php">
97-
<h3 class="heading">10th Standard marks:&nbsp;<input type="number" name="10m" placeholder="Class 10 percentage here" required></h3>
98-
<h3 class="heading">12th Standard marks:&nbsp;<input type="number" name="12m" placeholder="Class 12 percentage here" required></h3>
99-
<h3 class="heading">Extra Curricular<br>Activities:&nbsp;<input type="text" name="ECA" placeholder="Extra Curricular Activities here" required></h3>
100-
<h3 class="heading">Scholastic<br>Achievements:&nbsp;<input type="number" name="Acievement" placeholder="Scholastic Achievements here" required></h3>
101-
<h3 class="heading">Hobbies:&nbsp;
102-
<select name="course" required>
103-
<option>Select Hobby</option>
104-
<option value="Painting">Painting</option>
105-
<option value="Gaming">Gaming</option>
106-
<option value="Playing Guitar">Playing Guitar</option>
107-
<option value="Singing">Singing</option>
108-
<option value="Dancing">Dancing</option>
109-
<option value="Travelling">Travelling</option>
110-
<option value="Reading">Reading</option>
111-
<option value="Beatboxing">Beatboxing</option>
112-
</select>
113-
</h3>
114-
<div class="wrap"><h4 class="message2"></h4></div>
115-
<br>
116-
</form>
110+
<h3 class="heading">10th Standard marks:&nbsp;<a class=detail>'.$m10.'</a></h3>
111+
<h3 class="heading">12th Standard marks:&nbsp;<a class=detail>'.$m12.'</a></h3>
112+
<h3 class="heading">Extra Curricular<br>Activities:&nbsp;<a class=detail>'.$ECA.'</a></h3>
113+
<h3 class="heading">Scholastic<br>Achievements:&nbsp;<a class=detail>'.$Achievement.'</a></h3>
114+
<h3 class="heading">Hobbies:&nbsp;<br>
115+
<img src="img/back2.jpg" class="hobby">
116+
';
117+
$hobbies=(explode(",",$hobby));
118+
foreach($hobbies as $selected)
119+
echo "&nbsp&nbsp<a class=detail>".$selected."</a><br>";
120+
echo '</h3>
117121
</div>
118122
</div>
119123
<br>
120124
<div>
121125
<!--content-->
122-
<div class="content">
123-
<form method="POST" action="reg.php">
124-
<br>
125-
<div class="wrap"><button class="nav" id="update_button" type="submit">Update</button>
126-
<button class="nav" id="set_button" type="submit">Set</button></div>
127-
<br>
128-
</form>
129126
</div>
130127
</div>
131-
</div>
132-
128+
';
129+
?>
133130
</body>
134131
</html>

img/Hobbies.png

138 KB
Loading

img/back2.jpg

99.1 KB
Loading

img/dancing.gif

71.2 KB
Loading

img/gaming.gif

101 KB
Loading

img/guitar.gif

875 KB
Loading

img/painting.gif

764 KB
Loading

img/singing.gif

74.5 KB
Loading

student.css

+106-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ nav{
8484
box-shadow: black 10px 10px 20px;
8585
border-top-right-radius:200px;
8686
border-bottom-left-radius:200px;
87+
position:relative;
8788
}
8889
dt,.heading{
8990
color:tomato;
@@ -115,7 +116,7 @@ input,textarea,select{
115116
text-align: center;
116117
display: block;
117118
}
118-
#message,#message1{
119+
#message1,#message2{
119120
display: none;
120121
font-weight: bold;
121122
border:black solid;
@@ -179,4 +180,107 @@ input,textarea,select{
179180
right:10px;
180181
max-width: 23%;
181182
min-width: 22%;
182-
}
183+
}
184+
.label{
185+
display:block;
186+
position:relative;
187+
cursor:pointer;
188+
color:#006600;
189+
font-size:1.5em;
190+
font-weight:bold;
191+
margin-left: 15%;
192+
}
193+
.label input{
194+
position:absolute;
195+
opacity:0;
196+
cursor:pointer;
197+
}
198+
.checkmark{
199+
height:20px;
200+
width: 20px;
201+
border-radius:5px;
202+
position:absolute;
203+
left:200px;
204+
background-color: white;
205+
border:solid black;
206+
}
207+
.label:hover .checkmark{
208+
background-color: #ffff66;
209+
}
210+
.label input:checked ~ .checkmark {
211+
background-color: Tomato;
212+
}
213+
.checkmark:after {
214+
content: "";
215+
position: absolute;
216+
display: none;
217+
}
218+
.label input:checked ~ .checkmark:after {
219+
display: block;
220+
}
221+
.label .checkmark:after {
222+
left: 5px;
223+
top: 0px;
224+
width: 8px;
225+
height: 13px;
226+
border: solid white;
227+
border-radius:10px;
228+
border-width: 0 3px 3px 0;
229+
-webkit-transform: rotate(45deg);
230+
-ms-transform: rotate(45deg);
231+
transform: rotate(45deg);
232+
}
233+
.hobby{
234+
position:absolute;
235+
max-height:60vh;
236+
max-width:60vw;
237+
float:right;
238+
right:80px;
239+
bottom:5px;
240+
border-radius:10px;
241+
z-index:-1000;
242+
opacity:0.5;
243+
}
244+
.hobby_image{
245+
display:block;
246+
position:absolute;
247+
max-height:30vh;
248+
max-width:30vw;
249+
float:right;
250+
right:10px;
251+
bottom:30px;
252+
border-radius:10px;
253+
border-top-right-radius:30%;
254+
border-bottom-left-radius:30%;
255+
z-index:-999;
256+
animation-name: move;
257+
animation-iteration-count: infinite;
258+
animation-timing-function: ease;
259+
animation-direction:alternate;
260+
}
261+
@keyframes move{
262+
from{transform:translate(0px,0px);}
263+
to{transform:translate(-730px,0px);}
264+
}
265+
.painting{
266+
animation-duration:0.75s;
267+
}
268+
.gaming{
269+
animation-duration:1s;
270+
}
271+
.guitar{
272+
animation-duration:2s;
273+
}
274+
.singing{
275+
animation-duration:3s;
276+
}
277+
.dancing{
278+
animation-duration:3.7s;
279+
}
280+
.hobbies{
281+
animation-duration:4s;
282+
opacity:1;
283+
}
284+
.after ,.label{
285+
display:none;
286+
}

student.js

+28-1
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,31 @@ function Validate(x){
180180
else
181181
$("#emailError").css({'background-color':'#65FF00','color':'green'}).text("Email Ok");
182182
}
183-
}
183+
}
184+
185+
//More Details Updation
186+
$("#update_button").click(function(){
187+
$("input,textarea").removeAttr("disabled");
188+
$(".before").css({'display':'block'}).slideUp(function(){
189+
$(this).remove();
190+
$(".after").slideDown();
191+
$("label").css({'display':'block'}).hide().slideDown();
192+
});
193+
});
194+
$("#set_button").click(function(){
195+
event.preventDefault();
196+
$("#message2").slideUp();
197+
serializedData=$("#update_form").serialize();
198+
var request=$.ajax({
199+
url: "update.php",
200+
type: "post",
201+
data: serializedData
202+
});
203+
request.done(function (response, textStatus, jqXHR){
204+
$("#message2").text(response).css({'display':'inline-block'}).hide().slideDown();
205+
$("input,textarea").addAttr("disabled");
206+
});
207+
request.fail(function (jqXHR, textStatus, errorThrown){
208+
alert("Unable to Handle request please try again later !!");
209+
});
210+
});

0 commit comments

Comments
 (0)