Added instance blocks (“moderated servers”) support

This commit is contained in:
pezcurrel 2022-12-27 23:03:31 +01:00
parent ce66aa56e9
commit e484298feb

View file

@ -580,7 +580,23 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
$out.='<ol>'.N;
while ($rrow=mysqli_fetch_assoc($rres))
$out.='<li>'.hspech($rrow['Text']).'</li>'.N;
$out.='</ol>';
$out.='</ol>'.N;
} else {
$out.='<span class="null">'._('Not available{plural}').'</span>';
}
$out.='</div></div>'.N;
$out.='<div><div class="idlab">'._('Moderated servers').'</div><div class="idesc">';
$sevmap=['silence'=>_('silenced'), 'suspend'=>_('suspended')];
$rres=tquery('SELECT Domain, Severity, Comment FROM InstBlocks WHERE InstID='.$row['ID'],__LINE__);
if (mysqli_num_rows($rres)>0) {
$out.='<ul>'.N;
while ($rrow=mysqli_fetch_assoc($rres)) {
$out.='<li><strong>'.hspech($rrow['Domain']).'</strong>: '.$sevmap[$rrow['Severity']];
if (!is_null($rrow['Comment'])) $out.=' - '.hspech($rrow['Comment']);
$out.='</li>'.N;
}
$out.='</ul>'.N;
} else {
$out.='<span class="null">'._('Not available{plural}').'</span>';
}