diff --git a/src/mibew/locales/en/properties b/src/mibew/locales/en/properties index 73d823ba..6538446b 100644 --- a/src/mibew/locales/en/properties +++ b/src/mibew/locales/en/properties @@ -19,6 +19,7 @@ button.online.top=Site consultant button.online=ONLINE button.save=Save button.search=Search +button.purge=Permanently delete selected conversations! canned.actions.del=remove canned.actions.edit=edit canned.actions=Modify @@ -244,6 +245,8 @@ menu.notifications=Notifications menu.operator=You are {0} menu.profile.content=You can change your personal information on this page. menu.profile=Profile +menu.purge.content=Remove old conversations. +menu.purge=Purge menu.translate=Localize menu.updates.content=Check for news and updates. menu.updates=Updates @@ -425,6 +428,8 @@ presurvey.name=Name: presurvey.question=Initial Question: presurvey.submit=Start Chat presurvey.title=Live support +purge.search=Enter dates to search from and to: +purge.title=Purge report.bydate.1=Date report.bydate.2=Chat threads report.bydate.3=Messages from operators diff --git a/src/mibew/operator/purge.php b/src/mibew/operator/purge.php new file mode 100644 index 00000000..7b64db7f --- /dev/null +++ b/src/mibew/operator/purge.php @@ -0,0 +1,86 @@ += %d", $start); + } + if ($end !== false) { + $queryArray[]= sprintf("unix_timestamp(${mysqlprefix}chatthread.dtmcreated) < %d", $end); + } + + select_with_pagintation("DISTINCT unix_timestamp(${mysqlprefix}chatthread.dtmcreated) as created, " . + "unix_timestamp(${mysqlprefix}chatthread.dtmmodified) as modified, ${mysqlprefix}chatthread.threadid, " . + "${mysqlprefix}chatthread.remote, ${mysqlprefix}chatthread.agentName, ${mysqlprefix}chatthread.userName, groupid, " . + "messageCount as size", + "${mysqlprefix}chatthread, ${mysqlprefix}chatmessage", + $queryArray, + "order by created DESC", + "DISTINCT ${mysqlprefix}chatthread.dtmcreated", $link); + + mysql_close($link); +} else { + setup_empty_pagination(); +} + +prepare_menu($operator); +start_html_output(); +require('../view/thread_purge_search.php'); +?> \ No newline at end of file diff --git a/src/mibew/view/inc_menu.php b/src/mibew/view/inc_menu.php index 8d0f31f5..876e9b7a 100644 --- a/src/mibew/view/inc_menu.php +++ b/src/mibew/view/inc_menu.php @@ -59,6 +59,9 @@ function tpl_menu() { global $page, $mibewroot, $errors; > > + + > + > diff --git a/src/mibew/view/menu.php b/src/mibew/view/menu.php index 6eb8c959..9ca6b335 100644 --- a/src/mibew/view/menu.php +++ b/src/mibew/view/menu.php @@ -163,6 +163,16 @@ $menuItemsCount = 2; + + + + + + + + + + diff --git a/src/mibew/view/thread_purge_search.php b/src/mibew/view/thread_purge_search.php new file mode 100644 index 00000000..061184a0 --- /dev/null +++ b/src/mibew/view/thread_purge_search.php @@ -0,0 +1,143 @@ + + +
+
+ +
+
+ +
+
+
+
+
+ … + +
+
+ " alt=""/> +
+
+
+
+
+ +
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + , +
+ +
+

"/>

+
+ +"; + echo generate_pagination($page['pagination']); + } +} +?> + + \ No newline at end of file