am: 14. November 2010, 10:28:54
Ich möchte mir selber eine "User Online Box" erstellen habe auch schon hin bekommen das man etwas sieht, mein Problem ist nun in der PHP-Datei in diesem Teil:
// Generierung Inhalt beginn ------
$box_content = 'Inhalt provisorisch';
// Generierung Inhalt Ende ------
Müsste ich diesen teil:
<?php/*---------------------------------------------------
online.php
--------------------------------------------------*/ $xx_mins_ago = (time() - 900); // remove entries that have expired xtc_db_query
("delete from " . TABLE_WHOS_ONLINE
. " where time_last_click <'" . $xx_mins_ago . "'");?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="columnLeft2" width="
<?php echo BOX_WIDTH
; ?>" valign="top"><table border="0" width="
<?php echo BOX_WIDTH
; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
</table></td>
<!-- body_text //-->
<td class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
</table></td>
</tr>
<?php //BOF - DokuMan - 2010-06-28 - Added http_referer to whois online $whos_online_query = xtc_db_query
("select customer_id, full_name, ip_address, time_entry, time_last_click, last_page_url, session_id, http_referer from " . TABLE_WHOS_ONLINE
." order by time_last_click desc"); //$whos_online_query = xtc_db_query("select customer_id, full_name, ip_address, time_entry, time_last_click, last_page_url, session_id from " . TABLE_WHOS_ONLINE ." order by time_last_click desc"); //EOF - DokuMan - 2010-06-28 - Added http_referer to whois online while ($whos_online = xtc_db_fetch_array
($whos_online_query)) { $time_online = (time() - $whos_online['time_entry']); if ( ((!$_GET['info']) || (@$_GET['info'] == $whos_online['session_id'])) && (!$info) ) { $info = $whos_online['session_id']; } if ($whos_online['session_id'] == $info) { echo ' <tr class="dataTableRowSelected">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link
(FILENAME_WHOS_ONLINE
, xtc_get_all_get_params
(array('info', 'action')) . 'info=' . $whos_online['session_id'], 'NONSSL') . '\'">' . "\n"; }?><div align="center">
<td class="dataTableContent">
<?php echo gmdate('H:i:s', $time_online); ?></td>
<td class="dataTableContent">
<?php echo $whos_online['customer_id']; ?></td>
<td class="dataTableContent">
<?php echo $whos_online['full_name']; ?></td>
<td class="dataTableContent">
<?php if (preg_match('/^(.*)' . xtc_session_name
() . '=[a-f,0-9]+[&]*(.*)/i', $whos_online['last_page_url'], $array)) { // Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP>= 5.3 echo $array[1] . $array[2]; } else { echo $whos_online['last_page_url']; } ?> </td>
</div>
<?php }?> </table></td>
</tr>
</table></td>
</tr>
</table></td>
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->
<br />
</body>
</html>
Einbauen und das Bekomme ich nicht hin, dazu reichen meine Kenntnisse leider nicht und ich hoffe, dass mir jemand dabei helfen kann.
Ich möchte es so machen das in der Box die Anzahl der Gäste steht und wenn ein Kunde Online ist sein Name und durch einen Klick auf den Kunden oder Gast dann zu sehen ist wo er ist?
Linkback: https://www.modified-shop.org/forum/index.php?topic=9301.0