-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwork.php
175 lines (168 loc) · 6.06 KB
/
work.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
<?php
require ('core.inc.php');
include_once 'connect.php';
if (loggedin()) {
include ('headerlogin.php');
}else {
include ('header.php');
}
?>
<html>
<head>
<script type="text/javascript">
function load1 () {
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}else {
xmlhttp = new ActiveObject('Microsoft.XMLHTTP');
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById('typeOfQuery').innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open('POST', 'hire.form.php', true)
xmlhttp.send ();
}
</script>
<title> Find Developers | The Hub </title>
</head>
<body>
<div id="typeOfQuery">
<div id="intro" class="text-xs-center">
<div class="text-center" id="intro-section">
<img src="img/thehub.jpg" width="60" height="60">
<div class="col-md-6 container">
<a onclick="load1()" onmouseover="toastr.info('For developers.');"><button class="btn btn-md indigo" type="submit">POST AD HERE</button></a><hr>
<form action="work.php" method="Get">
<div class="md-form input-group">
<input type="text" class="form-control inherit" name="search_skill" placeholder="Filter by skill" required>
<button class="btn btn-indigo btn-md" type="submit"><i class="fa fa-search"></i></button>
</div>
</form>
</div>
</div>
</div>
<?php
if (isset($_GET['search_skill'])&&!empty($_GET['search_skill'])) {
$search_skill = mysqli_real_escape_string($link, $_GET['search_skill']);
$query = "SELECT * FROM job_ad WHERE skill LIKE '%".$search_skill."%'";
$query_run = mysqli_query($link, $query);
@$count = mysqli_num_rows($query_run);
if ($count<1) {
echo '<div class="alert alert-danger">
No results found for "'.$search_skill.'". Please try with another skill
</div>';
}
else {
echo '<div class="alert alert-info">
'.$count .' results found for "'.$search_skill.'"
</div>';
}
while (@$row = mysqli_fetch_array($query_run)) {
echo '
<table class="table">
<tbody>
<tr>
<th scope="row">'.$row['id'].'</th>
<td><i class="fa fa-user blue-text"></i> '.$row['first_name'].'</td>
<td><i class="fa fa-user blue-text"></i> '.$row['last_name'].'</td>
<td><i class="fa fa-envelope red-text"></i> '.$row['email'].'</td>
<td><i class="fa fa-phone green-text"></i> '.$row['phone'].'</td>
<td><i class="fa fa-globe cyan-text"></i> '.$row['location'].'</td>
<td><i class="fa fa-gears"></i> '.$row['skill'].'</td>
<td><i class="fa fa-pencil indigo-text"></i> '.$row['text1'].'</td>
</tr>
</tbody>
</table>
</div>
</div>
';
}
}
?>
<div class="container-fluid">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Phone</th>
<th>Location</th>
<th>Skill</th>
<th>Extras</th>
</tr>
</thead>
<?php
include 'connect.php';
$sql= "SELECT * FROM job_ad ORDER BY id ASC";
$result = mysqli_query($link, $sql);
while (@$row = mysqli_fetch_array($result)) { echo '
<tbody>
<tr>
<th scope="row">'.$row['id'].'</th>
<td><i class="fa fa-user blue-text"></i> '.$row['first_name'].'</td>
<td><i class="fa fa-user blue-text"></i> '.$row['last_name'].'</td>
<td><i class="fa fa-envelope red-text"></i> '.$row['email'].'</td>
<td><i class="fa fa-phone green-text"></i> '.$row['phone'].'</td>
<td><i class="fa fa-globe cyan-text"></i> '.$row['location'].'</td>
<td><i class="fa fa-gears"></i> '.$row['skill'].'</td>
<td><i class="fa fa-pencil indigo-text"></i> '.$row['text1'].'</td>
</tr>
';}
?>
</tbody>
</table>
</div>
</div>
</body>
<!-- Central Modal Medium Info -->
<div class="modal fade" id="tipsss" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-bottom-right modal-side modal-notify modal-info" role="document">
<!--Content-->
<div class="modal-content">
<!--Header-->
<div class="modal-header">
<p class="heading lead">Tips from Hubbot</p>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true" class="white-text">×</span>
</button>
</div>
<!--Body-->
<div class="modal-body">
<section>
<div class="mdb-feed">
<div class="news">
<!--Label-->
<div class="label">
<img src="img/thehub.ico.jpg" alt="logo" class="rounded-circle z-depth-1-half">
</div>
<div class="excerpt">
<!--Added text-->
<div class="added-text">Hi there ! <span style="color: indigo">Your personal programming companion once again.</span> <p style="font-family: georgia;"> Find developers here to work together on projects. If you are a developer and available for some extra work, post your ad here.</p></div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#tipsss").modal('show');
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('.launch-modal').click(function() {
$('#tipsss').modal({
backdrop:'static'
});
});
});
</script>
</html>
<?php include 'footer.php';?>