119 lines
6.6 KiB
PHP
119 lines
6.6 KiB
PHP
<div class="client-info__with-shadow">
|
|
<div class="inner">
|
|
<div class="client-info__top-shadow">
|
|
|
|
</div>
|
|
<div class="additional-info">
|
|
<?php
|
|
$date = date("d.m.Y", strtotime($client->date_add));
|
|
list($d, $m, $y) = explode(".", $date);
|
|
$date_add = $d." ".getRusMonth($m)." ".$y;
|
|
?>
|
|
<div class="date"><?php echo $date_add?></div>
|
|
</div>
|
|
<?php $hideC_clEv = function_exists('should_hide_contacts_for_current_user') && should_hide_contacts_for_current_user(); ?>
|
|
<div class="client-name">
|
|
<h2><?php echo $hideC_clEv ? mask_fio_if_contains_phone($client->fio) : $client->fio; ?></h2>
|
|
</div>
|
|
<div class="main-info">
|
|
<div class="col first phone <?php if(!$client->phone) {echo "hidden";}?>">
|
|
<p class="small">Телефон</p>
|
|
<p><b class="big"><?php echo $hideC_clEv ? mask_client_phone($client->phone) : $client->phone; ?></b></p>
|
|
</div>
|
|
<div class="col second email <?php if(!$client->email) {echo "hidden";}?>">
|
|
<p class="small">Эл. почта</p>
|
|
<?php if ($hideC_clEv): ?>
|
|
<p><b class="big"><?php echo mask_client_email($client->email); ?></b></p>
|
|
<?php else: ?>
|
|
<p><b class="big"><a class="pseudo" target="_blank" href="mailto:<?php echo $client->email; ?>"><?php echo $client->email; ?></a></b></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="col first <?php if(!$client->type) {echo "hidden";}?>">
|
|
<p class="small">Тип недвижимости</p>
|
|
<p><b class="big"><?php echo $GLOBALS["TYPE_NEDV2"]["$client->type"]; ?></b></p>
|
|
</div>
|
|
<div class="col second <?php if(!$client->budget) {echo "hidden";}?>">
|
|
<p class="small">Примерный бюджет</p>
|
|
<p><b class="big"><?php echo $client->budget; ?></b></p>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
<div class="description <?php if(!$client->opis) {echo "hidden";}?>">
|
|
<p class="small">Описание</p>
|
|
<p class="desc"><?php echo $client->opis; ?></p>
|
|
</div>
|
|
<?php
|
|
|
|
$sql2 = "SELECT sended_pdf.*, DATE_FORMAT(sended_pdf.date_send, '%d.%m.%Y') AS date_f,
|
|
DATE_FORMAT(sended_pdf.date_send, '%H:%i') AS time_f, archive.phone, archive.sobstv, 0 as newbild FROM sended_pdf,
|
|
archive WHERE sended_pdf.id_client=$client->id AND archive.id_obj=sended_pdf.id_object UNION ALL SELECT sended_pdf_newbuildings.*,
|
|
DATE_FORMAT(sended_pdf_newbuildings.date_send, '%d.%m.%Y') AS date_f, DATE_FORMAT(sended_pdf_newbuildings.date_send, '%H:%i') AS time_f,
|
|
null as phone, null as sobstv, 1 as newbild FROM sended_pdf_newbuildings WHERE sended_pdf_newbuildings.id_client=$client->id ORDER BY `date_send`DESC";
|
|
$rez2 = mysql_query($sql2);
|
|
$pdf_str = ""; $pdf_date_old = ""; $i = 0;
|
|
$all_sended_pdf = mysql_num_rows($rez2);
|
|
while($pdf = mysql_fetch_assoc($rez2))
|
|
{
|
|
if($pdf['date_f'] != $pdf_date_old)
|
|
{
|
|
if($i != 0) $pdf_str .= "</ul></div>";
|
|
list($d,$m,$y) = explode(".",$pdf['date_f']);
|
|
$date_f = $d." ".getRusMonth($m)." ".$y;
|
|
if($i != $all_sended_pdf) {
|
|
$pdf_str .= "<div class='by-date'>
|
|
<p><a href='#' style='font-weight: normal; border-bottom-style: dashed;' class='open_folder' data-id='$i$client->id'>$date_f</a></p>
|
|
<ul class='hidden link$i$client->id' style='display: none;'>";
|
|
$pdf_str .="<div class='pdf-resend__container'>
|
|
<div class='pdf-resend__all'>
|
|
<input type='radio' class='hidden--radio' id='' name='' value=''>
|
|
<span>Отправить все презентации <i class='ti-back-right'></i></span>
|
|
<label style='z-index:500' class='label-overlay to_resend__all' for='' id=''> </label>
|
|
</div>
|
|
</div>";
|
|
}
|
|
}
|
|
$i++;
|
|
$pdf_str .= "<li " . ($pdf['newbild'] == 1 ? "style='padding-right:0;border-right:0;'" : "") . ">
|
|
<span class='tooltip tooltip-effect'>
|
|
<div class='pdf-object'>
|
|
<a href='$pdf[path]' target='_blank'>
|
|
<span class='name'>$pdf[time_f]</span>
|
|
<i class='ti-arrow-right'></i>
|
|
<span class='address'>$pdf[nazv]</span>
|
|
</a>
|
|
</div>" . ($pdf['newbild'] == 1 ? "" : "
|
|
<div class='pdf-resend pdf-resend_$pdf[id_object] ".(@in_array($pdf['id_object'],$_SESSION['to_send']) ? "active" : "")."'>
|
|
<input type='radio' class='hidden--radio' id='$pdf[id]_$pdf[id_object]' name='' value=''>
|
|
<span><i class='ti-back-right'></i></span>
|
|
<label style='z-index:500' class='label-overlay to_resend object_$pdf[id_object] ".(@in_array($pdf['id_object'],$_SESSION['to_send']) ? "active" : "")."' data-id='$pdf[id_object]' for='$pdf[id]_$pdf[id_object]'> </label>
|
|
</div> ") . "
|
|
<span class='tooltip-content' style='width:170px; margin:0 60px 10px 0;'>
|
|
<b class='tooltip-text'>" . ($pdf['newbild'] == 1 ? "Новостройка" : $pdf['phone'] . " " . $pdf['sobstv']) ."</b>
|
|
</span>
|
|
</span>
|
|
</li>";
|
|
|
|
$pdf_date_old = $pdf['date_f'];
|
|
if($i == $all_sended_pdf) $pdf_str .= "</ul></div>";
|
|
}
|
|
|
|
?>
|
|
<div class="variants <?php if(strlen($pdf_str) == 0) {echo "hidden";}?>">
|
|
<a href="#" class="toggleVariants0" data-id="<?php echo $client->id; ?>">
|
|
<span>Предложенные варианты</span>
|
|
<span class="simple_button">
|
|
<i class="ti-angle-down"></i>
|
|
<i class="ti-angle-up"></i>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
<div class="presentations hidden">
|
|
<?php echo $pdf_str; ?>
|
|
<div class="clear"></div>
|
|
</div>
|
|
</div>
|
|
<div class="client-info__bottom-shadow">
|
|
|
|
</div>
|
|
</div>
|