This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>statslive</name>
|
||||
<displayName>Visitors online</displayName>
|
||||
<version>1</version>
|
||||
<description>Display the list of customers and visitors currently online.</description>
|
||||
<author>PrestaShop</author>
|
||||
<tab>analytics_stats</tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
</module>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statslive}prestashop>statslive_fa55230e9791f2b71322869318a5f00f'] = 'Besucher online';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b8a5ea9b6e7f2d0b56fbb18e5b6b9246'] = 'Zeigt eine Liste der Kunden und Besucher, die zur Zeit online sind';
|
||||
$_MODULE['<{statslive}prestashop>statslive_fd42d96861238b1cd5859585c4351eca'] = 'Sie müssen die Option \"Seitenaufrufe für jeden Kunden\" im \"Statistik Datamining\"-Modul aktivieren, um die Seiten zu sehen, die derzeit von Ihren Kunden eingesehen werden.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_5c948349bdf1a7a77ba54497d019e4ca'] = 'Kunden online';
|
||||
$_MODULE['<{statslive}prestashop>statslive_66c4c5112f455a19afde47829df363fa'] = 'Gesamt:';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{statslive}prestashop>statslive_49ee3087348e8d44e1feda1917443987'] = 'Name';
|
||||
$_MODULE['<{statslive}prestashop>statslive_f88589c3e803217e3f6fe9d8e740e6e8'] = 'Aktuelle Seite';
|
||||
$_MODULE['<{statslive}prestashop>statslive_4351cfebe4b61d8aa5efa1d020710005'] = 'Anzeigen';
|
||||
$_MODULE['<{statslive}prestashop>statslive_bc59449a563c905a40eb3c871bb36d03'] = 'Zur Zeit sind keine Kunden online.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_adb831a7fdd83dd1e2a309ce7591dff8'] = 'Besucher';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a12a3079e14ced46e69ba52b8a90b21a'] = 'IP';
|
||||
$_MODULE['<{statslive}prestashop>statslive_38c50b731f70abc42c8baa3e7399b413'] = 'Seit';
|
||||
$_MODULE['<{statslive}prestashop>statslive_13aa8652e950bb7c4b9b213e6d8d0dc5'] = 'Aktuelle Seite';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b6f05e5ddde1ec63d992d61144452dfa'] = 'Referrer';
|
||||
$_MODULE['<{statslive}prestashop>statslive_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Undefiniert';
|
||||
$_MODULE['<{statslive}prestashop>statslive_334c4a4c42fdb79d7ebc3e73b517e6f8'] = 'nichts';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a55533db46597bee3cd16899c007257e'] = 'Zur Zeit sind keine Besucher online.';
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statslive}prestashop>statslive_fa55230e9791f2b71322869318a5f00f'] = 'Visitantes en línea';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b8a5ea9b6e7f2d0b56fbb18e5b6b9246'] = 'Mostrar la lista de clientes y visitantes conectados';
|
||||
$_MODULE['<{statslive}prestashop>statslive_fd42d96861238b1cd5859585c4351eca'] = 'Debe activar la opción \"páginas vistas por cada cliente\" en el módulo \"Recuperación de datos estadíisticos\" para visualizar las páginas consultadas por sus clientes.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_5c948349bdf1a7a77ba54497d019e4ca'] = 'Clientes en línea';
|
||||
$_MODULE['<{statslive}prestashop>statslive_66c4c5112f455a19afde47829df363fa'] = 'Total:';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{statslive}prestashop>statslive_49ee3087348e8d44e1feda1917443987'] = 'Nombre';
|
||||
$_MODULE['<{statslive}prestashop>statslive_f88589c3e803217e3f6fe9d8e740e6e8'] = 'Página en curso';
|
||||
$_MODULE['<{statslive}prestashop>statslive_4351cfebe4b61d8aa5efa1d020710005'] = 'Vista';
|
||||
$_MODULE['<{statslive}prestashop>statslive_bc59449a563c905a40eb3c871bb36d03'] = 'No hay clientes en línea';
|
||||
$_MODULE['<{statslive}prestashop>statslive_adb831a7fdd83dd1e2a309ce7591dff8'] = 'Visitante';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a12a3079e14ced46e69ba52b8a90b21a'] = 'IP';
|
||||
$_MODULE['<{statslive}prestashop>statslive_38c50b731f70abc42c8baa3e7399b413'] = 'Desde';
|
||||
$_MODULE['<{statslive}prestashop>statslive_13aa8652e950bb7c4b9b213e6d8d0dc5'] = 'Página en curso';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b6f05e5ddde1ec63d992d61144452dfa'] = 'origen';
|
||||
$_MODULE['<{statslive}prestashop>statslive_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indefinido';
|
||||
$_MODULE['<{statslive}prestashop>statslive_334c4a4c42fdb79d7ebc3e73b517e6f8'] = 'ninguno';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a55533db46597bee3cd16899c007257e'] = 'No hay visitantes en línea ahora.';
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statslive}prestashop>statslive_fa55230e9791f2b71322869318a5f00f'] = 'Visiteurs en ligne';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b8a5ea9b6e7f2d0b56fbb18e5b6b9246'] = 'Affiche la liste des clients et visiteurs en ligne actuellement';
|
||||
$_MODULE['<{statslive}prestashop>statslive_fd42d96861238b1cd5859585c4351eca'] = 'Vous devez activer l\'option \"pages vues pour chaque client\" dans le module \"Récupération des données statistiques\" pour visualiser les pages consultées par vos clients.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_5c948349bdf1a7a77ba54497d019e4ca'] = 'Clients en ligne';
|
||||
$_MODULE['<{statslive}prestashop>statslive_66c4c5112f455a19afde47829df363fa'] = 'Total :';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{statslive}prestashop>statslive_49ee3087348e8d44e1feda1917443987'] = 'Nom';
|
||||
$_MODULE['<{statslive}prestashop>statslive_f88589c3e803217e3f6fe9d8e740e6e8'] = 'Page en cours';
|
||||
$_MODULE['<{statslive}prestashop>statslive_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir';
|
||||
$_MODULE['<{statslive}prestashop>statslive_bc59449a563c905a40eb3c871bb36d03'] = 'Il n\'y a aucun client en ligne en ce moment.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_adb831a7fdd83dd1e2a309ce7591dff8'] = 'Visiteur';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a12a3079e14ced46e69ba52b8a90b21a'] = 'IP';
|
||||
$_MODULE['<{statslive}prestashop>statslive_38c50b731f70abc42c8baa3e7399b413'] = 'Depuis';
|
||||
$_MODULE['<{statslive}prestashop>statslive_13aa8652e950bb7c4b9b213e6d8d0dc5'] = 'Page en cours';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b6f05e5ddde1ec63d992d61144452dfa'] = 'Origine';
|
||||
$_MODULE['<{statslive}prestashop>statslive_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indéfini';
|
||||
$_MODULE['<{statslive}prestashop>statslive_334c4a4c42fdb79d7ebc3e73b517e6f8'] = '- accès direct -';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a55533db46597bee3cd16899c007257e'] = 'Il n\'y a aucun visiteur en ligne actuellement.';
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statslive}prestashop>statslive_fa55230e9791f2b71322869318a5f00f'] = 'Visitatori online';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b8a5ea9b6e7f2d0b56fbb18e5b6b9246'] = 'Visualizza l\'elenco dei clienti e dei visitatori online';
|
||||
$_MODULE['<{statslive}prestashop>statslive_fd42d96861238b1cd5859585c4351eca'] = 'È necessario attivare l\'opzione \"pagine viste per ogni cliente\" nel modulo \"recupero dei dati statistici\" per visualizzare le pagine attualmente viste dai suoi clienti.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_5c948349bdf1a7a77ba54497d019e4ca'] = 'Clienti online';
|
||||
$_MODULE['<{statslive}prestashop>statslive_66c4c5112f455a19afde47829df363fa'] = 'Totale:';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{statslive}prestashop>statslive_49ee3087348e8d44e1feda1917443987'] = 'Nome';
|
||||
$_MODULE['<{statslive}prestashop>statslive_f88589c3e803217e3f6fe9d8e740e6e8'] = 'Pagina corrente';
|
||||
$_MODULE['<{statslive}prestashop>statslive_4351cfebe4b61d8aa5efa1d020710005'] = 'Visualizza';
|
||||
$_MODULE['<{statslive}prestashop>statslive_bc59449a563c905a40eb3c871bb36d03'] = 'Non ci sono clienti online adesso.';
|
||||
$_MODULE['<{statslive}prestashop>statslive_adb831a7fdd83dd1e2a309ce7591dff8'] = 'Ospite';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a12a3079e14ced46e69ba52b8a90b21a'] = 'IP';
|
||||
$_MODULE['<{statslive}prestashop>statslive_38c50b731f70abc42c8baa3e7399b413'] = 'Da';
|
||||
$_MODULE['<{statslive}prestashop>statslive_13aa8652e950bb7c4b9b213e6d8d0dc5'] = 'Pagina corrente';
|
||||
$_MODULE['<{statslive}prestashop>statslive_b6f05e5ddde1ec63d992d61144452dfa'] = 'Referente';
|
||||
$_MODULE['<{statslive}prestashop>statslive_ec0fc0100c4fc1ce4eea230c3dc10360'] = 'Indefinito';
|
||||
$_MODULE['<{statslive}prestashop>statslive_334c4a4c42fdb79d7ebc3e73b517e6f8'] = 'nessuno';
|
||||
$_MODULE['<{statslive}prestashop>statslive_a55533db46597bee3cd16899c007257e'] = 'Non ci sono visitatori online adesso.';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1009 B |
@@ -1,154 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class StatsLive extends Module
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'statslive';
|
||||
$this->tab = 'analytics_stats';
|
||||
$this->version = 1.0;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Visitors online');
|
||||
$this->description = $this->l('Display the list of customers and visitors currently online.');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
return (parent::install() AND $this->registerHook('AdminStatsModules'));
|
||||
}
|
||||
|
||||
private function getCustomersOnline()
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT u.id_customer, u.firstname, u.lastname, pt.name as page
|
||||
FROM `'._DB_PREFIX_.'connections` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections
|
||||
LEFT JOIN `'._DB_PREFIX_.'page` p ON p.id_page = cp.id_page
|
||||
LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON p.id_page_type = pt.id_page_type
|
||||
INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest
|
||||
INNER JOIN `'._DB_PREFIX_.'customer` u ON u.id_customer = g.id_customer
|
||||
WHERE cp.`time_end` IS NULL
|
||||
AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
|
||||
GROUP BY c.id_connections
|
||||
ORDER BY u.firstname, u.lastname');
|
||||
}
|
||||
|
||||
private function getVisitorsOnline()
|
||||
{
|
||||
if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer, pt.name as page
|
||||
FROM `'._DB_PREFIX_.'connections` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections
|
||||
LEFT JOIN `'._DB_PREFIX_.'page` p ON p.id_page = cp.id_page
|
||||
LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON p.id_page_type = pt.id_page_type
|
||||
INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest
|
||||
WHERE (g.id_customer IS NULL OR g.id_customer = 0)
|
||||
AND cp.`time_end` IS NULL
|
||||
AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
|
||||
GROUP BY c.id_connections
|
||||
ORDER BY c.date_add DESC');
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer
|
||||
FROM `'._DB_PREFIX_.'connections` c
|
||||
INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest
|
||||
WHERE (g.id_customer IS NULL OR g.id_customer = 0)
|
||||
AND TIME_TO_SEC(TIMEDIFF(NOW(), c.`date_add`)) < 900
|
||||
ORDER BY c.date_add DESC');
|
||||
}
|
||||
|
||||
public function hookAdminStatsModules($params)
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
$customers = $this->getCustomersOnline();
|
||||
$totalCustomers = Db::getInstance()->NumRows();
|
||||
$visitors = $this->getVisitorsOnline();
|
||||
$totalVisitors = Db::getInstance()->NumRows();
|
||||
$irow = 0;
|
||||
|
||||
echo '<script type="text/javascript" language="javascript">
|
||||
$("#calendar").next().remove();
|
||||
$("#calendar").remove();
|
||||
</script>';
|
||||
if (!Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
|
||||
echo '<div class="warn width3">'.$this->l('You must activate the option "pages views for each customer" in the "Stats datamining" module in order to see the pages currently viewed by your customers.').'</div>';
|
||||
echo '
|
||||
<fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->l('Customers online').'</legend>';
|
||||
if ($totalCustomers)
|
||||
{
|
||||
echo $this->l('Total:').' '.(int)($totalCustomers).'
|
||||
<table cellpadding="0" cellspacing="0" class="table space">
|
||||
<tr><th>'.$this->l('ID').'</th><th>'.$this->l('Name').'</th><th>'.$this->l('Current Page').'</th><th>'.$this->l('View').'</th></tr>';
|
||||
foreach ($customers as $customer)
|
||||
echo '
|
||||
<tr'.($irow++ % 2 ? ' class="alt_row"' : '').'>
|
||||
<td>'.$customer['id_customer'].'</td>
|
||||
<td style="width: 200px;">'.$customer['firstname'].' '.$customer['lastname'].'</td>
|
||||
<td style="width: 200px;">'.$customer['page'].'</td>
|
||||
<td style="text-align: right; width: 25px;">
|
||||
<a href="index.php?tab=AdminCustomers&id_customer='.$customer['id_customer'].'&viewcustomer&token='.Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)($cookie->id_employee)).'" target="_blank">
|
||||
<img src="../modules/'.$this->name.'/logo.gif" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>';
|
||||
echo '</table>';
|
||||
}
|
||||
else
|
||||
echo $this->l('There are no cusomers online.');
|
||||
echo '</fieldset>
|
||||
<fieldset class="width3 space"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->l('Visitors online').'</legend>';
|
||||
if ($totalVisitors)
|
||||
{
|
||||
echo $this->l('Total:').' '.(int)($totalVisitors).'
|
||||
<div style="overflow-y: scroll; height: 600px;">
|
||||
<table cellpadding="0" cellspacing="0" class="table space">
|
||||
<tr><th>'.$this->l('Guest').'</th><th>'.$this->l('IP').'</th><th>'.$this->l('Since').'</th><th>'.$this->l('Current page').'</th><th>'.$this->l('Referrer').'</th></tr>';
|
||||
foreach ($visitors as $visitor)
|
||||
echo '<tr'.($irow++ % 2 ? ' class="alt_row"' : '').'>
|
||||
<td>'.$visitor['id_guest'].'</td>
|
||||
<td style="width: 80px;">'.long2ip($visitor['ip_address']).'</td>
|
||||
<td style="width: 100px;">'.substr($visitor['date_add'], 11).'</td>
|
||||
<td style="width: 200px;">'.(isset($visitor['page']) ? $visitor['page'] : $this->l('Undefined')).'</td>
|
||||
<td style="width: 200px;">'.(empty($visitor['http_referer']) ? $this->l('none') : parse_url($visitor['http_referer'], PHP_URL_HOST)).'</td>
|
||||
</tr>';
|
||||
echo '</table></div>';
|
||||
}
|
||||
else
|
||||
echo $this->l('There are no visitors online.');
|
||||
echo '</fieldset>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user