-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch-application.php
235 lines (202 loc) · 8.36 KB
/
search-application.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
<?php
session_start();
error_reporting(0);
include ('includes/class-autoload.inc.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
if(isset($_POST['submit']))
{
$coursename=$_POST['coursename'];
$query=mysqli_query($con, "insert into tblcourse(CourseName) value('$coursename')");
if ($query) {
$msg="Course has been added.";
}
else
{
$msg="Something Went Wrong. Please try again";
}
}
?>
<!DOCTYPE html>
<html class="loading" lang="en" data-textdirection="ltr">
<head>
<title>Admin | Search Application</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Quicksand:300,400,500,700"
rel="stylesheet">
<link href="https://maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome.min.css"
rel="stylesheet">
<link rel="stylesheet" type="text/css" href="app-assets/css/vendors.css">
<link rel="stylesheet" type="text/css" href="app-assets/css/app.css">
<link rel="stylesheet" type="text/css" href="app-assets/css/core/menu/menu-types/vertical-menu-modern.css">
<link rel="stylesheet" type="text/css" href="app-assets/css/core/colors/palette-gradient.css">
<link rel="stylesheet" type="text/css" href="app-assets/css/plugins/forms/extended/form-extended.css">
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 20px 0 0px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>
</head>
<body class="vertical-layout vertical-menu-modern 2-columns menu-expanded fixed-navbar"
data-open="click" data-menu="vertical-menu-modern" data-col="2-columns">
<?php include('includes/header.php');?>
<?php include('includes/leftbar.php');?>
<div class="app-content content">
<div class="content-wrapper">
<div class="content-header row">
<div class="content-header-left col-md-6 col-12 mb-2 breadcrumb-new">
<h3 class="content-header-title mb-0 d-inline-block">
Search Application
</h3>
<div class="row breadcrumbs-top d-inline-block">
<div class="breadcrumb-wrapper col-12">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a>
</li>
</li>
<li class="breadcrumb-item active">Search Application</li>
</ol>
</div>
</div>
</div>
</div>
<div class="content-body">
<!-- Input Mask start -->
<!-- Formatter start -->
<form name="search" method="post" >
<section class="formatter" id="formatter">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4 class="card-title">Search Applications</h4>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?>
<div class="heading-elements">
<ul class="list-inline mb-0">
<li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
<li><a data-action="expand"><i class="ft-maximize"></i></a></li>
</ul>
</div>
</div>
<div class="card-content">
<div class="card-body">
<div class="row">
<div class="col-xl-6 col-lg-12">
<fieldset>
<h5>Search by Student Name / Email id / Contact number
</h5>
<div class="form-group">
<input class="form-control white_bg" id="searchdata" type="text" name="searchdata" required>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-xl-6 col-lg-12">
<button type="submit" name="search" class="btn btn-info btn-min-width mr-1 mb-1">Search</button>
</div>
</div>
</form>
<?php
if(isset($_POST['search']))
{
$sdata =$_POST['searchdata'];
?>
<h4 align="center">Result againt "<?php echo $sdata;?>" keyword </h4>
<div class="row">
<div class="col-xl-12 col-lg-12">
<table class="table mb-0">
<thead>
<tr>
<th>S.NO</th>
<th>Course Applied</th>
<th>First Name</th>
<th>Last Name</th>
<th>Mobile Number</th>
<th>Email</th>
<th>Action</th>
</tr>
</thead>
<?php
//$ret=mysqli_query($con,"select tbladmapplications.CourseApplied,tbladmapplications.ID as apid, tbluser.FirstName,tbluser.LastName,tbluser.MobileNumber,tbluser.Email from tbladmapplications inner join tbluser on tbluser.ID=tbladmapplications.UserId where tbluser.FirstName like '%$sdata%' || tbluser.MobileNumber like '%$sdata%' || tbluser.Email like '%$sdata%'");
$applicantsObj = new ServiceView();
$res = $applicantsObj->searchedApplication($sdata);
$cnt=1;
//$num=mysqli_num_rows($ret);
if($res)
{
foreach ($res as $row) {
?>
<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row['syllabus'];?></td>
<td><?php echo $row['ename'];?></td>
<td><?php echo $row['mmname'];?></td>
<td><?php echo $row['mobile'];?></td>
<td><?php echo $row['email'];?></td>
<td><a href="view-appform.php?aticid=<?php echo $row['apid'];?>">View Details</a></td>
</tr>
<?php
$cnt=$cnt+1;
} } else { ?>
<tr align="center">
<td colspan="7" style="color:red; font-size: 16px;">No Record found against this search</td>
</tr>
<?php } ?>
</table>
</div>
</div>
<?php }?>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Formatter end -->
</div>
</div>
</div>
<!-- ////////////////////////////////////////////////////////////////////////////-->
<?php include('includes/footer.php');?>
<!-- BEGIN VENDOR JS-->
<script src="app-assets/vendors/js/vendors.min.js" type="text/javascript"></script>
<script src="app-assets/vendors/js/forms/extended/typeahead/typeahead.bundle.min.js"
type="text/javascript"></script>
<script src="app-assets/vendors/js/forms/extended/typeahead/bloodhound.min.js"
type="text/javascript"></script>
<script src="app-assets/vendors/js/forms/extended/typeahead/handlebars.js"
type="text/javascript"></script>
<script src="app-assets/vendors/js/forms/extended/inputmask/jquery.inputmask.bundle.min.js"
type="text/javascript"></script>
<script src="app-assets/vendors/js/forms/extended/formatter/formatter.min.js"
type="text/javascript"></script>
<script src="../../../app-assets/vendors/js/forms/extended/maxlength/bootstrap-maxlength.js"
type="text/javascript"></script>
<script src="app-assets/vendors/js/forms/extended/card/jquery.card.js" type="text/javascript"></script>
<script src="app-assets/js/core/app-menu.js" type="text/javascript"></script>
<script src="app-assets/js/core/app.js" type="text/javascript"></script>
<script src="app-assets/js/scripts/customizer.js" type="text/javascript"></script>
<script src="app-assets/js/scripts/forms/extended/form-typeahead.js" type="text/javascript"></script>
<script src="app-assets/js/scripts/forms/extended/form-inputmask.js" type="text/javascript"></script>
<script src="app-assets/js/scripts/forms/extended/form-formatter.js" type="text/javascript"></script>
<script src="app-assets/js/scripts/forms/extended/form-maxlength.js" type="text/javascript"></script>
<script src="app-assets/js/scripts/forms/extended/form-card.js" type="text/javascript"></script>
</body>
</html>
<?php } ?>