Fix event template
This commit is contained in:
parent
16e17c6865
commit
cc428c8a05
@ -1130,28 +1130,44 @@ ORDER BY date_sort ASC";
|
||||
<b>Стороны сделки:</b><br/>
|
||||
<?php
|
||||
// Сторона 1
|
||||
$side1_name = htmlspecialchars($deal_data['side_one']);
|
||||
$side1_text = htmlspecialchars($deal_data['side_one']);
|
||||
if (!empty($deal_data['side_one_requisition_id'])) {
|
||||
$sql_req1 = "SELECT name FROM requisitions WHERE id = " . intval($deal_data['side_one_requisition_id']) . " LIMIT 1";
|
||||
$sql_req1 = "SELECT name, client_id FROM requisitions WHERE id = " . intval($deal_data['side_one_requisition_id']) . " LIMIT 1";
|
||||
$rez_req1 = mysql_query($sql_req1);
|
||||
if ($rez_req1 && mysql_num_rows($rez_req1) > 0) {
|
||||
$row_req1 = mysql_fetch_assoc($rez_req1);
|
||||
$side1_name .= ': Заявка «' . htmlspecialchars($row_req1['name']) . '»';
|
||||
$side1_text .= ': Заявка «' . htmlspecialchars($row_req1['name']) . '»';
|
||||
if (!empty($row_req1['client_id'])) {
|
||||
$sql_cl1 = "SELECT id, fio FROM clients WHERE id = " . intval($row_req1['client_id']) . " LIMIT 1";
|
||||
$rez_cl1 = mysql_query($sql_cl1);
|
||||
if ($rez_cl1 && mysql_num_rows($rez_cl1) > 0) {
|
||||
$row_cl1 = mysql_fetch_assoc($rez_cl1);
|
||||
$side1_text .= ' — <a href="javascript:{}" data-id="' . intval($row_cl1['id']) . '" class="neweditClient" style="color:#1976d2;">' . htmlspecialchars($row_cl1['fio']) . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<span style="color:#666;">' . $side1_name . '</span><br/>';
|
||||
echo '<span style="color:#666;">' . $side1_text . '</span><br/>';
|
||||
|
||||
// Сторона 2
|
||||
$side2_name = htmlspecialchars($deal_data['side_two']);
|
||||
$side2_text = htmlspecialchars($deal_data['side_two']);
|
||||
if (!empty($deal_data['side_two_requisition_id'])) {
|
||||
$sql_req2 = "SELECT name FROM requisitions WHERE id = " . intval($deal_data['side_two_requisition_id']) . " LIMIT 1";
|
||||
$sql_req2 = "SELECT name, client_id FROM requisitions WHERE id = " . intval($deal_data['side_two_requisition_id']) . " LIMIT 1";
|
||||
$rez_req2 = mysql_query($sql_req2);
|
||||
if ($rez_req2 && mysql_num_rows($rez_req2) > 0) {
|
||||
$row_req2 = mysql_fetch_assoc($rez_req2);
|
||||
$side2_name .= ': Заявка «' . htmlspecialchars($row_req2['name']) . '»';
|
||||
$side2_text .= ': Заявка «' . htmlspecialchars($row_req2['name']) . '»';
|
||||
if (!empty($row_req2['client_id'])) {
|
||||
$sql_cl2 = "SELECT id, fio FROM clients WHERE id = " . intval($row_req2['client_id']) . " LIMIT 1";
|
||||
$rez_cl2 = mysql_query($sql_cl2);
|
||||
if ($rez_cl2 && mysql_num_rows($rez_cl2) > 0) {
|
||||
$row_cl2 = mysql_fetch_assoc($rez_cl2);
|
||||
$side2_text .= ' — <a href="javascript:{}" data-id="' . intval($row_cl2['id']) . '" class="neweditClient" style="color:#1976d2;">' . htmlspecialchars($row_cl2['fio']) . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<span style="color:#666;">' . $side2_name . '</span>';
|
||||
echo '<span style="color:#666;">' . $side2_text . '</span>';
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Loading…
Reference in New Issue
Block a user