format numbers

This commit is contained in:
ghost 2023-09-08 23:46:31 +03:00
parent 4592ce8732
commit 349ea9e361
3 changed files with 13 additions and 13 deletions

View File

@ -287,22 +287,22 @@ $peers = $memory->getByMethodCallback(
<tbody> <tbody>
<tr> <tr>
<td class="text-left"><?php echo _('Online') ?></td> <td class="text-left"><?php echo _('Online') ?></td>
<td class="text-right"><?php echo $memory->getByMethodCallback($db, 'findPeerTotalByTimeUpdated', [time() - WEBSITE_PEER_REMOTE_TIME_ONLINE_TIMEOUT, <td class="text-right"><?php echo number_format($memory->getByMethodCallback($db, 'findPeerTotalByTimeUpdated', [time() - WEBSITE_PEER_REMOTE_TIME_ONLINE_TIMEOUT,
strtotime('+1 month', strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)))]) ?></td> strtotime('+1 month', strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)))])) ?></td>
</tr> </tr>
<tr> <tr>
<td class="text-left"><?php echo _('New') ?></td> <td class="text-left"><?php echo _('New') ?></td>
<td class="text-right"><?php echo $memory->getByMethodCallback($db, 'findPeerTotalByTimeAdded', [strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)), <td class="text-right"><?php echo number_format($memory->getByMethodCallback($db, 'findPeerTotalByTimeAdded', [strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)),
strtotime('+1 month', strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)))]) ?></td> strtotime('+1 month', strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)))])) ?></td>
</tr> </tr>
<tr> <tr>
<td class="text-left"><?php echo _('Active') ?></td> <td class="text-left"><?php echo _('Active') ?></td>
<td class="text-right"><?php echo $memory->getByMethodCallback($db, 'findPeerTotalByTimeUpdated', [strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)), <td class="text-right"><?php echo number_format($memory->getByMethodCallback($db, 'findPeerTotalByTimeUpdated', [strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)),
strtotime('+1 month', strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)))]) ?></td> strtotime('+1 month', strtotime(sprintf('%s-%s-%s 00:00', date('Y'), date('n'), 1)))])) ?></td>
</tr> </tr>
<tr> <tr>
<td class="text-left"><?php echo _('Total') ?></td> <td class="text-left"><?php echo _('Total') ?></td>
<td class="text-right"><?php echo $memory->getByMethodCallback($db, 'getPeersTotal') ?></td> <td class="text-right"><?php echo number_format($memory->getByMethodCallback($db, 'getPeersTotal')) ?></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -386,7 +386,7 @@ $peers = $memory->getByMethodCallback(
<br /> <br />
<?php echo sprintf(_('database since %s contains %s peers'), <?php echo sprintf(_('database since %s contains %s peers'),
date('M, Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded), date('M, Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded),
$memory->getByMethodCallback($db, 'getPeersTotal')) ?> number_format($memory->getByMethodCallback($db, 'getPeersTotal'))) ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -366,15 +366,15 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId);
</tr> </tr>
<tr> <tr>
<td class="text-left"><?php echo _('Remote') ?></td> <td class="text-left"><?php echo _('Remote') ?></td>
<td class="text-right"><?php echo $peerInfo->remoteTotal ?></td> <td class="text-right"><?php echo number_format($peerInfo->remoteTotal) ?></td>
</tr> </tr>
<tr> <tr>
<td class="text-left"><?php echo _('Session') ?></td> <td class="text-left"><?php echo _('Session') ?></td>
<td class="text-right"><?php echo $peerInfo->sessionTotal ?></td> <td class="text-right"><?php echo number_format($peerInfo->sessionTotal) ?></td>
</tr> </tr>
<tr> <tr>
<td class="text-left"><?php echo _('Coordinate') ?></td> <td class="text-left"><?php echo _('Coordinate') ?></td>
<td class="text-right"><?php echo $peerInfo->coordinateTotal ?></td> <td class="text-right"><?php echo number_format($peerInfo->coordinateTotal) ?></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -519,7 +519,7 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId);
<br /> <br />
<?php echo sprintf(_('database since %s contains %s peers'), <?php echo sprintf(_('database since %s contains %s peers'),
date('M, Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded), date('M, Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded),
$memory->getByMethodCallback($db, 'getPeersTotal')) ?> number_format($memory->getByMethodCallback($db, 'getPeersTotal'))) ?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -275,7 +275,7 @@ $results = $sphinx->searchPeers($requestQuery,
<br /> <br />
<?php echo sprintf(_('database since %s contains %s peers'), <?php echo sprintf(_('database since %s contains %s peers'),
date('M, Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded), date('M, Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded),
$memory->getByMethodCallback($db, 'getPeersTotal')) ?> number_format($memory->getByMethodCallback($db, 'getPeersTotal'))) ?>
</div> </div>
</div> </div>
</div> </div>