{if $all_clients}
    {foreach from=$all_clients item=one_client}
        <div class="livechat_contact_{$one_client.status}_client livechat_contact__user-info" id="contact_list_client{$one_client.id}"
             onMouseDown="OnClientClick({$one_client.id});" onmouseover="OverCLMouse({$one_client.id})"
             onmouseout="OutCLMouse({$one_client.id})" oncontextmenu="OkContextMenu({$one_client.id})">
            <div class="contact_list-wrapper">
                <div class="livechat_contact__avatar">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 53 53" width="53" height="53">
                        <defs>
                            <image width="53" height="53" id="img1" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADUAAAA1CAMAAADWOFNCAAAAAXNSR0IB2cksfwAAArtQTFRF////9vf40tXas7jBnKKuhY2bdn+Qa3WHaXOFhY2bs7jB0tXa9vf49vf4wcXMj5aka3WHa3WHwcXM7/Dyq7C7b3iKq7C7+Pj5rbO8bXeIrbO8+Pj5////09bceoOT09bc/f39r7S+anSF9/j5kZimkZim8/T1iJCeiJCe8/T1+fr6iZGf/f3+kpmmkZim/f3+sbfAsba/2NrfanSGanSG19re+vv7fIWVfIWVs7jBs7jB8/P1b3iK8/P1sba/+vr7cnyNcnyN+vr7zM/VzM/VlZypbXeIbniJeoOTbneJ+vr719rebHaIpKu219rg8PL17/L11NjeoKez1tnetbrDfoeX3N/k2NzhtrvEnKKueIGR4+bq3+LndH2Oh4+dxcrRvcLKeIGRgYmZ7vH0eYKTbniJqK65bniJu8DJsrfBaXOFanSGv8TMtrzFb3iKdH2OrbO9pau3dn+Qf4eXh4+ef4eXfoeWkpmmz9PZxsrSqa656Ovu5ejseYKSqa+5x8rRiZGg5unt4uXqhIyb7O3vaXOFtrvF5OfrcXuM6uzufoeWa3SGgImYipKhf4iXsrfA6ertaXOFaXOF6ertj5ek19reaXOFbXaIiJCeo6m1uL7HyM3U3ODl3uHm09fduL3Goqm0aXOF19rei5Ohlp2qwsfP6ezv6evvwMXNlZypi5Kg4uTna3WGcHmLqrC7rrS+a3WG4ePnqK64l56rmaCtqK64+fr6gouavMHKgoua5ujrb3iKyc7V5ufq09bcbXaIsrjC0tXbys7Ua3WG7fDzfISUa3WGyc3TztHXub7ItbrD9fb48fP29PX3/f7+9PX38PL1+fr78fP2/v7+9/j58fP18PL18fP1+Pn68vT28PL18PL18vT2/Pz9+Pn69PX38PL18PL18PL18PL18PL18PL18PL19PX3+Pn6WCsvMAAAAOl0Uk5TAAtNiKG50en/uIZMCRZntf/2ZiCi/aAUkfmPEAFk6GMLo/8V0tEd29oeDdEEuroBiIBN//1BEeXkqKAn/iiYEPb1EXBo0P3///8TSP////////9Ief///3mo/////9P//+j////4//D///j4///46P//6NP//9Oo//9/////eUj/////E/3///8RzP////9oCvbzCZgo/v/////////////7J6P///////+hEeT////lEU7//00AiP+AALf/AA3R/w0d2v//2x0V0dILowsAW+oNiQAgoP2iFma19mcAC1GHobjR6bmGTQn5AhpGAAACpklEQVR4nJXV919NcRgH8Aepx0iXhEgaZtkjKyEauHwrilBJRtmjZERdRAoZmdl7Z2aEbCFtSYSU8Wc4567Oud/vOfeez4+f53m/Xve+Xvc+XwA6jRo3sWpqbYM21s2smrdoydigYtvKToXCtLZrY2vG2Ld1QDoO7exlTPsOjgzDx7FjJwnj1NlZwvBx7uLEQi6ubjII0c3VhUbuXWUNn27upqh7D7MIsWcvMfLwtAAhenoIUe8+FiHEvv0Eqr+FCHFAAxo4yGI1eIgBeQ21GCEO89Kr4QoQ4ggdGumtSHmP0iofRQjRh0ejxyhUY305NU4hQhzPKT/Fyg/A119iFhA4QWLiPxEmMQfqyVMICQoOUTGnU2Eaqw4NI7pMD2SNZ0A4o505ixgyO4IxD4dIRhtFGjKHMY+EaLqcGyRQMfPohWiYT5cLiDAh9MJCYHyAWJGKoxcWwWK6XCJSS+mFZbCcLleI1Ep6YRWspst4kUqgF9ZAIl3iWgFax5gnwnpGG7rBiJI2MuabIJnRYopGjzZvYY2TYWsqq4/YxrvtcWmsYeoOgHTWADFj567dEgcvnftXZrJHMsnk1J69CtG+/fy5yVKosrSX7cBBk/rQ4SNHs4OPHQ87kX3yVLzaZHr6jO6MnhWWAefOXxD9Ni5euiw6IFf0F/vqNWN1/UYSoaPJSTNu3LxleB5uG6o7GobR/kTuGlbuGV+i3PvaQh0rYfg80H2/h7kND9ijPK5QPZZBhERlcDt5T4RP7NN8xGeyiJAcxPzn4uf8xcuEGDPq1es3b8EkBe/MIELeF5gigA+FZlDhRxoBFBWXyJiS4iIW4lJaJonKSiUMl/KKT5UMUvm5olwa8a7qS7WYfK3+ViVvtKn5/uNn7a+6elJf97v2z99/NfTKf4TqSmeYXq6UAAAAAElFTkSuQmCC"/>
                        </defs>
                        <style>
                            tspan { white-space:pre }
                        </style>
                        <use id="Слой 2" href="#img1" x="0" y="0" />
                    </svg>
                    <div class="livechat__client_status {if $one_client.is_online == '0'}livechat__client_status--offline{/if}"></div>
                </div>
                <div class="livechat_contact__info">
                    <div class="livechat_contact-wrapper">
                        <span class="livechat_contact_name"
                              title="{$one_client.fio}">{$one_client.fio_short}</span>{if $one_client.org}<a
                        href="{$config.site_root}/modules/livechat/subscribe_open.php?client_id={$one_client.id}"
                        class="livechat_contact_org" target="_blank">({$one_client.org})</a>{/if}<span
                                class="livechat_contact_manager"
                                id="contact_list_client_manager{$one_client.id}"></span>
                    </div>
                    <div class="livechat_contact-wrapper">
                        {if $one_client.email != ''}<span class="livechat_contact_email" title="Email: {$one_client.email}">{$one_client.email_short}</span>{/if}
                        {if $one_client.phone != ''}<span class="livechat_contact_phone" title="Телефон: {$one_client.phone}">{$one_client.phone_short}</span>{/if}
                        <span class="livechat_contact_ip">IP: <a href="http://geoiptool.com/en/?IP={$one_client.last_ip}"
                                                                 class="livechat_contact_org"
                                                                 target="_blank">{$one_client.last_ip}</a></span>
                    </div>
                    <div class="livechat__last_manager" title="Последняя активность">
                        {if $one_client.manager}{$one_client.manager}{else}С этим клиентом еще никто не общался{/if}
                    </div>
                </div>
            </div>
            <div class="new__message-img">
                <div id="contact_list_new_messages_img{$one_client.id}" style="width: 20px;">
                    {if $one_client.unread_message}
                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 19" width="20" height="19">
                            <defs>
                                <filter id="flt1"> <feColorMatrix in="SourceGraphic" type="matrix"
                                                                  values="0.36 0 0 0 0 0 0.36 0 0 0 0 0 0.36 0 0 0 0 0 1 0" /> </filter>
                                <image width="20" height="19" id="img1-new-mess" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAMAAACnUt2HAAAAAXNSR0IB2cksfwAAAThQTFRF////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////4g1iRQAAAGh0Uk5TAAhYxNZGuP7/zj2r/a8xnvDs5JMnkO/RbxyE42DgVRV33bQ4xjYNZdKlFq0fCVzIiAaSzBFRv/lybqkDwV1M9owaVqLfQynmcSBmnTQmzfxNa/L1MAEdImcTgix+9MsCqA8/jqyJxQ7t3DDYAAAA4ElEQVR4nGNgQAOMTMws6GKsbOwcnKhCXNw8HBwcvMhCfPwCHIJC7BzCCCERUTEODnGgOIcETEhSShqokVlGloODRw4iJK+gCBTiUFJWAZJiqiAhNXUNkBCHppY2iFLUYWDQ1dMHC3EYGBqBaWMTBlMziJC5BYMlhGVlzWADYQnYMtjZQ5gODAyOTs5Ae11cGdzcIWIcHmC7Pb28fRh8/aBi/gEItwcGQQWDQ2BCoW5h4RE2YEOlI+EKtVmiohmUY5hjOeLi4YIJHBwg3yUmJQcijEzhSEUPWgYG7rR0BAcAtF8aLxEKeLMAAAAASUVORK5CYII="/>
                            </defs>
                            <style>
                                tspan { white-space:pre }
                            </style>
                            <use style="filter: url(#flt1)" href="#img1-new-mess" x="0" y="0" />
                        </svg>
                    {/if}
                </div>
            </div>
        </div>
    {/foreach}
{else}
    <div class="livechat_noclients">{$lang.modules.livechat.no_clients}</div>
{/if}
{if $free_users}
    <span id="var_new_clients_exists"></span>
{/if}