Actual
This commit is contained in:
parent
4f75565a2f
commit
458015291b
@ -39,8 +39,8 @@ if ($_SESSION['id'] && ((isset($_GET['id']) && is_numeric($_GET['id']) && $_GET[
|
||||
$rez = mysql_query($sql);
|
||||
$clientEventCount = mysql_result($rez,0);
|
||||
|
||||
// суммарное количество событий по объектам и пользователям
|
||||
$sumCount = intval($objectEventCount) + intval($clientEventCount);
|
||||
// суммарное количество событий по объектам, клиентам и найденным листингам
|
||||
$sumCount = intval($objectEventCount) + intval($clientEventCount) + get_user_listing_tasks_count($_SESSION['id']);
|
||||
|
||||
echo "<script>$('#calendarCounter').html('".$sumCount."');</script>";
|
||||
|
||||
@ -185,7 +185,7 @@ ORDER BY date_sort ASC";
|
||||
}
|
||||
|
||||
}
|
||||
/* if($get['req_id'] == 560779){
|
||||
/* if($_SESSION['id'] == 5238){
|
||||
echo $sql;
|
||||
}*/
|
||||
|
||||
@ -1062,67 +1062,67 @@ ORDER BY date_sort ASC";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($event['type'] == 'deal') {
|
||||
$date = date("d.m.Y", strtotime($event['schedule_date']));
|
||||
list($d, $m, $y) = explode(".", $date);
|
||||
$deal_id_for_edit = !empty($event['deal_id']) ? intval($event['deal_id']) : null;
|
||||
?>
|
||||
<div class="chat-block<?=$class_ev?>">
|
||||
<div class="chat-author">
|
||||
<div class="pic">
|
||||
<?php
|
||||
if(empty($event['user_logo'])){
|
||||
?>
|
||||
<?php if(empty($event['user_logo'])){ ?>
|
||||
<img src="/images/user-pic.svg"/>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<?php } else { ?>
|
||||
<img src="/photos/agency/<?=$event['user_logo']?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
<div class="fio_user" title="<?=$event['user_fio']?>"><?=$event['user_fio']?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-message <?=($event['cancel']==1) ? 'cancel' : ''?> deal">
|
||||
<?php
|
||||
$deal_id_for_edit = !empty($event['deal_id']) ? intval($event['deal_id']) : null;
|
||||
?>
|
||||
<?php if (!$deal_id_for_edit) { ?>
|
||||
<!-- Старая сделка (без deal_id) — галочка + отмена -->
|
||||
<div class="chat-complete<?=!in_array($event['user_id'], $usersCanEdit) ? ' hidden' : '' ?>">
|
||||
<div class="complete-button" data-id="<?=$event['id']?>">
|
||||
<input type="checkbox" class=""/>
|
||||
<div class="complete-action-button<?=($event['calendar_view'] == 1) ? ' active' : ''?>" id="groupAB__<?=$event['id']?>" data-cancel="<?=$event['cancel']?>" title="Выполнено">
|
||||
<span class="check-button-box"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="512px" height="512px">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M505.943,79.594c-8.077-8.077-21.172-8.077-29.249,0L167.755,388.532L35.306,256.083c-8.076-8.077-21.172-8.077-29.248,0 c-8.077,8.077-8.077,21.172,0,29.249l147.074,147.074c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.625-6.059 l323.562-323.562C514.019,100.767,514.019,87.672,505.943,79.594z" fill="#388e3c"/>
|
||||
</g>
|
||||
</g>
|
||||
<g><g><path d="M505.943,79.594c-8.077-8.077-21.172-8.077-29.249,0L167.755,388.532L35.306,256.083c-8.076-8.077-21.172-8.077-29.248,0 c-8.077,8.077-8.077,21.172,0,29.249l147.074,147.074c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.625-6.059 l323.562-323.562C514.019,100.767,514.019,87.672,505.943,79.594z" fill="#388e3c"/></g></g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message evCancel<?=($event['calendar_view'] == 1) ? ' hidden' : ''?>" style="margin-top: 10px;">
|
||||
<a href="javascript:{}" class="no-border" onclick="cancelEvent('<?=$event['id']?>')" title="Отменить">
|
||||
<span class="simple-button tooltip-item">
|
||||
<i class="ti-close"></i>
|
||||
</span>
|
||||
<span class="simple-button tooltip-item"><i class="ti-close"></i></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<!-- Новая сделка (с deal_id) — шестерёнка + отмена -->
|
||||
<?php if (!$event['cancel']) { ?>
|
||||
<div style="position:absolute;top:8px;right:8px;" class="d-flex gap-1">
|
||||
<a href="javascript:{}" class="no-border" onclick="cancelEvent(<?=$event['id']?>)" title="Отменить сделку" style="color:#e57373;font-size:16px;line-height:1;">
|
||||
<i class="ti-close"></i>
|
||||
</a>
|
||||
<a href="javascript:{}" class="no-border" onclick="if(window.editDeal){window.editDeal(<?=intval($event['req_id'] ?: 0)?>, <?=$deal_id_for_edit?>)}" title="Редактировать сделку" style="color:#999;font-size:16px;line-height:1;">
|
||||
<i class="jw-action-icon-settings"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<div class="chat-content" id="chat_content_<?=$event['id']?>">
|
||||
<div class="head">
|
||||
<span>Сделка</span>
|
||||
<?php
|
||||
if ($deal_id_for_edit) {
|
||||
<?php if ($event['partner_id']) : ?><sup style="padding-left:3px; font-weight:normal;color:#dea847;" data-partner-id="<?= $event['partner_id'] ?>">от партнёра</sup><?php endif; ?>
|
||||
</div>
|
||||
<?php if ($deal_id_for_edit) {
|
||||
if (!$event['cancel']) {
|
||||
$sql_deal_data = "SELECT * FROM deals WHERE id = " . intval($deal_id_for_edit) . " LIMIT 1";
|
||||
$rez_deal_data = mysql_query($sql_deal_data);
|
||||
$deal_data = mysql_fetch_assoc($rez_deal_data);
|
||||
}
|
||||
?>
|
||||
<?php if ($event['partner_id']) : ?><sup style="padding-left:3px; font-weight:normal;color:#dea847;" data-partner-id="<?= $event['partner_id'] ?>">от партнёра</sup><?php endif; ?>
|
||||
</div>
|
||||
<div class="message">Запланирована сделка на <?=$d?> <?=getRusMonth($m)?> <?=$y?> в <?=date("H:i", strtotime($event['schedule_date']))?></div>
|
||||
<?php if (!empty($deal_data)) { ?>
|
||||
<hr style="border:none;border-top:1px solid #e0e0e0;margin:6px 0;">
|
||||
@ -1135,7 +1135,6 @@ ORDER BY date_sort ASC";
|
||||
<div class="message" style="margin-top:5px;font-size:13px;">
|
||||
<b>Стороны сделки:</b><br/>
|
||||
<?php
|
||||
// Сторона 1
|
||||
$side1_text = htmlspecialchars($deal_data['side_one']);
|
||||
if (!empty($deal_data['side_one_requisition_id'])) {
|
||||
$sql_req1 = "SELECT name, client_id FROM requisitions WHERE id = " . intval($deal_data['side_one_requisition_id']) . " LIMIT 1";
|
||||
@ -1154,8 +1153,6 @@ ORDER BY date_sort ASC";
|
||||
}
|
||||
}
|
||||
echo '<span style="color:#666;">' . $side1_text . '</span><br/>';
|
||||
|
||||
// Сторона 2
|
||||
$side2_text = htmlspecialchars($deal_data['side_two']);
|
||||
if (!empty($deal_data['side_two_requisition_id'])) {
|
||||
$sql_req2 = "SELECT name, client_id FROM requisitions WHERE id = " . intval($deal_data['side_two_requisition_id']) . " LIMIT 1";
|
||||
@ -1186,12 +1183,11 @@ ORDER BY date_sort ASC";
|
||||
if ($rez_objs && mysql_num_rows($rez_objs) > 0) {
|
||||
echo '<div class="message" style="margin-top:5px;font-size:13px;"><b>Объекты:</b><br/>';
|
||||
while ($obj_row = mysql_fetch_assoc($rez_objs)) {
|
||||
echo '<span style="color:#666;">' . htmlspecialchars($obj_row['nazv']) . ' (' . htmlspecialchars($obj_row['adres']) . ')</span><br/>';
|
||||
echo '<a href="javascript:{}" class="show_object" data-id="' . intval($obj_row['id']) . '" style="color:#1976d2;">' . htmlspecialchars($obj_row['nazv']) . ' (' . htmlspecialchars($obj_row['adres']) . ')</a><br/>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
// Документы сделки
|
||||
$sql_inner_docs = "SELECT d.id, d.name FROM inner_docs d JOIN deal_inner_doc did ON did.inner_doc_id = d.id WHERE did.deal_id = " . intval($deal_id_for_edit);
|
||||
$rez_inner_docs = mysql_query($sql_inner_docs);
|
||||
if ($rez_inner_docs && mysql_num_rows($rez_inner_docs) > 0) {
|
||||
@ -1201,74 +1197,46 @@ ORDER BY date_sort ASC";
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
<?php if (!$event['cancel']) { ?>
|
||||
<div style="position:absolute;top:8px;right:8px;" class="d-flex gap-1">
|
||||
<a href="javascript:{}" class="no-border" onclick="if(window.editDeal){window.editDeal(<?=intval($event['req_id'] ?: 0)?>, <?=$deal_id_for_edit?>)}" title="Редактировать сделку" style="color:#999;font-size:16px;line-height:1;">
|
||||
<i class="jw-action-icon-settings"></i>
|
||||
</a>
|
||||
<a href="javascript:{}" class="no-border" onclick="cancelEvent(<?=$event['id']?>)" title="Отменить сделку" style="color:#e57373;font-size:16px;line-height:1;">
|
||||
<i class="ti-close"></i>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<?php if ($event['sum']) { ?>
|
||||
<div class="message" style="font-size:13px;">Сумма сделки: <?=$event['sum']?><span class="rub">p</span></div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
} else {
|
||||
echo '<div class="message">Запланирована сделка на ' . $d . ' ' . getRusMonth($m) . ' ' . $y . ' в ' . date("H:i", strtotime($event['schedule_date'])) . '</div>';
|
||||
if ($event['sum']) {
|
||||
echo '<div class="message">Сумма сделки: ' . $event['sum'] . '<span class="rub">p</span></div>';
|
||||
}
|
||||
} ?>
|
||||
<?php if ($event['comment']) {
|
||||
$pattern = '/(https?:\/\/\S+)/i';
|
||||
$comment = preg_replace($pattern, '<a target="_blank" href="$1">ссылка</a>', $event['comment']);
|
||||
?>
|
||||
<div class="message" style="font-size:12px;color:#888;margin-top:4px;padding-left:8px;border-left:2px solid #e0e0e0;">Комментарий: <?=$comment?></div>
|
||||
$comment = preg_replace($pattern, '<a target="_blank" href="$1">ссылка</a>', $event['comment']); ?>
|
||||
<div class="message">Комментарий: <?=$comment?></div>
|
||||
<?php } if ($event['document_id']) {
|
||||
$doc_id = $event['document_id'];
|
||||
$doc = Docs::getInnerDoc(null, $doc_id);
|
||||
|
||||
if (isset($doc['params'])) {
|
||||
if ($params = json_decode($doc['params'], true)) {
|
||||
if ($params['client_id'] && $params['object_id']) {
|
||||
$doc_parties = '';
|
||||
|
||||
if (isset($params['client_ids'])) {
|
||||
//var_dump($params['client_ids']);
|
||||
$client_ids = json_decode(html_entity_decode($params['client_ids']));
|
||||
|
||||
$sql_cls = "SELECT id, fio, phone, email FROM `clients` WHERE `id` in (".implode(',', $client_ids).")";
|
||||
$rez_cls = mysql_query($sql_cls);
|
||||
while($doc_cls = mysql_fetch_assoc($rez_cls)) {
|
||||
mask_client_contacts_inplace($doc_cls);
|
||||
$cls_contacts = [];
|
||||
|
||||
if ($doc_cls['email'])
|
||||
$cls_contacts[] = $doc_cls['email'];
|
||||
|
||||
if ($doc_cl['phone'])
|
||||
$cls_contacts[] = $doc_cls['phone'];
|
||||
|
||||
if ($doc_cls['email']) $cls_contacts[] = $doc_cls['email'];
|
||||
if ($doc_cls['phone']) $cls_contacts[] = $doc_cls['phone'];
|
||||
$doc_parties .= '<li>Клиент: <a href="javascript:{}" data-id="'.$doc_cls['id'].'" class="neweditClient">'.$doc_cls['fio'] . ((!empty($cls_contacts)) ? ' (' . implode(', ', $cls_contacts) . ')' : '') . '</a><li/>';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($params['client_id']) && (!isset($client_ids) || empty($client_ids))) {
|
||||
$sql_cl = "SELECT id, fio, phone, email FROM `clients` WHERE `id` = '$params[client_id]' LIMIT 1";
|
||||
$rez_cl = mysql_query($sql_cl);
|
||||
if ($doc_cl = mysql_fetch_assoc($rez_cl)) {
|
||||
mask_client_contacts_inplace($doc_cl);
|
||||
$cl_contacts = [];
|
||||
|
||||
if ($doc_cl['email'])
|
||||
$cl_contacts[] = $doc_cl['email'];
|
||||
|
||||
if ($doc_cl['phone'])
|
||||
$cl_contacts[] = $doc_cl['phone'];
|
||||
|
||||
if ($doc_cl['email']) $cl_contacts[] = $doc_cl['email'];
|
||||
if ($doc_cl['phone']) $cl_contacts[] = $doc_cl['phone'];
|
||||
$doc_parties .= '<li>Клиент: <a href="javascript:{}" data-id="'.$doc_cl['id'].'" class="neweditClient">'.$doc_cl['fio'] . ((!empty($cl_contacts)) ? ' (' . implode(', ', $cl_contacts) . ')' : '') . '</a><li/>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($params['object_id'])) {
|
||||
$sql_obj = "SELECT id, nazv, adres FROM `objects` WHERE `id` = '$params[object_id]' LIMIT 1";
|
||||
$rez_obj = mysql_query($sql_obj);
|
||||
@ -1276,16 +1244,13 @@ ORDER BY date_sort ASC";
|
||||
$doc_parties .= '<li>Объект: <a href="javascript:{}" data-id="'.$doc_obj['id'].'" data-client="'.$params['client_id'].'" class="show_object">'.$doc_obj['nazv'].' ('.$doc_obj['adres'].')</a><li/>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($doc_parties)) { ?>
|
||||
<div class="message parties">Стороны сделки:<br/><ul><?= $doc_parties; ?></ul></div>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($doc['id']) && isset($doc['name'])) {
|
||||
?>
|
||||
if (isset($doc['id']) && isset($doc['name'])) { ?>
|
||||
<div class="document" data-id="<?= $doc['id']; ?>">
|
||||
Документ:
|
||||
<a href="javascript:{}" class="no-border pull-right">
|
||||
@ -1308,37 +1273,25 @@ ORDER BY date_sort ASC";
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php }
|
||||
} ?>
|
||||
<?php } ?>
|
||||
<span class="time"><?=date("H:i", strtotime($time_zone, strtotime($event['create_date'])))?></span>
|
||||
<?php {
|
||||
|
||||
<?php
|
||||
if($event['user_id'] > 0 && isset($users[$event['user_id']])){?>
|
||||
<br><span class="time"><i title="Ответственный" class="ti-user" style="margin-right: 5px"></i>
|
||||
<?=$users[$event['user_id']]['user_fio']?>
|
||||
</span>
|
||||
|
||||
<?php }
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
|
||||
}?>
|
||||
<?php {
|
||||
if($event['open_step'] > 0){?>
|
||||
<br><span class="time"><i class="ti-info-alt" style="margin-right: 5px"></i>Задача добавлена автоматически при переходе на этап</span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
<?php }
|
||||
if($event['old_req_id'] > 0){?>
|
||||
<br><span class="time"><i class="ti-info-alt" style="margin-right: 5px"></i>Из заявки ID: <?=$event['old_req_id']?></span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}?>
|
||||
<?php }
|
||||
?>
|
||||
<?php if($event['from_id'] == $_SESSION['id']){ ?>
|
||||
<div class="message" style="margin-top: 10px;">
|
||||
|
||||
<a href="javascript:{}" class="no-border" onclick="editEvent('<?=$event['id']?>', '<?=$event['type']?>')" title="Редактировать">
|
||||
<span class="simple-button settings"><i class="jw-action-icon-settings"></i></span>
|
||||
</a>
|
||||
@ -1351,189 +1304,7 @@ ORDER BY date_sort ASC";
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
if ($event['type'] == 'even') {
|
||||
$date = date("d.m.Y", strtotime($event['schedule_date']));
|
||||
list($d, $m, $y) = explode(".", $date);
|
||||
?>
|
||||
<div class="chat-block<?=$class_ev?>">
|
||||
<div class="chat-author">
|
||||
<div class="pic">
|
||||
<?php
|
||||
if(empty($event['user_logo'])){
|
||||
?>
|
||||
<img src="/images/user-pic.svg"/>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<img src="/photos/agency/<?=$event['user_logo']?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="fio_user" title="<?=$event['user_fio']?>"><?=$event['user_fio']?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-message <?=($event['cancel']==1) ? 'cancel' : ''?> even">
|
||||
<div class="chat-complete<?=!in_array($event['user_id'], $usersCanEdit) ? ' hidden' : '' ?>">
|
||||
<div class="complete-button" data-id="<?=$event['id']?>">
|
||||
<input type="checkbox" class=""/>
|
||||
<div class="complete-action-button<?=($event['calendar_view'] == 1) ? ' active' : ''?>" id="groupAB__<?=$event['id']?>" data-cancel="<?=$event['cancel']?>" title="Выполнено">
|
||||
<span class="check-button-box"></span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="512px" height="512px">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M505.943,79.594c-8.077-8.077-21.172-8.077-29.249,0L167.755,388.532L35.306,256.083c-8.076-8.077-21.172-8.077-29.248,0 c-8.077,8.077-8.077,21.172,0,29.249l147.074,147.074c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.625-6.059 l323.562-323.562C514.019,100.767,514.019,87.672,505.943,79.594z" fill="#388e3c"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message evCancel<?=($event['calendar_view'] == 1) ? ' hidden' : ''?>" style="margin-top: 10px;">
|
||||
<a href="javascript:{}" class="no-border" onclick="cancelEvent('<?=$event['id']?>')" title="Отменить">
|
||||
<span class="simple-button tooltip-item">
|
||||
<i class="ti-close"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chat-content" id="chat_content_<?=$event['id']?>">
|
||||
<div class="head">
|
||||
<span><?=$event['name']?></span>
|
||||
<?php if ($event['partner_id']) : ?><sup style="padding-left:3px; font-weight:normal;color:#dea847;" data-partner-id="<?= $event['partner_id'] ?>">от партнёра</sup><?php endif; ?>
|
||||
</div>
|
||||
<div class="message">Мероприятие состоится <?=$d?> <?=getRusMonth($m)?> <?=$y?> в <?=date("H:i", strtotime($event['schedule_date']))?></div>
|
||||
<?php if ($event['sum']) { ?>
|
||||
<div class="message">Сумма сделки: <?=$event['sum']?><span class="rub">p</span></div>
|
||||
<?php } if ($event['comment']) {
|
||||
$pattern = '/(https?:\/\/\S+)/i';
|
||||
$comment = preg_replace($pattern, '<a target="_blank" href="$1">ссылка</a>', $event['comment']);
|
||||
?>
|
||||
<div class="message">Комментарий: <?=$comment?></div>
|
||||
<?php } ?>
|
||||
<span class="time"><?=date("H:i", strtotime($time_zone, strtotime($event['create_date'])))?></span>
|
||||
<?php {
|
||||
|
||||
if($event['user_id'] > 0 && isset($users[$event['user_id']])){?>
|
||||
<br><span class="time"><i title="Ответственный" class="ti-user" style="margin-right: 5px"></i>
|
||||
<?=$users[$event['user_id']]['user_fio']?>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}?>
|
||||
<?php {
|
||||
if($event['open_step'] > 0){?>
|
||||
<br><span class="time"><i class="ti-info-alt" style="margin-right: 5px"></i>Задача добавлена автоматически при переходе на этап</span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if($event['old_req_id'] > 0){?>
|
||||
<br><span class="time"><i class="ti-info-alt" style="margin-right: 5px"></i>Из заявки ID: <?=$event['old_req_id']?></span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}?>
|
||||
<?php if($event['from_id'] == $_SESSION['id']){ ?>
|
||||
<div class="message" style="margin-top: 10px;">
|
||||
|
||||
<a href="javascript:{}" class="no-border" onclick="editEvent('<?=$event['id']?>', '<?=$event['type']?>', '<?=$event['client_id']?>')" title="Редактировать">
|
||||
<span class="simple-button settings"><i class="jw-action-icon-settings"></i></span>
|
||||
</a>
|
||||
<a href="javascript:{}" class="no-border" onclick="deleteEvent('<?=$event['id']?>')" title="Удалить">
|
||||
<span class="simple-button delete"><i class="jw-action-icon-delete"></i></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
if ($event['type'] == 'step') {
|
||||
$date = date("d.m.Y", strtotime($event['schedule_date']));
|
||||
list($d, $m, $y) = explode(".", $date);
|
||||
?>
|
||||
<div class="chat-block<?=$class_ev?>">
|
||||
<div class="chat-author">
|
||||
<div class="pic">
|
||||
<?php
|
||||
if(empty($event['user_logo'])){
|
||||
?>
|
||||
<img src="/images/user-pic.svg"/>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<img src="/photos/agency/<?=$event['user_logo']?>">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="fio_user" title="<?=$event['user_fio']?>"><?=$event['user_fio']?></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="chat-message call">
|
||||
|
||||
<div class="chat-content" id="chat_content_<?=$event['id']?>">
|
||||
<div class="head"><span style="color: #3446eb;">Этап «<?=$event['name']?>»</span></div>
|
||||
<?php
|
||||
if($event['checklist'] == 0){
|
||||
|
||||
?>
|
||||
<div class="message">Закрыт со следующими событиями:</div>
|
||||
<?php } else { ?>
|
||||
<div class="message">Добавлено событие по чек листу:</div>
|
||||
<?php } ?>
|
||||
<?php if($event['comment']){
|
||||
// меняем ссылку на файл (судя по всему она записана прямо в теле комментария)
|
||||
$comment = $event['comment'];
|
||||
$comment = str_replace('download href', 'target="_blank" href', $comment);
|
||||
$comment = str_replace('?guid', '?preview=1&guid', $comment);
|
||||
?>
|
||||
<div class="message"><?=$comment?></div>
|
||||
<?php } ?>
|
||||
<span class="time"><?=date("H:i", strtotime($time_zone, strtotime($event['create_date'])))?></span>
|
||||
<?php {
|
||||
|
||||
if($event['user_id'] > 0 && isset($users[$event['user_id']])){?>
|
||||
<br><span class="time"><i title="Ответственный" class="ti-user" style="margin-right: 5px"></i>
|
||||
<?=$users[$event['user_id']]['user_fio']?>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}?>
|
||||
<?php {
|
||||
if($event['open_step'] > 0){?>
|
||||
<br><span class="time"><i class="ti-info-alt" style="margin-right: 5px"></i>Задача добавлена автоматически при переходе на этап</span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if($event['old_req_id'] > 0){?>
|
||||
<br><span class="time"><i class="ti-info-alt" style="margin-right: 5px"></i>Из заявки ID: <?=$event['old_req_id']?></span>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
}?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
if($event['type'] == 'partner'){
|
||||
@ -1648,3 +1419,4 @@ ORDER BY date_sort ASC";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user