Updated “fnum()” calls to new format

This commit is contained in:
pezcurrel 2023-12-28 14:56:23 +01:00
parent 6e2ed57a85
commit dda5e80a69

View file

@ -19,6 +19,8 @@ $bt=microtime(true);
$dlanguc=strtoupper($dlang);
$lc=localeconv();
require '../lib/n2es.php';
require '../lib/tables.php';
require '../lib/gracetime.php';
@ -243,7 +245,7 @@ $tables=tables($link);
$res=mysqli_query($link,'SELECT COUNT(ID) AS totusers FROM Users') or muorimeglio(__LINE__.': '.mysqli_error($link),true);
$row=mysqli_fetch_assoc($res);
echo(_('<div id="help" class="helpd"><p class="intro">This is our search engine for Mastodon users. It works this way...</p></div>').N);
printf(_('<p class="introe">We currently count <span class="statd">%s</span> Mastodon users.</p>').N, fnum($row['totusers'],0,$dlang));
printf(_('<p class="introe">We currently count <span class="statd">%s</span> Mastodon users.</p>').N, fnum($row['totusers'],$lc,0));
if ((array_key_exists('noxious',$_GET) && $_GET['noxious']=='1') || !array_key_exists('noxious',$_GET)) {
$_GET['cbnoxious']=' checked';
@ -528,15 +530,15 @@ while ($if<$il && $row=mysqli_fetch_assoc($res)) {
(!is_null($row['Priority'])) ? $out.='<span class="ivgood">'._('Si!').'</span>' : $out.=_('No');
$out.='</div>'.N;*/
$out.='<div><span class="ilab">'._('Languages').'</span> '.nully(implode(', ',$buf)).'</div>'.N;
$out.='<div><span class="ilab">'._('Users').'</span> '.nully(fnum($row['UserCount'],0,$dlang)).'</div>'.N;
$out.='<div><span class="ilab">'._('Active users (last month)').'</span> '.nully(fnum($row['ActiveUsersMonth'],0,$dlang)).'</div>'.N;
$out.='<div><span class="ilab">'._('Active users (last six months)').'</span> '.nully(fnum($row['ActiveUsersHalfYear'],0,$dlang)).'</div>'.N;
$out.='<div><span class="ilab">'._('Known instances').'</span> '.nully(fnum($row['DomainCount'],0,$dlang)).'</div>'.N;
$out.='<div><span class="ilab">'._('Users').'</span> '.nully(fnum($row['UserCount'],$lc,0)).'</div>'.N;
$out.='<div><span class="ilab">'._('Active users (last month)').'</span> '.nully(fnum($row['ActiveUsersMonth'],$lc,0)).'</div>'.N;
$out.='<div><span class="ilab">'._('Active users (last six months)').'</span> '.nully(fnum($row['ActiveUsersHalfYear'],$lc,0)).'</div>'.N;
$out.='<div><span class="ilab">'._('Known instances').'</span> '.nully(fnum($row['DomainCount'],$lc,0)).'</div>'.N;
$out.='</div>'.N;
$out.='<div class="icol">'.N;
$out.='<div><span class="ilab">'._('Characters per toot (max)').'</span> ';
if (nullemp(fnum($row['MaxTootChars'],0,$dlang)))
if (nullemp(fnum($row['MaxTootChars'],$lc,0)))
$out.='<span class="null">500</span>';
else
$out.=$row['MaxTootChars'];