Avevo pensato ad aggiungere nel footer:
Codice: Seleziona tutto
require(DIR_WS_FUNCTIONS . 'whos_online.php');
<td align="right" class="footer"> <?php echo $whos_online ?> </td>[
Grazie
Moderatore: mod Generali
Codice: Seleziona tutto
require(DIR_WS_FUNCTIONS . 'whos_online.php');
<td align="right" class="footer"> <?php echo $whos_online ?> </td>[
<?php
// Set expiration time, default is 900 secs (15 mins)
$xx_mins_ago = (time() - 900);
tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'");
$whos_online_query = tep_db_query("select customer_id from " . TABLE_WHOS_ONLINE);
while ($whos_online = tep_db_fetch_array($whos_online_query)) {
if (!$whos_online['customer_id'] == 0) $n_members++;
if ($whos_online['customer_id'] == 0) $n_guests++;
$user_total = sprintf(tep_db_num_rows($whos_online_query)); }
if ($user_total == 1) {
$there_is_are = BOX_WHOS_ONLINE_THEREIS . ' ';
} else {
$there_is_are = BOX_WHOS_ONLINE_THEREARE . ' ';
}
if ($n_guests == 1) {
$word_guest = ' ' . BOX_WHOS_ONLINE_GUEST;
}else{
$word_guest = ' ' . BOX_WHOS_ONLINE_GUESTS;
}
if ($n_members == 1) {
$word_member = ' ' . BOX_WHOS_ONLINE_MEMBER;
}else{
$word_member = ' ' . BOX_WHOS_ONLINE_MEMBERS;
}
if (($n_guests >= 1) && ($n_members >= 1)) $word_and = ' ' . BOX_WHOS_ONLINE_AND . ' <br>';
$textstring = $there_is_are;
if ($n_guests >= 1) $textstring .= $n_guests . $word_guest;
$textstring .= $word_and;
if ($n_members >= 1) $textstring .= $n_members . $word_member;
$textstring .= ' online.' . ' <br>';
// if (tep_session_is_registered('customer_id')) {
// $textstring .= '<a href="online_list.php">' . BOX_VIEW_ONLINE_MEMBERS . '</a>';
// }
$info_box_contents2 = array();
$info_box_contents2 = array();
$info_box_contents2[] = array('align' => 'left',
'text' => $textstring
);
new infoBox($info_box_contents2);
?>
Codice: Seleziona tutto
?>
<div align="center">
<table border="0" width="800" cellspacing="0" cellpadding="1">
<tr class="footer">
<td class="footer"> <?php echo strftime(DATE_FORMAT_LONG); ?> </td>
<td align="right" class="footer"> <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?> </td>
</tr>
</table>
<br>
<table border="0" width="800" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="smallText">
<?php
Elimina la parte finale, quella che chiama la classe infoboxsakkiotto ha scritto:Beh, quel codice crea un nuovo box, io invece vorrei inserirlo in quello già presente dove ho il numero totale di visite.
Codice: Seleziona tutto
$info_box_contents2 = array();
$info_box_contents2 = array();
$info_box_contents2[] = array('align' => 'left',
'text' => $textstring
);
new infoBox($info_box_contents2);
Codice: Seleziona tutto
<td align="right" class="footer"><?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted ; ?>  - <?php echo $textstring ; ?></td>