<?
function panel_cert_info($cert)
{	?><table class="basic fz_small fixed left full sign_doc" id="panel_cur_sert_info">
        <tr><th style="width:200px;text-align:left;">Издатель:</th><td style="text-align: left"><?echo $cert['IssuerName']?></td></tr>
        <tr><th style="width:200px;text-align:left;">Владелец:</th><td style="text-align: left"><?echo $cert['SubjectName']?></td></tr>
        <tr><th style="width:200px;text-align:left;">Выдан:</th><td style="text-align: left"><?echo $cert['ValidFromDate']?></td></tr>
        <tr><th style="width:200px;text-align:left;">Действителен до:</th><td style="text-align: left"><?echo $cert['ValidToDate']?></td></tr>
        <tr class="ext"><th style="width:200px;text-align:left;">С/Н сертификата:</th><td style="text-align: left"><?echo $cert['SerialNumber']?></td></tr>
        <tr class="ext"><th style="width:200px;text-align:left;">Отпечаток сертификата:</th><td style="text-align: left"><?echo $cert['Thumbprint']?></td></tr>
        <tr class="ext"><th style="width:200px;text-align:left;">Версия:</th><td style="text-align: left"><?echo $cert['version']?></td></tr>
        <tr class="ext"><th style="width:200px;text-align:left;">Алгоритм ключа:</th><td style="text-align: left"><?echo $cert['algorithm']?></td></tr>
        <tr class="ext"><th style="width:200px;text-align:left;">Криптопровайдер:</th><td style="text-align: left"><?echo $cert['provname']?></td></tr>
        <tr class="ext"><th style="width:200px;text-align:left;">Данные сохранены:</th><td style="text-align: left"><?echo $cert['time_update']?></td></tr>
     </table>
   <?

    $validToDate = strtotime($cert['ValidToDate']);
    $currentDate = time();

    if ($validToDate < $currentDate) {
        echo "<div style='background: #ff000017;color: #f00;padding: 15px;font-size: 16px;font-weight: 600;margin-top: 14px;'>Сертификат просрочен</div>";
    }

}
?>