-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemployers.php
148 lines (119 loc) · 4.39 KB
/
employers.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
<?php
require_once 'constants/connection.php';
require_once 'constants/settings.php';
require_once 'constants/check-login.php';
global $conn;
if (isset($_GET['page'])) {
$page = $_GET['page'];
if ($page=="" || $page=="1")
{
$page1 = 0;
$page = 1;
}else{
$page1 = ($page*16)-16;
}
}else{
$page1 = 0;
$page = 1;
}
require 'headerPrincipal.php';
?>
<style>
.autofit2 {
height:100px;
width:100px;
object-fit:cover;
}
</style>
<body class="not-transparent-header">
<div class="container-wrapper">
<div class="main-wrapper">
<div class="breadcrumb-wrapper">
<div class="container">
<ol class="breadcrumb-list booking-step">
<li><a href="./">Inicio</a></li>
<li><span>Empresas</span></li>
</ol>
</div>
</div>
<div class="section sm">
<div class="container">
<div class="sorting-wrappper alt">
<div class="GridLex-grid-middle">
<div class="GridLex-col-3_sm-12_xs-12">
<div class="sorting-header">
<h3 class="sorting-title">Empresas</h3>
</div>
</div>
</div>
</div>
<div class="company-grid-wrapper top-company-2-wrapper">
<div class="GridLex-gap-30">
<div class="GridLex-grid-noGutter-equalHeight">
<?php
$stmt = $conn->prepare("SELECT * FROM tbl_users WHERE role = 'employer' ORDER BY first_name LIMIT $page1,16");
$stmt->execute();
$result = $stmt->fetchAll();
foreach($result as $row):
$complogo = $row['avatar'];
?>
<div class="GridLex-col-3_sm-4_xs-6_xss-12">
<div class="top-company-2">
<a target="_blank" href="company.php?ref=<?php echo $row['member_no']; ?>">
<div class="image">
<?php
if ($complogo == null) {
print '<center><img class="autofit2" alt="image" src="images/blank.png"/></center>';
}else{
echo '<center><img class="autofit2" alt="image" src="data:image/jpeg;base64,'.base64_encode($complogo).'"/></center>';
}
?>
</div>
<div class="content">
<h5 class="heading text-primary font700"><?=$row['first_name']?></h5>
<p class="texting font600"><?=$row['title']?><p>
<p class="mata-p clearfix"><span class="text-primary font700">25</span> <span class="font13">Publicaciones</span> <span class="pull-right icon"><i class="fa fa-long-arrow-right"></i></span></p>
</div>
</a>
</div>
</div>
<?php
endforeach; ?>
</div>
</div>
</div>
<div class="pager-wrapper">
<ul class="pager-list">
<?php
$stmt = $conn->prepare("SELECT * FROM tbl_users WHERE role = 'employer' ORDER BY first_name");
$stmt->execute();
$result = $stmt->fetchAll();
$total_records = $stmt->rowCount();
?>
<?php
$records = $total_records/16;
$records = ceil($records);
if ($records > 1 ) {
$prevpage = $page - 1;
$nextpage = $page + 1;
print '<li class="paging-nav" '; if ($page == "1") { print 'class="disabled"'; } print '><a '; if ($page == "1") { print ''; } else { print 'href="employers.php?page='.$prevpage.'"';} print '><i class="fa fa-chevron-left"></i></a></li>';
for ($b=1;$b<=$records;$b++)
{
?><li class="paging-nav" ><a <?php if ($b == $page) { print ' style="background-color:#33B6CB; color:white" '; } ?> href="employers.php?page=<?php echo "$b"; ?>"><?php echo $b." "; ?></a></li><?php
}
print '<li class="paging-nav"'; if ($page == $records) { print 'class="disabled"'; } print '><a '; if ($page == $records) { print ''; } else { print 'href="employers.php?page='.$nextpage.'"';} print '><i class="fa fa-chevron-right"></i></a></li>';
}
?>
</ul>
</div>
</div>
</div>
</div>
<?php include_once "footer.php"; ?>
</div>
</div>
<div id="back-to-top">
<a href="#"><i class="fa fa-arrow-up"></i></a>
</div>
</body>
</html>