-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmorecompany.php
154 lines (144 loc) · 4.47 KB
/
morecompany.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
<?php require_once('./inc_theme/headerP.php') ?>
<?php require_once('./inc_theme/modal.php') ?>
<!-- Company adv -->
<section id="company-adv">
<div class="container-fluid text-center">
<div class="back-adv text-center col-md-4 col-sm-6 pull-right">
<h3>کسب و کار خود را به دیگران معرفی کنید</h3>
<?php
if (isset($_SESSION['usrLogin'])){
if($_SESSION['usrLogin'] != ""){
$User = new User();
$session = $_SESSION['usrLogin'];
$res = $User->SelectLoginUser($session);
foreach($res as $rows){
$unmae = $rows['_username'];
$ids = $rows['_id'];
}
if($unmae == $session){
?>
<button type="button" class="btn pull-left" id="btn-sabt1" onClick="window.location='./user/userprofile.php'"><i class="fa fa-angle-left" ></i> ثبت در پروفایل</button>
<?php
}
}
}else
{
?>
<button type="button" class="btn pull-left" data-toggle="modal" data-target="#RegModal" id="btn-sabt1"><i class="fa fa-angle-left" ></i> عضو شوید</button>
<?php
}
?>
</div>
</div>
</section>
<section id="company-advert">
<div class="container text-center">
<div class="row" style="padding: 0 50px">
<div class="last-mashaqel" style="float: right;position: relative;width: 100%">
<div class="head-mashaqel" style="width:100%;text-align:right;margin-top:-20px;margin-bottom:-15px;direction: rtl">
<div class="page-header text-right" style="border-color:#8657DB">
<h4>مشاغل تصادفی</h4>
</div>
</div>
<?php
$DB = new DB();
$Mashaqel = new Mashaqel();
$resM = $Mashaqel->ReadLastMashaqel();
foreach($resM as $rows)
{
?>
<div class="col-md-3 col-sm-6">
<div class="img-thumbss">
<img src="./_upload/mashaqel/<?php echo $rows['_coImage']; ?>" style="width: 250px;height: 250px;" class="img-responsive">
<figcaption>
<h3><?php echo $rows['_coname']; ?></h3>
<p>تعداد بازدید : <?php echo $rows['_visited']; ?> <i class="glyphicon glyphicon-stats"></i><br><a href="./co-detile.php?id=<?php echo $rows['_id']; ?>">مشاهده جزییات <i class="glyphicon glyphicon-menu-down"></i></a></p>
</figcaption>
</div>
</div>
<?php
}
?>
</div>
<div class="rand-mashaqel" style="float: right;position: relative;width: 100%">
<div class="head-mashaqel" style="width:100%;text-align:right;margin-top:10px;margin-bottom:-15px;direction: rtl">
<div class="page-header text-right" style="border-color:#8657DB">
<h4>لیست مشاغل</h4>
</div>
</div>
<?php
$DB = new DB();
$Mashaqel = new Mashaqel();
$limit = 8;
$resM = $Mashaqel->ReadRndMashaqel($limit);
$Mid = '';
foreach($resM as $rows)
{
?>
<div class="col-md-3 col-sm-6">
<div class="img-thumbss">
<img src="./_upload/mashaqel/<?php echo $rows['_coImage']; ?>" style="width: 250px;height: 250px;" class="img-responsive">
<figcaption>
<h3><?php echo $rows['_coname']; ?></h3>
<p>تعداد بازدید : <?php echo $rows['_visited']; ?> <i class="glyphicon glyphicon-stats"></i><br><a href="./co-detile.php?id=<?php echo $rows['_id']; ?>">مشاهده جزییات <i class="glyphicon glyphicon-menu-down"></i></a></p>
</figcaption>
</div>
</div>
<?php
$Mid = $rows['_id'];
}
?>
</div>
<?php
$Mashaqel = new Mashaqel();
$resC = $Mashaqel->MashaqelCount();
if($resC >= 8)
{
?>
<div class="more-adv col-xs-12">
<span><i class="glyphicon glyphicon-menu-down" name="btn-more" id="btn-mor" data-toggle="tooltip" data-placement="top" data-mid="<?php echo $Mid; ?>" title="مشاهده بیشتر"></i></span>
</div>
<?php
}
?>
</div>
</div>
</section>
<?php require_once('./inc_theme/footer.php') ?>
<?php require_once('./inc_theme/jquerylink.php') ?>
<script type="text/javascript">
$(document).ready(function(){
$("#btn-sabt").click(function(){
$(".fname").val("");
$(".uname").val("");
$(".email1").val("");
$(".pass1").val("");
$(".usertype").val(0);
$(".msg_error").hide();
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$(document).on('click','#btn-mor',function(){
var last_Mid = $(this).data('mid');
var lmd = true;
$.ajax({
url:"./inc_func/set-ajax.php",
method:"POST",
data:{last_Mid:last_Mid,lmd:lmd},
dataType:"Text",
success:function(data){
if(data != ''){
$(".more-adv").remove();
$(".rand-mashaqel").append(data);
}else{
$(".more-adv").hide();
}
}
});
});
});
</script>
</body>
</html>