-
Notifications
You must be signed in to change notification settings - Fork 7
/
ayear_edit.php
291 lines (233 loc) · 8.69 KB
/
ayear_edit.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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<?php
include_once('include/db-connect.php');
include_once("functions.php");
admin_logincheck();
$admin=$_SESSION['uname'];
$mobile=$_SESSION['mobile'];
if(isset($_REQUEST['Id']))
{
$ayear_id=$_REQUEST['Id'];
$db->setFetchMode(DB_FETCHMODE_ORDERED);
$sql='select * from academicyears where ayear_id = ?';
$exe_query=& $db->query($sql, $ayear_id);
$row=$exe_query->numRows();
if($row==1)
{
$data=& $exe_query->fetchRow();
}
else
{
header('Location:add-academic.php');
}
}
else
{
header('Location:add-academic.php');
}
if(isset($_POST['sub']) && $_POST['sub']=='Update')
{
$new_year=mysql_real_escape_string(trim($_POST['ayear']));
$update_query="update academicyears set ayear_name='$new_year' where ayear_id='{$ayear_id}'" ;
$exe_query2=& $db->query($update_query);
if($exe_query2)
{
include("add-academic.php");
echo '<script> alert("Academic Year Updated Successfully") </script>';
echo '<script language="JavaScript"> window.location.href ="add-academic.php" </script>';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<!-- Title and other stuffs -->
<title>College - Admin Panel</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<!-- Stylesheets -->
<link href="style/bootstrap.css" rel="stylesheet">
<!-- Font awesome icon -->
<link rel="stylesheet" href="style/font-awesome.css">
<!-- jQuery UI -->
<link rel="stylesheet" href="style/jquery-ui-1.9.2.custom.min.css">
<!-- Calendar -->
<link rel="stylesheet" href="style/fullcalendar.css">
<!-- prettyPhoto -->
<link rel="stylesheet" href="style/prettyPhoto.css">
<!-- Star rating -->
<link rel="stylesheet" href="style/rateit.css">
<!-- Date picker -->
<link rel="stylesheet" href="style/bootstrap-datetimepicker.min.css">
<!-- CLEditor -->
<link rel="stylesheet" href="style/jquery.cleditor.css">
<!-- Uniform -->
<link rel="stylesheet" href="style/uniform.default.html">
<!-- Uniform -->
<link rel="stylesheet" href="style/daterangepicker-bs3.css" />
<!-- Bootstrap toggle -->
<link rel="stylesheet" href="style/bootstrap-switch.css">
<!-- Main stylesheet -->
<link href="style/style.css" rel="stylesheet">
<!-- Widgets stylesheet -->
<link href="style/widgets.css" rel="stylesheet">
<!-- Gritter Notifications stylesheet -->
<link href="style/jquery.gritter.css" rel="stylesheet">
<!-- HTML5 Support for IE -->
<!--[if lt IE 9]>
<script src="js/html5shim.js"></script>
<![endif]-->
<script type="text/javascript">
function valid_details()
{
if(document.getElementById('batch').value=="")
{
alert("Please Enter Batch");
document.getElementById('batch').focus();
return false;
}
}
</script>
</head>
<body>
<header>
<div class="navbar navbar-fixed-top bs-docs-nav" role="banner">
<div class="container">
<!-- Menu button for smallar screens -->
<div class="navbar-header">
<button class="navbar-toggle btn-navbar" type="button" data-toggle="collapse" data-target=".bs-navbar-collapse"><span>Menu</span></button>
<a href="#" class="pull-left menubutton hidden-xs"><i class="fa fa-bars"></i></a>
<!-- Site name for smallar screens -->
<a href="index.php" class="navbar-brand">Admin<span class="bold">Panel</span></a>
</div>
<!-- Navigation starts -->
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<!-- Links -->
<ul class="nav navbar-nav pull-right">
<li class="dropdown pull-right user-data">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">
<?php echo $admin; ?><b class="caret"></b>
</a>
<!-- Dropdown menu -->
<ul class="dropdown-menu">
<li><a href="change-phone.php"><i class="fa fa-phone"></i>Change Phone</a></li>
<li><a href="change-pass.php"><i class="fa fa-cogs"></i>Change Password</a></li>
<li><a href="logout.php"><i class="fa fa-key"></i> Logout</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
</header>
<!-- Main content starts -->
<div class="content">
<?php
include_once('header.php');
?>
<!-- Main bar -->
<div class="mainbar">
<!-- Page heading -->
<div class="page-head">
<h2 class="pull-left">Updating Batch</h2>
<div class="clearfix"></div>
<div class="clearfix"></div>
</div>
<!-- Page heading ends -->
<!-- Matter -->
<div class="matter">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="widget">
<div class="widget-head">
<div class="pull-left">Update Batch</div>
<div class="clearfix"></div>
</div>
<div class="widget-content">
<div class="padd">
<!-- Form starts. -->
<form class="form-horizontal" role="form" method="post" action="" onsubmit="return valid_details();">
<div class="form-group">
<label class="col-lg-4 control-label">Batch</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="ayear" id="ayear" value="<?php echo $data[2]; ?>">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-6 col-lg-9">
<input type="submit" class="btn btn-info" name="sub" value="Update">
</div>
</div>
</form>
</div>
</div>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
<!-- Matter ends -->
</div>
<!-- Mainbar ends -->
<div class="clearfix"></div>
</div>
<!-- Content ends -->
<!-- Footer starts -->
<footer>
<div class="container">
<div class="row">
<div class="col-md-12">
<!-- Copyright info -->
<p class="copy">Copyright © 2014 | <a href="#">IT GEEK HUB</a> </p>
</div>
</div>
</div>
</footer>
<!-- Footer ends -->
<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="fa fa-chevron-up"></i></a></span>
<!-- JS -->
<script src="js/jquery.js"></script> <!-- jQuery -->
<script src="js/bootstrap.js"></script> <!-- Bootstrap -->
<script src="js/jquery-ui-1.9.2.custom.min.js"></script> <!-- jQuery UI -->
<script src="js/fullcalendar.min.js"></script> <!-- Full Google Calendar - Calendar -->
<script src="js/jquery.rateit.min.js"></script> <!-- RateIt - Star rating -->
<script src="js/jquery.prettyPhoto.js"></script> <!-- prettyPhoto -->
<!-- Morris JS -->
<script src="js/raphael-min.js"></script>
<script src="js/morris.min.js"></script>
<!-- jQuery Flot -->
<script src="js/excanvas.min.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="js/jquery.flot.resize.js"></script>
<script src="js/jquery.flot.pie.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<!-- jQuery Notification - Noty -->
<script src="js/jquery.noty.js"></script> <!-- jQuery Notify -->
<script src="js/themes/default.js"></script> <!-- jQuery Notify -->
<script src="js/layouts/bottom.js"></script> <!-- jQuery Notify -->
<script src="js/layouts/topRight.js"></script> <!-- jQuery Notify -->
<script src="js/layouts/top.js"></script> <!-- jQuery Notify -->
<!-- jQuery Notification ends -->
<!-- Daterangepicker -->
<script src="js/moment.min.js"></script>
<script src="js/daterangepicker.js"></script>
<script src="js/sparklines.js"></script> <!-- Sparklines -->
<!-- <script src="js/jquery.gritter.min.js"></script> jQuery Gritter -->
<script src="js/jquery.cleditor.min.js"></script> <!-- CLEditor -->
<script src="js/bootstrap-datetimepicker.min.js"></script> <!-- Date picker -->
<script src="js/jquery.uniform.min.html"></script> <!-- jQuery Uniform -->
<script src="js/jquery.slimscroll.min.js"></script> <!-- jQuery SlimScroll -->
<script src="js/bootstrap-switch.min.js"></script> <!-- Bootstrap Toggle -->
<script src="js/filter.js"></script> <!-- Filter for support page -->
<script src="js/custom.js"></script> <!-- Custom codes -->
<script src="js/charts.js"></script> <!-- Charts & Graphs -->
<script src="js/index.js"></script> <!-- Index Javascripts -->
</body>
</html>