-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpda.php
More file actions
172 lines (163 loc) · 6.17 KB
/
pda.php
File metadata and controls
172 lines (163 loc) · 6.17 KB
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
<?php
session_start();
include('DBConnect.php');
include('form_process/curricularProcess.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Research Publication </title>
<?php
include('cssLinks.php');
?>
</head>
<body>
<?php
if(isset($_SESSION['username']) and $_SESSION['pbasYear']){
echo '<div id="wrap">';
include('header.php');
?>
<div class="container" style="background-color:#FFFFFF;">
<div class="text-primary shadows">
<h4 align="center"><b>Co-Curricular, Extension,Professional Development Related Activity</b></h4>
</div> <br>
<div class="row">
<div class="col-md-4" id="myNav">
<div class="panel panel-primary" >
<ul class="nav nav-tabs nav-pills nav-stacked" data-offset-top="190" style="width:100%;">
<li><a href="professionalDevelopmentActivity.php">Extension, Co-curricular & Field based activities<div class="pull-right"><i class="icon-chevron-right" ></i></div></a></li>
<li><a href="clmi.php">Contribution to Corporate Life and Management of the Institution<div class="pull-right"><i class="icon-chevron-right" ></i></div></a></li>
<li class="active"><a href="pda.php">Professional Development Activities<div class="pull-right"><i class="icon-chevron-right" ></i></div></a></li>
</ul>
</div>
</div>
<div class="col-md-8">
<div class="panel panel-primary" style="padding:3px 3px 3px 3px;">
<div class="panel-heading">
<h4 align="center"><b>Professional Development Activities</b></h4>
</div><br>
<form role="form" name="development" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" id="developmentForm">
<input class="btn btn-primary" type="submit" value="Save" name="developmentSave" />
<select name="dev" onChange="showUser(this.value, this.name)">
<option>--Activity--</option>
<?php
include('DBConnect.php');
$userId = $_SESSION['username'];
$year=$_SESSION['pbasYear'];
$query = mysqli_query($con,"SELECT * from Teach_PDA WHERE User_Id = '$userId' and year='$year'");
while($row = mysqli_fetch_assoc($query)){
?> <option><?php echo $row['Teach_PDA_TOA']; ?></option>
<?php } ?>
</select>
<input type="submit" class="btn btn-primary" value="Delete" name="developmentDelete" />
<input type="reset" class="btn btn-primary" value="Reset" name="reset" onClick="clear()" />
<div class="form-group">
<div id="dev"><br/>
<label>Type of Activity</label>
<input type="text" class="form-control required" name="typeOfActivity" title="Please Enter Type of Activity" required="required"/>
<br><label>Yearly/Semester wise responsibility</label>
<input type="text" class="form-control required" name="responsibility" title="Please Enter The Responsibility" required="required"/>
<br><label>API Score</label>
<input type="text" id="pd" class="form-control required" name="devApi" title="Please Enter API Score" required="required"/><br>
</div><!--End dev Id for Ajax -->
</div>
<input class="btn btn-primary" type="submit" value="Save" name="developmentSave" />
<select name="dev" onChange="showUser(this.value, this.name)">
<option>--Activity--</option>
<?php
include('DBConnect.php');
$userId = $_SESSION['username'];
$year=$_SESSION['pbasYear'];
$query = mysqli_query($con,"SELECT * from Teach_PDA WHERE User_Id = '$userId' and year='$year'");
while($row = mysqli_fetch_assoc($query)){
?> <option><?php echo $row['Teach_PDA_TOA']; ?></option>
<?php } ?>
</select>
<input type="submit" class="btn btn-primary" value="Delete" name="developmentDelete" />
<input type="reset" class="btn btn-primary" value="Reset" name="reset"/>
</form>
</div><!--end of panel-->
</div>
</div><!--end of row class -->
</div><!--end of container class -->
</div><!--end of wrap id -->
<?php
include('footer.php');
include('jsLinks.php');
?>
<!--JQuery Code For Form Validation -->
<script>
$(document).ready(function() {
//$('#curricularForm').validate();
//$('#contributionForm').validate();
//$('#developmentForm').validate();
//javascript code for clearing inputbox
$('form').on('reset', function (evt) {
evt.preventDefault();
$(this).find('input, select, textarea').each(function () {
if ($(this).is('input[type="radio"], input[type="checkbox"]')) {
if ($(this).is(':checked') !== $(this)[0].defaultChecked) {
$(this).val($(this)[0].defaultChecked);
$(this).trigger('click');
$(this).trigger('change');
}
} else {
if ($(this).val() !== $(this)[0].defaultValue) {
$(this).val($(this)[0].defaultValue);
$(this).change();
}
}
});
});//End for clearing inputbox code
}); // end ready()
</script>
<script>
function clearInput(){
document.getElementById("pd").value="";
}
function showUser(value, name)
{
if (value=="")
{
document.getElementById("lect").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
if(name == "curr"){
document.getElementById("curr").innerHTML=xmlhttp.responseText;
}
if(name == "contr"){
document.getElementById("cont").innerHTML=xmlhttp.responseText;
}
if(name == "dev"){
document.getElementById("dev").innerHTML=xmlhttp.responseText;
}
}
}
xmlhttp.open("GET","form_process/curricularShow.php?val="+value+"&name="+name,true);
xmlhttp.send();
}
</script>
<?php
}
else{
header('location:index.php');
}
?>
</body>
</html>