$tn)
{
if ($ti == 0) {
continue;
}
echo '
' . $tn . '';
}
foreach($WORK_TYPES as $ti => $tn)
{
if ($ti > 0) {
continue;
}
echo '
Другое';
}
?>
Новый клиент
getAllClients($_SESSION['id']);
} else {
if ($_GET['all']) $clients = $cl->getAllClients($_SESSION['id']);
elseif ($_GET['id_agent']) $clients = $cl->getMyClients($_GET['id_agent']);
elseif ($_GET['id_manager'] and $_SESSION['agency']) $clients = $cl->getMyClients($_GET['id_manager']);
else $clients = $cl->getMyClients($_SESSION['id']);
}
if($clients['vsego']) foreach($clients['clients'] as $client)
{
$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 .= "
";
list($d,$m,$y) = explode(".",$pdf['date_f']);
$date_f = $d." ".getRusMonth($m)." ".$y;
if($i != $all_sended_pdf) {
$pdf_str .= "
";
}
if($_SESSION['agency'] || ($_GET['deleted'] && $_SESSION['manager'])) {$act2 = 'delClient'; $del_link = "
"; }
else { $act2 = 'delClientAgent'; $del_link = "
";}
list($d,$m,$y) = explode(".",$client['date_add']);
$date_add = $d." ".getRusMonth($m)." ".$y;
switch($client['status'])
{
case 0: $color = "yellow"; break;
case 1: $color = "red"; break;
case 2: $color = "green"; break;
default: $color = "green";
}
$mstr = mysql_fetch_assoc(mysql_query("SELECT agency, manager, fio FROM users WHERE id=$client[id_agent]"));
if($mstr['agency']) $master = "Агентство $mstr[fio]";
elseif($mstr['manager']) $master = "Менеджер $mstr[fio]";
else $master = "Агент $mstr[fio]";
?>
" id="client__">
if ($client['budget'] == "") {}
else {
?>
} ?>
if ($client['opis'] == "") {}
else {
?>
} ?>
Удалил:
Причина удаления:
0) {?>
Вы передали, ожидает подтверждения
} ?>
Клиентов нет
";
if($all_pages > 1)
{
if($mas_url_add) $str_url_add = implode("&",$mas_url_add);
echo "