Using realfloat.php “rf()” function tu workaround php 7.3 echoing floats with “,” instead of “.” as a decimal separator
This commit is contained in:
parent
b147447b69
commit
af958a194f
1 changed files with 7 additions and 5 deletions
|
@ -5,7 +5,9 @@ if (!defined('N')) {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
$lc=localeconv();
|
||||
require '../lib/fnum.php';
|
||||
require '../lib/realfloat.php';
|
||||
require '../lib/supplangs.php';
|
||||
|
||||
echo('</nav>
|
||||
|
@ -55,7 +57,7 @@ while ($row=mysqli_fetch_assoc($res)) {
|
|||
}
|
||||
arsort($buf);
|
||||
$hl='';
|
||||
foreach($buf as $key=>$val) $hl.=$key.': '.fnum($val,0,$dlang).'; ';
|
||||
foreach($buf as $key=>$val) $hl.=$key.': '.fnum($val,$lc,0).'; ';
|
||||
$hl=_('Hits per language').': '.substr($hl,0,-2);
|
||||
|
||||
$hp=explode(';',$row['HitsPage']);
|
||||
|
@ -66,14 +68,14 @@ while ($row=mysqli_fetch_assoc($res)) {
|
|||
}
|
||||
arsort($buf);
|
||||
$hp='';
|
||||
foreach($buf as $key=>$val) $hp.=$key.': '.fnum($val,0,$dlang).'; ';
|
||||
foreach($buf as $key=>$val) $hp.=$key.': '.fnum($val,$lc,0).'; ';
|
||||
$hp=_('Hits per page').': '.substr($hp,0,-2);
|
||||
|
||||
echo('<div class="info1st">'.gmdate('d/m/Y',$row['TS']).': '.fnum($row['Visits'],0,$dlang).' <span class="visitslab">'.sp($row['Visits'],_('visit'),_('visits')).'</span>, '.fnum($row['Hits'],0,$dlang).' <span class="hitslab">'.sp($row['Hits'],_('hit'),_('hits')).'</span></div>'.N);
|
||||
echo('<div class="info1st">'.gmdate('d/m/Y',$row['TS']).': '.fnum($row['Visits'],$lc,0).' <span class="visitslab">'.sp($row['Visits'],_('visit'),_('visits')).'</span>, '.fnum($row['Hits'],$lc,0).' <span class="hitslab">'.sp($row['Hits'],_('hit'),_('hits')).'</span></div>'.N);
|
||||
echo('<div class="info">'.$hl.'</div>'.N);
|
||||
echo('<div class="info">'.$hp.'</div>'.N);
|
||||
echo('<div class="visits" style="width:'.(100/$maxvisits*$row['Visits']).'%"></div>'.N);
|
||||
echo('<div class="hits" style="width:'.(100/$maxhits*$row['Hits']).'%"></div>'.N);
|
||||
echo('<div class="visits" style="width:'.rf($row['Visits']*100/$maxvisits).'%"></div>'.N);
|
||||
echo('<div class="hits" style="width:'.rf($row['Hits']*100/$maxhits).'%"></div>'.N);
|
||||
}
|
||||
|
||||
mysqli_close($link);
|
||||
|
|
Loading…
Reference in a new issue