textsearch.blade.php
3.72 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
<style>
.table_hrm_heading_green{
padding: 7px 9px;
text-align: center;
background-color: #D5FFF5;
border: 5px solid #fff;
font-weight: 600;
}
.table_hrm_heading_green:first-child{
border-left: 0px;
}
.table_hrm_cells{
padding: 5px 7px;
color:#434a54;
}
.table_hrm_cells a{
color:#434a54;
}
.table_hrm_celltext{
border: 1px solid #ccd0d9;
border-color: #ccd0d9 !important;
border-radius: 3px !important;
padding: 3px 7px;
text-align: center;
}
</style>
<?php
if(isset($_POST['esstring']))
{
$searchstr=Input::get('esstring');
$estatus=array_filter(explode(",",Input::get("estatus")));
$esstr="";if(!empty($estatus))$esstr=" and currentstatus not in ('".implode("','",$estatus)."')";
$users=array();
if(trim($searchstr)!="")$users=$wakka->getPersons(" match(peopledata) against('$searchstr*' IN BOOLEAN MODE) $esstr limit 200");
foreach($users as $user)
{
$ppldata=unserialize($user['peopledata']);
$pass=1;
if($wakka->GetBBBUserData("readotherdata")=="No"&&!$wakka->recordReadAccess($ppldata))$pass=0;
if($pass)
{
$searchresult.="<tr onclick='showRecruit($user[id]);'><td>$user[id]</td><td>".$ppldata['firstname']." ".$ppldata['lastname']."</td><td>[".$ppldata['nationality'].":".$ppldata['passportno'].":".$ppldata['currentstatus']."] Mob:".$ppldata['mobile'].", Client:".$ppldata['client']."</td></tr>";
}
}
$searchresultF.='</table>';
if($searchresult!="")
{
echo "<table class='footable table' cellpadding=0 cellspacing=0 style='border-bottom:black 2px solid;margin-bottom:20px'>
<thead><tr>
<td class=table_hrm_heading_green>ID</th>
<td class=table_hrm_heading_green>Name</th>
<td class=table_hrm_heading_green>Values</th>
</tr></thead>$searchresult</table>";
}
else echo "<h2>No Records Found!</h2>";
}
else
{
?>
<div class="layout-app"><!-- row-app -->
<div class="row row-app">
<div class="col-separator col-separator-first box" style='height:auto!important;overflow:hidden'>
<div class="col-md-12">
<div class=innerAll>
<fieldset style='margin-bottom:2%'>
<span style="color: #fb6e52;">Below Generic Text search should only be used when quick search is not applicable. This search is slow and may take long time.</span><br><br>
<label class='label_new'>Excluded Status</label>
<select name=currentstatus2 id=currentstatus2 multiple='' data-rel=chosen class=select2multi style='width:40%'>
<?php
$clients=explode("~",$kformlib->FormSelectVals['currentstatus']);
foreach($clients as $clientval){echo "<option value='$clientval'>$clientval</option>";}
?>
<option value='<?php echo $wakka->HRCoreVars["systemExitStatus"]; ?>' selected=selected><?php echo $wakka->HRCoreVars["systemExitStatus"]; ?></option>
</select>
<div style='clear:both;height: 10px;'></div>
<label class='label_new'>Search</label><input type=text class='form_new mrgn' size=75 name=eeid id=eeid> <input type=button class='btn btn-green' onclick="eeSearch();" value="Search">
<div style='clear:both;height: 10px;'></div>
</fieldset>
<div id=employeeresult></div><div style='clear:both'></div>
<div id=searchresults></div><div style='clear:both'></div>
<div id=divworking></div><div style='clear:both'></div>
</div>
</div>
<div style='clear:both;'></div>
</div>
</div>
</div><!-- // END row-app -->
<script>
function eeSearch()
{
var postdata="esstring="+$('#eeid').val()+'&estatus='+$("#currentstatus2").val();
doAjax("record?action=textsearch",postdata,"employeeresult","esajaxMutex","esvarajax");
return false;
}
</script>
<?php
}
?>