Browse Source

format numbers

yggdrasil-0.4.7
ghost 1 year ago
parent
commit
349ea9e361
  1. 16
      src/public/index.php
  2. 8
      src/public/peer.php
  3. 2
      src/public/search.php

16
src/public/index.php

@ -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>

8
src/public/peer.php

@ -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>

2
src/public/search.php

@ -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>

Loading…
Cancel
Save