-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActionPlan-Returned.php
More file actions
164 lines (157 loc) · 4.35 KB
/
Copy pathActionPlan-Returned.php
File metadata and controls
164 lines (157 loc) · 4.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="jquery.min.js"></script>
<link href="style.css" type="text/css" rel="stylesheet">
<!-- CSS FOR PROGRESS SECTION -->
<link href='progress.css' rel='stylesheet' />
<!-- INCLUDE FOR ICON -->
<?php include ('icon.php'); ?>
<style>
/* Remove the navbar's default margin-bottom and rounded borders */
.navbar {
margin-bottom: 0;
border-radius: 0;
}
/* Set height of the grid so .sidenav can be 100% (adjust as needed) */
.row.content {height: 450px}
/* Set gray background color and 100% height */
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
height: 700px;
}
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: white;
padding: 15px;
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {height:auto;}
}
</style>
</head>
<body>
<?php include('MainTabs.php'); ?>
<div class="container-fluid text-center">
<div class="row content">
<?php include ('ActionPlan-sidetabs.php') ?>
<div class="col-sm-8 text-left" >
<h2 style="text-align:center;">CSIT Action Plan 2017-2018</h2>
<br>
<div class = "container">
<div class = "col-sm-10">
<div class="table"></div>
</div>
</div>
</div>
<?php include ('progress-section.php'); ?>
</div>
</div>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<!-- Modal From pop-up-select.php !-->
<div id = "show_table"></div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
fetchEvents();
//SHOW THE TABLE OF EVENTS
function fetchEvents(page) {
$.ajax({
url:"AddedPane-select-returned-ActionPlan.php",
method:"POST",
success:function(data){
$('.table').html(data);
}
});
}
$(document).on('click','.pagination_link',function(){
var page = $(this).attr("id");
fetchEvents(page);
});
///SHOWS MODAL WHEN BUTTON ADD IS CLICKED
$(document).on('click','#btn_popup', function (){
$.ajax({
type:'POST',
url:'actionPlan-pop-up-select.php',
dataType:"text",
success:function(data){
$('#show_table').html(data);
}
});
});
//TO VIEW POP UP
$(document).on('click','#btn_view', function (){
var id=$(this).data("id4");
$.ajax({
type:'POST',
url:'actionPlan-pop-up-events-view.php',
data:{id:id},
dataType:"text",
success:function(data){
$('#show_table').html(data);
}
});
});
//to OPEN
$(document).on('click','#btn_edit', function (){
var id=$(this).data("id5");
$.ajax({
type:'POST',
url:'actionPlan-pop-up-events-edit.php',
data:{id:id},
dataType:"text",
success:function(data){
$('#show_table').html(data);
}
});
});
//to UPDATE
$(document).on('click','#btn_update', function (){
var id = $(this).data("idunique");
var title = $('#title').val();
var place = $('#place').val();
var proponent = $('#proponent').val();
var notes = $('#notes').val();
var situation = 'Pending';
var sy = $('#sy-select').val();
if(title == '')
{
alert("Enter Title of the Event");
return false;
}
if(place == '')
{
alert("Enter Date");
return false;
}
$.ajax({
url:"actionPlan-pop-up-update.php",
method:"POST",
data:{id:id,title:title,place:place,notes:notes,situation:situation,proponent:proponent,sy:sy},
dataType:"text",
success:function(data){
alert(data);
fetchEvents();
}
});
});
});
fetchEvents();
</script>