-
Notifications
You must be signed in to change notification settings - Fork 23
/
assign_spec_sub.php
92 lines (89 loc) · 3.24 KB
/
assign_spec_sub.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
<?php
include './Database/Controler.php';
include 'header_admin.php';
?>
<script src="https://code.jquery.com/jquery-1.12.4.js"> </script>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>-->
<script language="javascript" type="text/javascript">
function getfac(div)
{
var crs=document.getElementById("c_id").value;
//alert(crs);
if(div)
{
$.ajax({
type:"GET",
url:"dropdown.php",
data:"crs_spec="+crs+" "+div,
success:function(result)
{
$("#DataTables_Table_0").html(result);
}
});
}
}
</script>
<?php
if($_SESSION["role"]==1)
{
?>
<h2>Assign Special Subjects to Student</h2>
</div>
</div>
<!-- /. ROW -->
<div class="row">
<div class="col-md-12">
<!-- Advanced Tables -->
<div class="panel panel-default">
<div class="panel-body">
<div class="table-responsive">
<form method="post" >
<table class="table table-striped table-bordered table-hover" id="dataTables-example1">
<tr>
<td>
<b>Select Stream :<select class="form-control" id="c_id" name="c_id">
<option value="">Select Stream</option>
<?php if(isset($crs))
{
$cnt=0;
foreach($crs as $c)
{
$cnt++; ?>
<option value="<?php echo $c->c_id; ?>"><?php echo $c->cname; ?></option>
<?php if($cnt=='2'){break;}}}?>
</select></b> </td>
<td>
<b>Select Division :<select class="form-control" id="division" name="division" onChange="return getfac(this.value)">
<option value="">Select Division</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
</select></b> </td>
</tr>
</table>
<table class="table table-bordered table-striped table-hover js-basic-example dataTable" id="DataTables_Table_0" role="grid" aria-describedby="DataTables_Table_0_info">
</table>
</form>
</div>
</div>
</div>
<!--End Advanced Tables -->
</div>
</div>
<!-- /. ROW -->
</div>
</div>
<!-- /. PAGE INNER -->
</div>
<?php
}
else
{
?>
<div class="row">
<div class="col-md-12"></div>
<img src="img/ad.jpg">
<?php
}
include 'footer.php';
?>