diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 730dd771..19704490 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -405,7 +405,8 @@ report.byoperator.3=Messages report.byoperator.4=Average message length (in chars) report.byoperator.title=Threads by operator report.bypage.1=Page -report.bypage.2=Chat threads +report.bypage.2=View times +report.bypage.3=Chat threads report.bypage.title=Chat threads by page report.no_items=Not enough data report.total=Total: diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties index 759930c0..2d2207d8 100644 --- a/src/messenger/webim/locales/ru/properties +++ b/src/messenger/webim/locales/ru/properties @@ -403,7 +403,8 @@ report.byoperator.3= report.byoperator.4=Средняя длина сообщения (в символах) report.byoperator.title=Статистика по операторам report.bypage.1=Страница -report.bypage.2=Диалогов +report.bypage.2=Просмотров +report.bypage.3=Диалогов report.bypage.title=Статистика по страницам report.no_items=Мало данных report.total=Итого: diff --git a/src/messenger/webim/operator/statistics.php b/src/messenger/webim/operator/statistics.php index 0c38a24a..178201bf 100644 --- a/src/messenger/webim/operator/statistics.php +++ b/src/messenger/webim/operator/statistics.php @@ -82,7 +82,9 @@ $page['reportByAgent'] = select_multi_assoc("select vclocalename as name, COUNT( "from ${mysqlprefix}chatmessage, ${mysqlprefix}chatoperator " . "where agentId = operatorid AND unix_timestamp(dtmcreated) >= $start AND unix_timestamp(dtmcreated) < $end group by operatorid", $link); -$page['reportByPage'] = select_multi_assoc("SELECT COUNT(threadid) as chattimes, referer FROM ${mysqlprefix}chatthread WHERE unix_timestamp(dtmcreated) >= $start AND unix_timestamp(dtmcreated) < $end GROUP BY referer", $link); +$page['reportByPage'] = select_multi_assoc("SELECT COUNT(p.pageid) as visittimes, p.address, COUNT(t.threadid) as chattimes " . + "FROM ${mysqlprefix}visitedpage p LEFT OUTER JOIN ${mysqlprefix}chatthread t ON (p.address = t.referer AND DATE(p.visittime) = DATE(t.dtmcreated)) " . + "WHERE unix_timestamp(p.visittime) >= $start AND unix_timestamp(p.visittime) < $end GROUP BY p.address", $link); $page['showresults'] = count($errors) == 0; diff --git a/src/messenger/webim/view/statistics.php b/src/messenger/webim/view/statistics.php index be1bd8bf..0ddfd711 100644 --- a/src/messenger/webim/view/statistics.php +++ b/src/messenger/webim/view/statistics.php @@ -164,19 +164,22 @@ require_once('inc_errors.php');