diff --git a/.gitignore b/.gitignore index 99290f53..e69de29b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +0,0 @@ -bin -src/messenger/.idea/workspace.xml -src/messenger/mibew/install/package -src/messenger/absent_* -src/messenger/release* -src/mibewjava/.idea/workspace.xml -src/mibewjava/org.mibew.notifier/resources/ -mibew.ini -.DS_Store - -# No index actual configuration files -src/messenger/mibew/libs/config.php -src/messenger/tests/server_side/mibew/libs/config.php - -# No index plugins -src/messenger/mibew/plugins/* -!src/messenger/mibew/plugins/.keep \ No newline at end of file diff --git a/docs/design/abstract_button.psd b/design/abstract_button.psd similarity index 100% rename from docs/design/abstract_button.psd rename to design/abstract_button.psd diff --git a/docs/design/abstract_button_narrow.psd b/design/abstract_button_narrow.psd similarity index 100% rename from docs/design/abstract_button_narrow.psd rename to design/abstract_button_narrow.psd diff --git a/docs/design/abstract_rounded.psd b/design/abstract_rounded.psd similarity index 100% rename from docs/design/abstract_rounded.psd rename to design/abstract_rounded.psd diff --git a/docs/design/he/he_off.psd b/design/he/he_off.psd similarity index 100% rename from docs/design/he/he_off.psd rename to design/he/he_off.psd diff --git a/docs/design/he/he_on.psd b/design/he/he_on.psd similarity index 100% rename from docs/design/he/he_on.psd rename to design/he/he_on.psd diff --git a/docs/design/logo.psd b/design/logo.psd similarity index 100% rename from docs/design/logo.psd rename to design/logo.psd diff --git a/docs/design/logo/16x16.gif b/design/logo/16x16.gif similarity index 100% rename from docs/design/logo/16x16.gif rename to design/logo/16x16.gif diff --git a/docs/design/logo/32x32.gif b/design/logo/32x32.gif similarity index 100% rename from docs/design/logo/32x32.gif rename to design/logo/32x32.gif diff --git a/docs/design/logo/64x64.gif b/design/logo/64x64.gif similarity index 100% rename from docs/design/logo/64x64.gif rename to design/logo/64x64.gif diff --git a/docs/design/message_history.psd b/design/message_history.psd similarity index 100% rename from docs/design/message_history.psd rename to design/message_history.psd diff --git a/docs/design/shablon-knopka_en.psd b/design/shablon-knopka_en.psd similarity index 100% rename from docs/design/shablon-knopka_en.psd rename to design/shablon-knopka_en.psd diff --git a/src/messenger/.idea/.name b/src/messenger/.idea/.name deleted file mode 100644 index 4c926610..00000000 --- a/src/messenger/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -messenger \ No newline at end of file diff --git a/src/messenger/.idea/codeStyleSettings.xml b/src/messenger/.idea/codeStyleSettings.xml deleted file mode 100644 index de6382eb..00000000 --- a/src/messenger/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - diff --git a/src/messenger/.idea/encodings.xml b/src/messenger/.idea/encodings.xml deleted file mode 100644 index 0b99745d..00000000 --- a/src/messenger/.idea/encodings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/messenger/.idea/inspectionProfiles/Project_Default.xml b/src/messenger/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index c66df003..00000000 --- a/src/messenger/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/messenger/.idea/inspectionProfiles/profiles_settings.xml b/src/messenger/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b312839..00000000 --- a/src/messenger/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/messenger/.idea/messenger.iml b/src/messenger/.idea/messenger.iml deleted file mode 100644 index 54192b37..00000000 --- a/src/messenger/.idea/messenger.iml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/messenger/.idea/misc.xml b/src/messenger/.idea/misc.xml deleted file mode 100644 index 11e74ae4..00000000 --- a/src/messenger/.idea/misc.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - http://www.w3.org/1999/xhtml - - - - diff --git a/src/messenger/.idea/modules.xml b/src/messenger/.idea/modules.xml deleted file mode 100644 index 3160e9b9..00000000 --- a/src/messenger/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/messenger/.idea/projectCodeStyle.xml b/src/messenger/.idea/projectCodeStyle.xml deleted file mode 100644 index 596456e4..00000000 --- a/src/messenger/.idea/projectCodeStyle.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - diff --git a/src/messenger/.idea/scopes/scope_settings.xml b/src/messenger/.idea/scopes/scope_settings.xml deleted file mode 100644 index 922003b8..00000000 --- a/src/messenger/.idea/scopes/scope_settings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/messenger/.idea/vcs.xml b/src/messenger/.idea/vcs.xml deleted file mode 100644 index 9ab281ac..00000000 --- a/src/messenger/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/messenger/build.xml b/src/messenger/build.xml deleted file mode 100644 index 55e2c4b8..00000000 --- a/src/messenger/build.xml +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - - - - - - - Flatten templates directory structure - - - - - - - - - - - - - - - - - - - - - - Compile templates - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove temporary files - - - - - - - - - - - - - - - Done - - - - - - Compile and concatenate JavaScript files for dialogs styles: - - - Create temporary directories - - - - - - - - - - Compile JavaScript files - - - - - - - - - - - - - - - Concatenate JavaScript files - - - - - - - - - - - Remove temporary directories - - - - - - - - - Done - - - - - - Dialogs styles built. - - - - - - Compile JavaScript files of the Mibew Core - - - Copy directory tree - - - - - - - - Compile JavaScript files - - - - - - - - - - - - - - Done - - - - - - Build "${app_name}" JavaScript application - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Done - - - - - - - - - Default JavaScript application built. - - - - - - - - - Chat JavaScript application built. - - - - - - - - - - Users JavaScript application built. - - - - - - - - - Thread log JavaScript application built. - - - - - - Compile Handlebars templates of the Core - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Done - - - - - - Mibew Messenger built. - - - - \ No newline at end of file diff --git a/src/messenger/check_translation.pl b/src/messenger/check_translation.pl deleted file mode 100755 index 4e7a84e0..00000000 --- a/src/messenger/check_translation.pl +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl - -sub read_transl($) { - my($from) = @_; - my %translation = (); - open(IN, "mibew/locales/$from/properties"); - while() { - chomp; - if(/^([\w\.]+)=(.*)$/) { - if($1 ne "encoding" && $1 ne "output_charset" && $1 ne "output_encoding") { - $translation{$1} = $2; - } - } else { - die "wrong line in $from: $_\n"; - } - } - close(IN); - return %translation; -} - -%tr_en = read_transl("en"); - -@all_keys = keys %tr_en; - -sub check_transl($%) { - my($name,%tr) = @_; - print "checking $name...\n"; - my @totransl = (); - for $key (@all_keys) { - unless(exists $tr{$key}) { - push @totransl, "$key=".$tr_en{$key}; - } - } - for $key(keys %tr) { - unless(exists $tr_en{$key}) { - print "unknown key in $name: $key\n"; - } - } - if($#totransl >= 0) { - print "@{[$#totransl+1]} lines absent in locales/$name/properties\n"; - open(OUT, "> absent_$name"); - for(sort @totransl) { - print OUT "$_\n"; - } - close(OUT); - } -} - -check_transl("ru", read_transl("ru")); -check_transl("fr", read_transl("fr")); -check_transl("de", read_transl("de")); -check_transl("sp", read_transl("sp")); -check_transl("it", read_transl("it")); -check_transl("pl", read_transl("pl")); -check_transl("zh-tw", read_transl("zh-tw")); - diff --git a/src/messenger/compute_resources.pl b/src/messenger/compute_resources.pl deleted file mode 100755 index e7e3584a..00000000 --- a/src/messenger/compute_resources.pl +++ /dev/null @@ -1,245 +0,0 @@ -#!/usr/bin/perl - -use Digest::MD5 qw(md5 md5_hex md5_base64); - -@rules = ( - ["redirect(ed)?\\.tpl", 1], - ["\\.tpl", 0], - - ["view/license.php", 0], - ["view/themes.php", 2], - ["view/translate.php", 2], - ["view/translatelist.php", 2], - ["view/settings.php", 2], - ["view/updates.php", 2], - ["view/features.php", 2], - ["view/performance.php", 2], - ["view/avatar.php", 2], - ["view/permissions.php", 2], - ["view/agent.php", 2], - ["view/agents.php", 2], - ["view/group.php", 2], - ["view/groupmembers.php", 2], - ["view/groups.php", 2], - ["view/operator_groups.php", 2], - ["view/gen_button.php", 2], - ["view/install_err.php", 2], - ["view/install_index.php", 2], - ["view/.*\\.php", 1], - - ["install/.*\\.php", 2], - - ["operator/themes.php", 2], - ["operator/translate.php", 2], - ["operator/settings.php", 2], - ["operator/updates.php", 2], - ["operator/features.php", 2], - ["operator/performance.php", 2], - ["operator/avatar.php", 2], - ["operator/permissions.php", 2], - ["operator/operator.php", 2], - ["operator/operators.php", 2], - ["operator/group.php", 2], - ["operator/groupmembers.php", 2], - ["operator/groups.php", 2], - ["operator/opgroups.php", 2], - ["operator/getcode.php", 2], - ["operator/.*\\.php", 1], - - ["mibew/client.php", 0], - ["mibew/leavemessage.php", 0], - ["mibew/captcha.php", 0], - ["mibew/license.php", 0], - ["mibew/mail.php", 0], - - ["libs/operator_settings.php", 2], - ["mibew/libs/chat.php", 0], - ["libs/pagination.php", 1], - ["libs/settings.php", 2], - ["libs/groups.php", 2], - ["libs/demothread.php", 2], - - ["mibew/thread.php", 0], - ["mibew/b.php", 0], - ["mibew/button.php", 0], - ["mibew/index.php", 0], - - ["mibew/libs/.*\\.php", 1], -); - -%messagekeys = ( - "localeid" => 0, - "output_charset" => 0, - "output_encoding" => 0, - "harderrors.header" => 0, - - "errors.required" => 0, - "errors.wrong_field" => 0, - "errors.file.move.error" => 2, - "errors.invalid.file.type" => 2, - "errors.file.size.exceeded" => 2, - - "permission.admin" => 1, - "permission.takeover" => 1, - "permission.viewthreads" => 1, - - "chat.thread.state_chatting_with_agent" => 1, - "chat.thread.state_closed" => 1, - "chat.thread.state_loading" => 1, - "chat.thread.state_wait" => 1, - "chat.thread.state_wait_for_another_agent" => 1, - - "clients.queue.chat" => 1, - "clients.queue.prio" => 1, - "clients.queue.wait" => 1, -); - - -$mibewPath = "mibew"; - -%urls = (); - -%usermessages = (); -%operatormessages = (); -$current_level = 0; - -sub usemsg($) { - my ($m) = @_; - $messagekeys{$m} = exists $messagekeys{$m} && $messagekeys{$m} < $current_level ? $messagekeys{$m} : $current_level; - if($current_level == -1) { - print " .. $m\n"; - } -} - -sub file_content($) { - my $input = $_[0]; - open( IN1, "< $input" ) or die "cannot find file $input"; - my $oldslash = $/; - $/ = EOI; - $content = ; - close( IN1 ); - if($content =~ s/\r//g) { - open( OUT1, "> $input") or die "cannot fix $input"; - print OUT1 $content; - close(OUT1); - } - $/ = $oldslash; - return $content; -} - -sub process_tpl($) { - my ($filename) = @_; - my $m = file_content($filename); - while( $m =~ /\${msg:([\w\.]+)(,[\w\.]+)?}/g ) { - usemsg($1); - } - while( $m =~ /\${url:([\w\.]+)(,[\w\.]+)?}/g ) { - usemsg($1); - $urls{"%$1"} = 1; - } -} - -sub process_php($) { - my ($source) = @_; - my $content = file_content($source); - $content =~ s/<\?xml version=\\"1\.0\\" encoding=\\"UTF-8\\"\?>//; - - while( $content =~ s/<\?(?!xml)(.*?)\?>//s ) { - my $inner = $1; - while($inner =~ s/(getlocal|getstring|no_field)2?_?\((.*?)[,\)]//s) { - my $firstarg = $2; - if( $firstarg =~ /^["']([\w\.]+)['"]$/) { - usemsg($1); - } elsif($firstarg =~ /^\$\w+$/ || $firstarg eq '"$var.header"' || $firstarg eq '"permission.$permid"' || $firstarg eq '$threadstate_key[$thread[\'istate\']]') { - # skip - } else { - print "> unknown: $firstarg\n"; - } - } - } -} - -sub file_checksum($) { - my ($source) = @_; - if($source =~ /\.(png|gif|jpg|ico|wav)$/ || $source =~ /config\.php$/) { - return "-"; - } - - my $content = file_content($source); - return md5_hex($content); -} - -@allsources = (); - -sub process_one($) { - my($source) = @_; - push @allsources, $source unless $source =~ /$mibewPath\/locales/ && $source !~ /$mibewPath\/locales\/(en|names)/ || $source =~ /\/package$/; - - if($source !~ /\.(php|tpl)$/) { - return; - } - - $current_level = -1; - - A: foreach $rule (@rules) { - my $key = $$rule[0]; - if($source =~ /$key/) { - $current_level = $$rule[1]; - last A; - } - } - if($current_level < 0 || $current_level > 2) { - print "not detected for: $source\n"; - $current_level = 0; - } - - if($source =~ /\.php$/) { - # print "$source ($current_level)\n"; - process_php($source); - } elsif($source =~ /\.tpl$/) { - process_tpl($source); - } else { - #print ". $source\n"; - } -} - -sub process_files($) { - my($from) = @_; - opendir(DIR, $from) || die "can't opendir $from: $!"; - my @content = readdir(DIR); - closedir DIR; - - for(grep { -f "$from/$_" && ($_ !~ /^\./ || $_ eq ".htaccess") } @content) { - process_one("$from/$_"); - } - for(grep { -d "$from/$_" && $_ !~ /^\./ } @content) { - process_files("$from/$_"); - } -} - -process_files($mibewPath); - -# fix -$messagekeys{'page.analysis.userhistory.title'} = 1; -$messagekeys{'errors.failed.uploading.file'} = 2; - - -open( OUT, "> $mibewPath/locales/names/level1") or die "cannot write file, $!"; -for $key(sort grep { $messagekeys{$_} == 0 } keys %messagekeys) { - print OUT "$key\n"; -} -close( OUT ); - -open( OUT, "> $mibewPath/locales/names/level2") or die "cannot write file, $!"; -for $key(sort grep { $messagekeys{$_} == 1 } keys %messagekeys) { - print OUT "$key\n"; -} -close( OUT ); - -open( OUT, "> $mibewPath/install/package") or die "cannot write file, $!"; -for $key(sort @allsources) { - $digest = file_checksum($key); - $key =~ s/$mibewPath\///; - print OUT "$key $digest\n"; -} -close( OUT ); diff --git a/src/messenger/mibew/.htaccess b/src/messenger/mibew/.htaccess deleted file mode 100644 index d3342e53..00000000 --- a/src/messenger/mibew/.htaccess +++ /dev/null @@ -1,6 +0,0 @@ -Options -Indexes - - -SecFilterEngine Off -SecFilterScanPOST Off - diff --git a/src/messenger/mibew/LICENSE b/src/messenger/mibew/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/src/messenger/mibew/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/src/messenger/mibew/README b/src/messenger/mibew/README deleted file mode 100644 index 123e94f1..00000000 --- a/src/messenger/mibew/README +++ /dev/null @@ -1,41 +0,0 @@ -Mibew Messenger -Copyright 2005-2013 the original author or authors. - -REQUIREMENTS - - * Apache web server 1.3.34 or above - * MySQL database 5.0 or above - * PHP 4.x or above with MySQL support - -INSTALLATION - -1. Create folder with name 'mibew' in the root of your website. -2. Upload all the files contained in this archive (retaining the directory structure) into created folder. - Be sure to chromo the mibew folder to 755 and the install folder to 644. -3. Add a MySQL database with the name 'mibew' -4. Edit /mibew/libs/config.php to the information needed to connect to the database -5. Using your web browser visit http:///mibew/install/ and - hit 'Create tables' -6. Remove /mibew/install/ directory from your server -7. Logon as - user: admin - password: -8. Get button code and setup it on your site. -9. Change your password and name. -10. Wait for your visitors on 'Pending users' page. - -On unix/linux platforms change the owner of /mibew/images/avatar folder -to the user, under which the web server is running (for instance, www). -The owner should have all rights on the folder /mibew/images/avatar -(chmod 700 /mibew/images/avatar). - -UPDATE - -1. Backup your /mibew/libs/config.php -2. Backup your /mibew/images/avatar folder. -3. Delete the items in the mibew folder on the server. -4. Upload all the files contained in the downloaded archive (retaining the directory structure) into mibew folder. -5. Re-edit the MySQL database settings you config.php -6. Visit http:///mibew/install/ and follow the instructions to update database (if needed). -7. Remove /mibew/install/ directory from your server -8. Restore contents of /mibew/images/avatar folder. \ No newline at end of file diff --git a/src/messenger/mibew/VERSION b/src/messenger/mibew/VERSION deleted file mode 100644 index 10a9279e..00000000 --- a/src/messenger/mibew/VERSION +++ /dev/null @@ -1 +0,0 @@ -Mibew/1.6.5 \ No newline at end of file diff --git a/src/messenger/mibew/b.php b/src/messenger/mibew/b.php deleted file mode 100644 index 36cdd818..00000000 --- a/src/messenger/mibew/b.php +++ /dev/null @@ -1,70 +0,0 @@ -state != Thread::STATE_CLOSED) { - $msg = getstring2_("chat.client.visited.page", array($referer), $thread->locale); - $thread->postMessage(Thread::KIND_FOR_AGENT, $msg); - } -} - -$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew"); -$lang = verifyparam(isset($_GET['language']) ? "language" : "lang", "/^[\w-]{2,5}$/", ""); -if(!$lang || !locale_exists($lang)) { - $lang = $current_locale; -} - -$groupid = verifyparam( "group", "/^\d{1,8}$/", ""); -if($groupid) { - if(Settings::get('enablegroups') == '1') { - $group = group_by_id($groupid); - if(!$group) { - $groupid = ""; - } - } else { - $groupid = ""; - } -} - -$image_postfix = has_online_operators($groupid) ? "on" : "off"; -$filename = "locales/${lang}/button/${image}_${image_postfix}.gif"; - -$fp = fopen($filename, 'rb') or die("no image"); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Pragma: no-cache"); -header("Content-Type: image/gif"); -header("Content-Length: ".filesize($filename)); -if(function_exists('fpassthru')){ - @fpassthru($fp); -} else { - while( (!feof($fp)) && (connection_status()==0)){ - print(fread($fp, 1024*8)); - flush(); - } - fclose($fp); -} -exit; -?> \ No newline at end of file diff --git a/src/messenger/mibew/button.php b/src/messenger/mibew/button.php deleted file mode 100644 index 83e4ab4d..00000000 --- a/src/messenger/mibew/button.php +++ /dev/null @@ -1,20 +0,0 @@ - \ No newline at end of file diff --git a/src/messenger/mibew/captcha.php b/src/messenger/mibew/captcha.php deleted file mode 100644 index 5daf3890..00000000 --- a/src/messenger/mibew/captcha.php +++ /dev/null @@ -1,26 +0,0 @@ - \ No newline at end of file diff --git a/src/messenger/mibew/client.php b/src/messenger/mibew/client.php deleted file mode 100644 index c632c247..00000000 --- a/src/messenger/mibew/client.php +++ /dev/null @@ -1,195 +0,0 @@ -id; - $token = $thread->lastToken; - $chatstyle = verifyparam( "style", "/^\w+$/", ""); - header("Location: $mibewroot/client.php?thread=$threadid&token=$token".($chatstyle ? "&style=$chatstyle" : "")); - exit; -} - -$token = verifyparam( "token", "/^\d{1,8}$/"); -$threadid = verifyparam( "thread", "/^\d{1,8}$/"); - -$thread = Thread::load($threadid, $token); -if (! $thread) { - die("wrong thread"); -} - -$page = setup_chatview_for_user($thread); - -$pparam = verifyparam( "act", "/^(mailthread)$/", "default"); -if( $pparam == "mailthread" ) { - expand("styles/dialogs", getchatstyle(), "mail.tpl"); -} else { - // Build js application options - $page['chatOptions'] = json_encode($page['chat']); - // Expand page - expand("styles/dialogs", getchatstyle(), "chat.tpl"); -} - -?> \ No newline at end of file diff --git a/src/messenger/mibew/cron.php b/src/messenger/mibew/cron.php deleted file mode 100644 index b8385dc1..00000000 --- a/src/messenger/mibew/cron.php +++ /dev/null @@ -1,55 +0,0 @@ -triggerEvent('cronRun'); - -// Update time of last cron run -Settings::set('_last_cron_run', time()); -Settings::update(); - -if (! $quiet) { - // TODO: May be localize it - echo('All cron jobs done.'); -} - -?> \ No newline at end of file diff --git a/src/messenger/mibew/default.css b/src/messenger/mibew/default.css deleted file mode 100644 index c1d5b5ea..00000000 --- a/src/messenger/mibew/default.css +++ /dev/null @@ -1,989 +0,0 @@ -/* - * Copyright 2005-2013 Evgeny Gryaznov - * Copyright 2013 Simushev Dmitriy - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* reset all */ - -html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td { margin: 0; padding: 0; } -table { border-collapse:collapse; border-spacing:0; } -fieldset,img { border:0; } -ol,ul { list-style:none; } -h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; } -q:before,q:after { content:''; } - -body { - background: #FFFFFF url(images/header.gif) repeat-x; - font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; - font-size: 0.8em; - line-height: 140%; - color: #333333; -} - -/* 100% height with footer, 200 px sidebar */ - -html, body { - height: 100%; -} - -body { - min-width: 750px; -} - -a { - color: #2f7599; -} - -#wrap400, #wrap700, #fixedwrap { - position:relative; - margin: 0px auto -41px; - height:auto !important; - height:100%; - min-height:100%; -} - -#wrap400 { - width: 100%; - min-width:450px; -} - -#wrap700 { - width: 100%; - min-width:750px; -} - -#fixedwrap { - width: 750px; -} - -.contentdiv { - float:left; - width: 100%; -} - -.contentinner { - margin-right: 210px; - padding: 10px 60px 10px 20px; - overflow: hidden; -} - -.contentnomenu { - padding: 10px 60px 10px 20px; -} - -.empty_inner { - height:40px; -} - -.inline-block { - display: inline-block; -} - -#footer { - background: white url(images/footer.gif) bottom repeat-x; - font-size:11px; - position:relative; - - min-height: 40px; - height:40px; - vertical-align:middle; - - width:100%; - text-align: center; -} - -#legal { - clear: both; - line-height: 30px; - padding-top:10px; - text-align: center; - color: #375C69; - margin-bottom: 0px; -} - -#footer .flink { - color: #2f7599; - text-decoration: underline; -} - -#togglediv { - float:right; - padding-right:10px; -} - -/* Header */ - -#header { - width: 100%; - height: 32px; - margin: 0px -2px 10px 0px; - padding-top: 10px; - padding-bottom: 5px; - background: url(images/graydot.gif) repeat-x left bottom; - display: block; -} - -#header { - float: left; -} - -img.left { - float: left; - margin-right: 15px; -} - -#header h1 { - font-size: 2em; - line-height: 32px; - color: #494949; - margin-left: 40px; -} - -#header h1 a { - color: #494949; -} - -#header a { - text-decoration: none; -} - -#title { - float: left; - display: inline; -} - -#path { - float: right; - padding: 10px 20px 0px 0px; - line-height: 22px; - display: inline; -} - -/* Sidebar */ - -#sidebar { - float: left; - width: 185px; - margin-left: -210px; - margin-top: 20px; - position:relative; - line-height: 180% -} - -#sidebar ul { - margin: 0; - padding: 0; - list-style: none; -} - -#sidebar li { - margin-bottom: 20px; -} - -#sidebar li ul { -} - -#sidebar li li { - margin: 0; -} - -#sidebar h2 { - text-transform: lowercase; - margin-bottom: 10px; - background: url(images/graydot.gif) repeat-x left bottom; - font-size: 1.3em; - font-weight: bold; -} - -.locales a { - color: #2f7599; - font-size: 1em; - text-decoration: none; -} - -.locales .active a { - color: #555; -} - -.locales a:hover { - text-decoration: underline; -} - -.submenu a { - padding-left: 15px; - color: #2f7599; - font-size: 1em; - text-decoration: none; -} - -.submenu a.inner { padding-left: 0px; } -.submenu span.small { font-size: 80%; padding-left: 5px; } - -.submenu .active a { - background: url(images/li.gif) no-repeat left 1px; - color: #555; -} - -.submenu .active a.inner { - background: none; -} - -.submenu a:hover { - text-decoration: underline; -} - -/* form, tabbed form */ - -.mform { - background: url(images/loginbg.gif); - clear: both; - width: 100%; -} - -.tabs { - float: right; - display: inline; - margin-right: 15px; -} - -.tabs li { - display: inline; -} - -.tabs a { - display: block; - float: left; - padding: 2px 9px 3px 9px; - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #2f7599; -} - -.tabs li.active a { - background: url(images/loginbg.gif); - border-left:1px solid #bbbbbb;border-top:1px solid #bbbbbb;border-right:1px solid #bbbbbb; - color: #000; - text-decoration: none; -} - -.formtop, .formbottom, .formtopi, .formbottomi { height: 15px;} -.formtop { background: url(images/logincrnrt.gif) no-repeat top right;} -.formtopi { background: url(images/logincrnlt.gif) no-repeat top left; } -.formbottom { background: url(images/logincrnrb.gif) no-repeat bottom right; } -.formbottomi { background: url(images/logincrnlb.gif) no-repeat bottom left; } -.forminner { margin: 0px 15px;} -.forminner p { margin-bottom: 1em; } - -/* fieldForm */ - -.fieldForm { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - width: 100%; -} - -.packedFormField { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - float:left; - margin-right:25px; - margin-bottom:8px; -} - -div.errinfo { - color: #c13030; -} - -.field { - width: 100%; - margin-top: 5px; -} - -.fheader { - margin: 8px auto 8px; -} - -.flabel { - position: relative; - margin: 8px auto 2px; - color: black; -} - -.fleftlabel { - float: left; - width: 11em; -} - -.flabel span.required { - font-size:8.0pt; - color:red; - font-weight: bold; -} - -.field .subfield { - padding-left: 30px; - background: url(images/subitem.gif) no-repeat 10px 2px; -} - -.forminner .level0{ -} - -.forminner .level1{ - padding-left: 20px; -} - -.fieldinrow { - min-width: 300px; - display: inline; - float:left; - width: 45%; -} - -.fvalue { - float: left; -} - -.fvaluewithta { - float: left; - width: 67%; -} - -.fvaluewithta textarea { - width: 100%; -} - -.fvaluenodesc { -} - -.fvalueframe { - overflow: auto; - width: 100%; -} - -.fvalueframe iframe { - border: solid 1px #999; -} - -.fdescr { - float:left; - padding-left:10px; - color: #676767; - font-size: 10px; - min-width: 200px; -} - -.fbutton { - background: url(images/formline.gif) repeat-x; - margin-top: 20px; - padding-top: 10px; -} - -.fbutton .links { - float: right; - margin-top: 5px; -} - -.fbutton .submitbutton { - float: left; -} - -.formauth { -} - -textarea.wide { - border:1px solid #878787; - overflow:auto; - width: 95%; -} - -input.wide { - border: 1px solid #878787; - color: #333; - line-height: normal; - width: 95%; -} - -input.formauth { - border: 1px solid #878787; - color: #333; - margin-right:15px; - padding-right: 0px; -} - -#formmessage { - border: 1px solid #4C96D4; - background-color: #E7F1F9; - padding: 8px 11px; - font-size: 0.85em; - font-weight:bold; - max-width: 700px; - margin: -10px 2px 10px; - color: #515151; -} - -#offwarn { - border: 1px solid #4CD496; - background-color: #E7F9F1; - color: #515151; - padding: 8px 11px; - font-size: 0.85em; - font-weight:bold; - line-height: 140%; - margin: 0px; -} - -#offwarn img { - margin-top: .4em; - float: left; - padding-right: 10px; -} - -.asterisk { - padding: 10px 20px; -} - -/* tables */ - -.tabletool { - float: right; -} - -.tabletool a { - color: #296685; - vertical-align: top; - padding-left: 4px; -} - -.tabletitle { - background: url(images/graydot.gif) repeat-x left bottom; - font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; - font-size: 1.4em; - margin: 10px 0px 20px; - padding-bottom: 10px; - color: #1D485E; - font-weight: bold; -} - -table.list, table.translate, table.statistics { - font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; - background: #fff; - width: 100%; - border-collapse: collapse; - text-align: left; -} - -table.list th, table.translate th, table.statistics th { - font-size: 1em; - font-weight: normal; - padding: 10px 6px; - border-bottom: 2px solid #2F7598; -} - -table.list th, table.translate th { color: #1D485E; } -table.statistics th { color: #2F7598; } - -table.list td, table.statistics td { - color: #2f7599; - padding: 10px 8px; - border-bottom: 1px solid #ccc; -} - -table.translate td { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #515151; - padding: 2px 8px; - border-bottom: 1px solid #ccc; -} - -table.list td a.man { - background: url(images/tbliclogin.gif) no-repeat left center; - padding-left: 15px; -} - -table.list tbody tr:hover td, table.list tbody tr:hover td a, table.statistics tbody tr:hover td { - color: #1D485E; -} - -table.list td.level0{ -} - -table.list td.level1{ - padding-left: 20px; -} - -/* awaiting */ - -table.awaiting { - font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; - background: #fff; - width: 100%; - border-collapse: collapse; - text-align: left; -} - -table.awaiting th { - font-size: 1.2em; - font-weight: normal; - color: #1D485E; - padding: 10px 8px; - border-bottom: 2px solid #2F7598; - text-align: center; -} - -table.awaiting th.first { - text-align: left; -} - -table.awaiting table.inner { - border: none; - width: 100%; -} - -table.awaiting table.inner .icon { - width: 30px; - text-align: center; -} - -table.awaiting td.visitor { - color: #296685; - border-bottom: 1px solid #ccc; - padding: 10px 8px; - margin: 0px; - text-align: center; -} -table.awaiting .no-threads, table.awaiting .no-visitors { - height: 30px; -} -.awaiting .visitor a { color: #296685; } -.awaiting tr:hover .visitor, .awaiting tr:hover .visitor a { color: #1D485E; } - -.awaiting tr.ban .visitor, .awaiting tr.ban .visitor a { color: #9AC8E0; } -.awaiting tr.ban:hover .visitor, .awaiting tr.ban:hover .visitor a { color: #4C9CC8; } - -.awaiting tr.inwait .visitor, .awaiting tr.inwait a { font-weight: bold; } -.awaiting tr.inprio .visitor, .awaiting tr.inprio a { font-weight: bold; font-size: 1.05em; } -.awaiting tr.inchat .visitor, .awaiting tr.inchat .visitor a { color: #777; } -.awaiting tr.inchat:hover .visitor, .awaiting tr.inchat:hover .visitor a { color: #444; } -.awaiting tr.inchat a { text-decoration: none; } - -.first-message { - text-align: right; - font-size: 0.8em; - padding-right: 10px; -} - -.first-message a { - text-decoration: none; -} - -.first-message a:hover { - text-decoration: underline; -} - -#status-panel-region { - margin: 10px; -} - -#connstatus { - float:right; -} - -#connlinks a { - color: #777; - text-decoration: none; -} - -#connlinks a:hover { - text-decoration: underline; -} - -.default-thread-controls { - width: 100px; -} - -.default-visitor-controls { - width: 20px; -} - -.default-thread-controls .control, -.default-visitor-controls .control { - height: 15px; - width: 15px; - margin: 0 2px; - border: none; - cursor: pointer; -} - -.open-control { - background: no-repeat top left url('images/tbliclspeak.gif'); -} - -.view-control { - background: no-repeat top left url('images/tbliclread.gif'); -} - -.track-control { - background: no-repeat top left url('images/tblictrack.gif'); -} - -.ban-control { - background: no-repeat top left url('images/ban.gif'); -} - -#sound-region { - display: none; -} - -/* online operators */ - -#agents-region { - padding-right: 10px; - float: right; -} -.agent-status-away, .agent-status-online { - display: inline-block; - height: 12px; - width: 12px; - border: none; - background-repeat: no-repeat; - margin-left: 5px; - margin-right: 2px; -} -.agent-status-away { - background-image: url("images/opaway.gif"); -} -.agent-status-online { - background-image: url("images/oponline.gif"); -} - -/* search */ - -#searchtext { - float:left; - display: inline; - margin:7px 20px 5px 0px; - width:60%; - padding-right:5px; -} - -.searchctrl { - float: left; - margin:7px 20px 5px 0px; - padding-right:5px; - display: inline; -} - -#searchtext input { - width: 100%; - margin: 0px; -} - -#searchbutton { - float:left; -} - -/* login */ - -#loginsmallpane { - float: right; - padding: 10px 15px 0px 0px; - margin-right: 0px; - line-height: 22px; - display: inline; -} - -#loginsmallpane input { - margin: 0px 3px; - padding: 0px 2px; -} - -#loginsmallpane .butt { - height: 1.3em; - border: 0px; - background: none; -} - -#loginsmallpane .butt:hover { - background: #aaa; -} - -#loginintro { - width: 400px; - margin: 10px 30px; -} - -#loginpane { - width: 400px; - margin: 30px 30px; -} - -#loginpane .header h2 { - font-size: 2em; - margin-bottom: 0.9em; - padding-bottom: 0.8em; - border-bottom: 2px solid #2F7598; -} - -/* nice button */ - -#confirmpane { - width:450px; - margin:0px auto 5px; - padding-top: 70px; -} - -.nicebutton { - border: none; - float: left; - margin-left: 30px; -} - -.submit a { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - line-height: 35px; - color: #000000; - text-decoration: none; -} - -.submit { - background: url(images/submitbg.gif) repeat-x; - vertical-align: top; -} - - -/* thread log */ - -.logpane { - margin: 10px 0px; - line-height: 150%; -} - -.logpane .header { - padding-bottom: 0.8em; - border-bottom: 2px solid #2F7598; -} - -.logpane .wlabel { - width: 10em; - float: left; - margin-right:10px; -} - -.logpane .wvalue { - float: left; -} - -/* dashboard */ - -#dashboard { - width: 100%; -} - -.dashitem { - width:33%; - margin: 0px 2em 5em 0px; - padding: 5px 2em 5em; - vertical-align: top; -} - -.dashitem:hover { -} - -.dashitem a { - padding-top:2px; - padding-bottom: 10px; - display: block; -} - -.dashitem img, #dashlocalesPopup h2 img { - float: left; - padding-right:10px; -} - -#dashlocalesPopup h2 img { - margin-top: -3px; -} - -#dashlocalesPopup .locales { - line-height: 180%; - margin-left:10px; -} - -#dashlocalesPopup h2 { - font-size: 1.5em; - margin-bottom: 0.9em; - padding: 5px 30px 0.8em 0px; - border-bottom: 2px solid #2F7598; -} - -#dashlocalesPopupClose { - float: right; - position:absolute; - right:5px; - top:5px; -} - -#dashlocalesPopup { - display:none; - position:fixed; - _position:absolute; /* ie6*/ - background:#FFFFFF; - border:2px solid #2F7598; - z-index:110; - padding:1em 1em; - font-size:1em; -} - -#backgroundPopup{ - display:none; - position:fixed; - _position:absolute; /* ie6*/ - height:100%; - opacity: .5; - width:100%; - top:0; - left:0; - background:#000000; - border:1px solid #cecece; - z-index:101; -} - -/* install */ - -#install li { - list-style-type: circle; - list-style-position: inside; - margin-left: 2em; -} - -#check-nv, #check-nm { - color: #2f7599; - text-decoration: none; -} - -#check-nv:hover, #check-nm:hover { - text-decoration: underline; -} - - -/* chat */ - -.message { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #4F4F4F; - padding: 15px 0px 0px 0px; - line-height: 17px; -} - -.message span.time { - color: #000000; -} - -.message span.nuser { - color: #B11E23; - font-weight: bold; -} - -.message span.nagent { - font-weight: bold; -} - -.message span.minf { - color: #1E48B1; - font-size: 11px; -} - -.message span.mevent { - color: #A1A1A1; - font-size: 11px; -} - -.message span.mhidden { - color: #A1A1A1; - font-size: 11px; -} - -.message span.mconn { - color: #A1A1A1; - font-size: 11px; -} - -/* themes */ -.screenshot { - border: solid 1px #BBBBBB; -} - -/* updates */ - -#news { - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 11px; - margin-bottom:15px; - padding:4px; -} - -.newstext { - margin-bottom:1em; -} - -/* rtl rules */ - -.lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img { - float: right; - padding-right:0px; - padding-left:10px; -} - -.lrtl .fleftlabel { - float: right; - width: 11em; -} - -.lrtl .fdescr { - float:right; - padding-right:10px; -} - - -.lrtl .field .subfield { - padding-right: 30px; - background: url(images/subitem_rtl.gif) no-repeat 99% 2px; -} - - -.lrtl .fvalue { - float: right; -} - -.lrtl .logpane .wlabel { - float: right; - margin-left:10px; -} - -.lrtl .logpane .wvalue { - float: right; -} - -.lrtl .fvaluewithta { - float: right; -} - -.lrtl #togglediv { - float:left; - padding-left:10px; -} diff --git a/src/messenger/mibew/default_ie.css b/src/messenger/mibew/default_ie.css deleted file mode 100644 index 2f6377c0..00000000 --- a/src/messenger/mibew/default_ie.css +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2005-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -.inline-block { - display: inline; - zoom: 1; -} diff --git a/src/messenger/mibew/images/avatar/.keep b/src/messenger/mibew/images/avatar/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/messenger/mibew/images/ban.gif b/src/messenger/mibew/images/ban.gif deleted file mode 100644 index d11165bf..00000000 Binary files a/src/messenger/mibew/images/ban.gif and /dev/null differ diff --git a/src/messenger/mibew/images/blank.html b/src/messenger/mibew/images/blank.html deleted file mode 100644 index 62eedaaf..00000000 --- a/src/messenger/mibew/images/blank.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/messenger/mibew/images/buttons/createagent.gif b/src/messenger/mibew/images/buttons/createagent.gif deleted file mode 100644 index 9d9bd88e..00000000 Binary files a/src/messenger/mibew/images/buttons/createagent.gif and /dev/null differ diff --git a/src/messenger/mibew/images/buttons/createban.gif b/src/messenger/mibew/images/buttons/createban.gif deleted file mode 100644 index 540e33c0..00000000 Binary files a/src/messenger/mibew/images/buttons/createban.gif and /dev/null differ diff --git a/src/messenger/mibew/images/buttons/createdep.gif b/src/messenger/mibew/images/buttons/createdep.gif deleted file mode 100644 index 138e2000..00000000 Binary files a/src/messenger/mibew/images/buttons/createdep.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/blocked.gif b/src/messenger/mibew/images/dash/blocked.gif deleted file mode 100644 index 4fc2d1df..00000000 Binary files a/src/messenger/mibew/images/dash/blocked.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/canned.gif b/src/messenger/mibew/images/dash/canned.gif deleted file mode 100644 index 0a50ded4..00000000 Binary files a/src/messenger/mibew/images/dash/canned.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/close.gif b/src/messenger/mibew/images/dash/close.gif deleted file mode 100644 index 177a9092..00000000 Binary files a/src/messenger/mibew/images/dash/close.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/dep.gif b/src/messenger/mibew/images/dash/dep.gif deleted file mode 100644 index d43fe879..00000000 Binary files a/src/messenger/mibew/images/dash/dep.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/exit.gif b/src/messenger/mibew/images/dash/exit.gif deleted file mode 100644 index 7f8fc0e6..00000000 Binary files a/src/messenger/mibew/images/dash/exit.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/getcode.gif b/src/messenger/mibew/images/dash/getcode.gif deleted file mode 100644 index 877dcc8a..00000000 Binary files a/src/messenger/mibew/images/dash/getcode.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/history.gif b/src/messenger/mibew/images/dash/history.gif deleted file mode 100644 index 675d7497..00000000 Binary files a/src/messenger/mibew/images/dash/history.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/locale.gif b/src/messenger/mibew/images/dash/locale.gif deleted file mode 100644 index b9c768c3..00000000 Binary files a/src/messenger/mibew/images/dash/locale.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/operators.gif b/src/messenger/mibew/images/dash/operators.gif deleted file mode 100644 index 50d2d567..00000000 Binary files a/src/messenger/mibew/images/dash/operators.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/profile.gif b/src/messenger/mibew/images/dash/profile.gif deleted file mode 100644 index 8f9bf9b5..00000000 Binary files a/src/messenger/mibew/images/dash/profile.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/readme.txt b/src/messenger/mibew/images/dash/readme.txt deleted file mode 100644 index 165a5a1f..00000000 --- a/src/messenger/mibew/images/dash/readme.txt +++ /dev/null @@ -1,19 +0,0 @@ -"34aL volume 3.1" icons set - -Ammount of icons: -60 - -Colors: -Colored, grey - -Icon Sizes: -24x24 - -File Types: -.ico (RGBA, 256 color, 16 color), -.tiff (RGBA) -.gif (indexed) -.bmp (RGB - 1 color background), -.png (RGBA) - -Note: These icons are free for use. \ No newline at end of file diff --git a/src/messenger/mibew/images/dash/settings.gif b/src/messenger/mibew/images/dash/settings.gif deleted file mode 100644 index 2401ab76..00000000 Binary files a/src/messenger/mibew/images/dash/settings.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/stat.gif b/src/messenger/mibew/images/dash/stat.gif deleted file mode 100644 index 9594d59b..00000000 Binary files a/src/messenger/mibew/images/dash/stat.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/updates.gif b/src/messenger/mibew/images/dash/updates.gif deleted file mode 100644 index 42bdb915..00000000 Binary files a/src/messenger/mibew/images/dash/updates.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/visitors.gif b/src/messenger/mibew/images/dash/visitors.gif deleted file mode 100644 index e6e56b1f..00000000 Binary files a/src/messenger/mibew/images/dash/visitors.gif and /dev/null differ diff --git a/src/messenger/mibew/images/dash/warn.gif b/src/messenger/mibew/images/dash/warn.gif deleted file mode 100644 index a775a52d..00000000 Binary files a/src/messenger/mibew/images/dash/warn.gif and /dev/null differ diff --git a/src/messenger/mibew/images/favicon.ico b/src/messenger/mibew/images/favicon.ico deleted file mode 100644 index ca59e49c..00000000 Binary files a/src/messenger/mibew/images/favicon.ico and /dev/null differ diff --git a/src/messenger/mibew/images/footer.gif b/src/messenger/mibew/images/footer.gif deleted file mode 100644 index ba2b1a33..00000000 Binary files a/src/messenger/mibew/images/footer.gif and /dev/null differ diff --git a/src/messenger/mibew/images/formline.gif b/src/messenger/mibew/images/formline.gif deleted file mode 100644 index 4c0d1554..00000000 Binary files a/src/messenger/mibew/images/formline.gif and /dev/null differ diff --git a/src/messenger/mibew/images/free.gif b/src/messenger/mibew/images/free.gif deleted file mode 100644 index 1fb63de6..00000000 Binary files a/src/messenger/mibew/images/free.gif and /dev/null differ diff --git a/src/messenger/mibew/images/graydot.gif b/src/messenger/mibew/images/graydot.gif deleted file mode 100644 index 51c0ef82..00000000 Binary files a/src/messenger/mibew/images/graydot.gif and /dev/null differ diff --git a/src/messenger/mibew/images/header.gif b/src/messenger/mibew/images/header.gif deleted file mode 100644 index 43c4bfe5..00000000 Binary files a/src/messenger/mibew/images/header.gif and /dev/null differ diff --git a/src/messenger/mibew/images/icon_err.gif b/src/messenger/mibew/images/icon_err.gif deleted file mode 100644 index 6d7791de..00000000 Binary files a/src/messenger/mibew/images/icon_err.gif and /dev/null differ diff --git a/src/messenger/mibew/images/li.gif b/src/messenger/mibew/images/li.gif deleted file mode 100644 index 29e03266..00000000 Binary files a/src/messenger/mibew/images/li.gif and /dev/null differ diff --git a/src/messenger/mibew/images/lidiv.gif b/src/messenger/mibew/images/lidiv.gif deleted file mode 100644 index 83cabba5..00000000 Binary files a/src/messenger/mibew/images/lidiv.gif and /dev/null differ diff --git a/src/messenger/mibew/images/loginbg.gif b/src/messenger/mibew/images/loginbg.gif deleted file mode 100644 index fbf2f932..00000000 Binary files a/src/messenger/mibew/images/loginbg.gif and /dev/null differ diff --git a/src/messenger/mibew/images/logincrnlb.gif b/src/messenger/mibew/images/logincrnlb.gif deleted file mode 100644 index 584fa6fe..00000000 Binary files a/src/messenger/mibew/images/logincrnlb.gif and /dev/null differ diff --git a/src/messenger/mibew/images/logincrnlt.gif b/src/messenger/mibew/images/logincrnlt.gif deleted file mode 100644 index afe30460..00000000 Binary files a/src/messenger/mibew/images/logincrnlt.gif and /dev/null differ diff --git a/src/messenger/mibew/images/logincrnrb.gif b/src/messenger/mibew/images/logincrnrb.gif deleted file mode 100644 index 39f82e8b..00000000 Binary files a/src/messenger/mibew/images/logincrnrb.gif and /dev/null differ diff --git a/src/messenger/mibew/images/logincrnrt.gif b/src/messenger/mibew/images/logincrnrt.gif deleted file mode 100644 index 2406eb6d..00000000 Binary files a/src/messenger/mibew/images/logincrnrt.gif and /dev/null differ diff --git a/src/messenger/mibew/images/logo.gif b/src/messenger/mibew/images/logo.gif deleted file mode 100644 index 315d547a..00000000 Binary files a/src/messenger/mibew/images/logo.gif and /dev/null differ diff --git a/src/messenger/mibew/images/mibewlogo.gif b/src/messenger/mibew/images/mibewlogo.gif deleted file mode 100644 index edd7d31b..00000000 Binary files a/src/messenger/mibew/images/mibewlogo.gif and /dev/null differ diff --git a/src/messenger/mibew/images/nextpage.gif b/src/messenger/mibew/images/nextpage.gif deleted file mode 100644 index 8da5c630..00000000 Binary files a/src/messenger/mibew/images/nextpage.gif and /dev/null differ diff --git a/src/messenger/mibew/images/opaway.gif b/src/messenger/mibew/images/opaway.gif deleted file mode 100644 index e45ad55d..00000000 Binary files a/src/messenger/mibew/images/opaway.gif and /dev/null differ diff --git a/src/messenger/mibew/images/oponline.gif b/src/messenger/mibew/images/oponline.gif deleted file mode 100644 index d91cc875..00000000 Binary files a/src/messenger/mibew/images/oponline.gif and /dev/null differ diff --git a/src/messenger/mibew/images/prevpage.gif b/src/messenger/mibew/images/prevpage.gif deleted file mode 100644 index e5479366..00000000 Binary files a/src/messenger/mibew/images/prevpage.gif and /dev/null differ diff --git a/src/messenger/mibew/images/subitem.gif b/src/messenger/mibew/images/subitem.gif deleted file mode 100644 index 5c77ad12..00000000 Binary files a/src/messenger/mibew/images/subitem.gif and /dev/null differ diff --git a/src/messenger/mibew/images/subitem_rtl.gif b/src/messenger/mibew/images/subitem_rtl.gif deleted file mode 100644 index 11d36ac1..00000000 Binary files a/src/messenger/mibew/images/subitem_rtl.gif and /dev/null differ diff --git a/src/messenger/mibew/images/submit.gif b/src/messenger/mibew/images/submit.gif deleted file mode 100644 index 07b59ae0..00000000 Binary files a/src/messenger/mibew/images/submit.gif and /dev/null differ diff --git a/src/messenger/mibew/images/submitbg.gif b/src/messenger/mibew/images/submitbg.gif deleted file mode 100644 index 2fa3527a..00000000 Binary files a/src/messenger/mibew/images/submitbg.gif and /dev/null differ diff --git a/src/messenger/mibew/images/submitrest.gif b/src/messenger/mibew/images/submitrest.gif deleted file mode 100644 index aa56788a..00000000 Binary files a/src/messenger/mibew/images/submitrest.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tablediv3.gif b/src/messenger/mibew/images/tablediv3.gif deleted file mode 100644 index 246607e3..00000000 Binary files a/src/messenger/mibew/images/tablediv3.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tbliclogin.gif b/src/messenger/mibew/images/tbliclogin.gif deleted file mode 100644 index bfd9f7ea..00000000 Binary files a/src/messenger/mibew/images/tbliclogin.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tbliclread.gif b/src/messenger/mibew/images/tbliclread.gif deleted file mode 100644 index 87a69519..00000000 Binary files a/src/messenger/mibew/images/tbliclread.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tbliclspeak.gif b/src/messenger/mibew/images/tbliclspeak.gif deleted file mode 100644 index 1c5636aa..00000000 Binary files a/src/messenger/mibew/images/tbliclspeak.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tblictrack.gif b/src/messenger/mibew/images/tblictrack.gif deleted file mode 100644 index c0bf7f1f..00000000 Binary files a/src/messenger/mibew/images/tblictrack.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tblicusers.gif b/src/messenger/mibew/images/tblicusers.gif deleted file mode 100644 index e6123274..00000000 Binary files a/src/messenger/mibew/images/tblicusers.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tblicusers2.gif b/src/messenger/mibew/images/tblicusers2.gif deleted file mode 100644 index 66649574..00000000 Binary files a/src/messenger/mibew/images/tblicusers2.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tblicusers3.gif b/src/messenger/mibew/images/tblicusers3.gif deleted file mode 100644 index f8eceb1b..00000000 Binary files a/src/messenger/mibew/images/tblicusers3.gif and /dev/null differ diff --git a/src/messenger/mibew/images/tbllabyel.gif b/src/messenger/mibew/images/tbllabyel.gif deleted file mode 100644 index 7fa88aab..00000000 Binary files a/src/messenger/mibew/images/tbllabyel.gif and /dev/null differ diff --git a/src/messenger/mibew/images/topdiv.gif b/src/messenger/mibew/images/topdiv.gif deleted file mode 100644 index 167fbda5..00000000 Binary files a/src/messenger/mibew/images/topdiv.gif and /dev/null differ diff --git a/src/messenger/mibew/index.php b/src/messenger/mibew/index.php deleted file mode 100644 index d50d3251..00000000 --- a/src/messenger/mibew/index.php +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file diff --git a/src/messenger/mibew/install/dbinfo.php b/src/messenger/mibew/install/dbinfo.php deleted file mode 100644 index 95aacb7c..00000000 --- a/src/messenger/mibew/install/dbinfo.php +++ /dev/null @@ -1,418 +0,0 @@ - array( - "groupid" => "int NOT NULL auto_increment PRIMARY KEY", - "parent" => "int DEFAULT NULL", - "vcemail" => "varchar(64)", - "vclocalname" => "varchar(64) NOT NULL", - "vccommonname" => "varchar(64) NOT NULL", - "vclocaldescription" => "varchar(1024) NOT NULL", - "vccommondescription" => "varchar(1024) NOT NULL", - "iweight" => "int NOT NULL DEFAULT 0", - "vctitle" => "varchar(255) DEFAULT ''", - "vcchattitle" => "varchar(255) DEFAULT ''", - "vclogo" => "varchar(255) DEFAULT ''", - "vchosturl" => "varchar(255) DEFAULT ''", - ), - - // Chat threads - "${mysqlprefix}chatthread" => array( - // ID of the thread. - "threadid" => "int NOT NULL auto_increment PRIMARY KEY", - // Name of the user in chat. - "userName" => "varchar(64) NOT NULL", - // ID of the user. This field is foreign key for - // {chatsitevisitor}.userid - "userid" => "varchar(255)", - // Name of the operator who took place in the chat. - "agentName" => "varchar(64)", - // ID of the operator who took place in the chat. - "agentId" => "int NOT NULL DEFAULT 0", - // Unix timestamp of the moment when the thread was created. - "dtmcreated" => "int NOT NULL DEFAULT 0", - // Unix timestamp of the moment when chat actually started. - "dtmchatstarted" => "int NOT NULL DEFAULT 0", - // Unix timestamp of the last thread modification. - "dtmmodified" => "int NOT NULL DEFAULT 0", - // Unix timestamp of the moment when the thread was closed. - "dtmclosed" => "int NOT NULL DEFAULT 0", - // ID of the last thread revision. - "lrevision" => "int NOT NULL DEFAULT 0", - // State of the thread. It is one of Thread::STATE_* constants. - "istate" => "int NOT NULL DEFAULT 0", - // State of invitation related with the thread. It is one of - // Thread::INVITATION_* constants. - "invitationstate" => "int NOT NULL DEFAULT 0", - // Last token of the thread. - "ltoken" => "int NOT NULL", - // IP address of the user. - "remote" => "varchar(255)", - // Page from which chat thread was started. - "referer" => "text", - // ID of the operator who will next in the chat. - "nextagent" => "int NOT NULL DEFAULT 0", - // Code of chat locale. - "locale" => "varchar(8)", - // Unix timestamp of the last request from user's window to server. - "lastpinguser" => "int NOT NULL DEFAULT 0", - // Unix timestamp of the last request from operator's window to server. - "lastpingagent" => "int NOT NULL DEFAULT 0", - // Indicates if user typing or not. It can take two values 0 and 1. - "userTyping" => "int DEFAULT 0", - // Indicates if operator typing or not. It can take two values 0 and 1. - "agentTyping" => "int DEFAULT 0", - // ID of shown message in the chat. - "shownmessageid" => "int NOT NULL DEFAULT 0", - // User agent description that took from 'User-Agent' HTTP header. - "userAgent" => "varchar(255)", - // Total count of user's messages related with the thread. - "messageCount" => "varchar(16)", - // ID of the group at Mibew side related with the thread. - "groupid" => "int references ${mysqlprefix}chatgroup(groupid)", - ), - - "${mysqlprefix}chatthreadstatistics" => array( - "statid" => "int NOT NULL auto_increment PRIMARY KEY", - "date" => "int NOT NULL DEFAULT 0", - "threads" => "int NOT NULL DEFAULT 0", - "missedthreads" => "int NOT NULL DEFAULT 0", - "sentinvitations" => "int NOT NULL DEFAULT 0", - "acceptedinvitations" => "int NOT NULL DEFAULT 0", - "rejectedinvitations" => "int NOT NULL DEFAULT 0", - "ignoredinvitations" => "int NOT NULL DEFAULT 0", - "operatormessages" => "int NOT NULL DEFAULT 0", - "usermessages" => "int NOT NULL DEFAULT 0", - "averagewaitingtime" => "FLOAT(10, 1) NOT NULL DEFAULT 0", - "averagechattime" => "FLOAT(10, 1) NOT NULL DEFAULT 0" - ), - - "${mysqlprefix}requestbuffer" => array( - "requestid" => "int NOT NULL auto_increment PRIMARY KEY", - // Use MD5 hashes as keys - "requestkey" => "char(32) NOT NULL", - "request" => "text NOT NULL" - ), - - "${mysqlprefix}requestcallback" => array( - "callbackid" => "int NOT NULL auto_increment PRIMARY KEY", - "token" => "varchar(64) NOT NULL DEFAULT ''", - "function" => "varchar(64) NOT NULL", - "arguments" => "varchar(1024)" - ), - - // Store chat thread messages - "${mysqlprefix}chatmessage" => array( - // Message ID. - "messageid" => "int NOT NULL auto_increment PRIMARY KEY", - // ID of the thread related with the message. - "threadid" => "int NOT NULL references ${mysqlprefix}chatthread(threadid)", - // Message kind. It is one of Thread::KIND_* constants. - "ikind" => "int NOT NULL", - // ID of operator who sent the message. This value will be ignored for - // system messages and messages which sent by users. - "agentId" => "int NOT NULL DEFAULT 0", - // Message text body. - "tmessage" => "text NOT NULL", - // Name of the plugin which sent the message. If message was not sent by - // a plugin this field equals to an empty string. - "plugin" => "varchar(256) NOT NULL DEFAULT ''", - // Arbitrary serialized data related with message. - "data" => "text", - // Unix timestamp when message was created. - "dtmcreated" => "int NOT NULL DEFAULT 0", - // Name of the message sender. - "tname" => "varchar(64)" - ), - - "${mysqlprefix}chatoperator" => array( - "operatorid" => "int NOT NULL auto_increment PRIMARY KEY", - "vclogin" => "varchar(64) NOT NULL", - "vcpassword" => "varchar(64) NOT NULL", - "vclocalename" => "varchar(64) NOT NULL", - "vccommonname" => "varchar(64) NOT NULL", - "vcemail" => "varchar(64)", - "dtmlastvisited" => "int NOT NULL DEFAULT 0", - "istatus" => "int DEFAULT 0", /* 0 - online, 1 - away */ - "idisabled" => "int DEFAULT 0", - "vcavatar" => "varchar(255)", - "vcjabbername" => "varchar(255)", - "iperm" => "int DEFAULT 0", /* Do not grant all privileges by default */ - "dtmrestore" => "int NOT NULL DEFAULT 0", - "vcrestoretoken" => "varchar(64)", - // Use to start chat with specified operator - "code" => "varchar(64) DEFAULT ''" - ), - - "${mysqlprefix}chatoperatorstatistics" => array( - "statid" => "int NOT NULL auto_increment PRIMARY KEY", - "date" => "int NOT NULL DEFAULT 0", - "operatorid" => "int NOT NULL", - "threads" => "int NOT NULL DEFAULT 0", - "messages" => "int NOT NULL DEFAULT 0", - "averagelength" => "FLOAT(10, 1) NOT NULL DEFAULT 0", - "sentinvitations" => "int NOT NULL DEFAULT 0", - "acceptedinvitations" => "int NOT NULL DEFAULT 0", - "rejectedinvitations" => "int NOT NULL DEFAULT 0", - "ignoredinvitations" => "int NOT NULL DEFAULT 0" - ), - - "${mysqlprefix}chatrevision" => array( - "id" => "INT NOT NULL" - ), - - "${mysqlprefix}chatgroupoperator" => array( - "groupid" => "int NOT NULL references ${mysqlprefix}chatgroup(groupid)", - "operatorid" => "int NOT NULL references ${mysqlprefix}chatoperator(operatorid)", - ), - - "${mysqlprefix}chatban" => array( - "banid" => "INT NOT NULL auto_increment PRIMARY KEY", - "dtmcreated" => "int NOT NULL DEFAULT 0", - "dtmtill" => "int NOT NULL DEFAULT 0", - "address" => "varchar(255)", - "comment" => "varchar(255)", - "blockedCount" => "int DEFAULT 0" - ), - - "${mysqlprefix}chatconfig" => array( - "id" => "INT NOT NULL auto_increment PRIMARY KEY", - "vckey" => "varchar(255)", - "vcvalue" => "varchar(255)", - ), - - "${mysqlprefix}chatresponses" => array( - "id" => "INT NOT NULL auto_increment PRIMARY KEY", - "locale" => "varchar(8)", - "groupid" => "int references ${mysqlprefix}chatgroup(groupid)", - "vctitle" => "varchar(100) NOT NULL DEFAULT ''", - "vcvalue" => "varchar(1024) NOT NULL", - ), - - "${mysqlprefix}chatsitevisitor" => array( - "visitorid" => "INT NOT NULL auto_increment PRIMARY KEY", - "userid" => "varchar(255) NOT NULL", - "username" => "varchar(64)", - "firsttime" => "int NOT NULL DEFAULT 0", - "lasttime" => "int NOT NULL DEFAULT 0", - "entry" => "text NOT NULL", - "details" => "text NOT NULL", - "invitations" => "INT NOT NULL DEFAULT 0", - "chats" => "INT NOT NULL DEFAULT 0", - "threadid" => "INT references ${mysqlprefix}chatthread(threadid) on delete set null" - ), - - "${mysqlprefix}visitedpage" => array( - "pageid" => "INT NOT NULL auto_increment PRIMARY KEY", - "address" => "varchar(1024)", - "visittime" => "int NOT NULL DEFAULT 0", - "visitorid" => "INT", - // Indicates if path included in 'by page' statistics - "calculated" => "tinyint NOT NULL DEFAULT 0" - ), - - "${mysqlprefix}visitedpagestatistics" => array( - "pageid" => "INT NOT NULL auto_increment PRIMARY KEY", - "date" => "int NOT NULL DEFAULT 0", - "address" => "varchar(1024)", - "visits" => "int NOT NULL DEFAULT 0", - "chats" => "int NOT NULL DEFAULT 0", - "sentinvitations" => "int NOT NULL DEFAULT 0", - "acceptedinvitations" => "int NOT NULL DEFAULT 0", - "rejectedinvitations" => "int NOT NULL DEFAULT 0", - "ignoredinvitations" => "int NOT NULL DEFAULT 0" - ), -); - -$dbtables_indexes = array( - "${mysqlprefix}chatgroup" => array( - "parent" => "parent" - ), - "${mysqlprefix}chatoperatorstatistics" => array( - "operatorid" => "operatorid" - ), - "${mysqlprefix}chatgroupoperator" => array( - "groupid" => "groupid", - "operatorid" => "operatorid" - ), - "${mysqlprefix}requestbuffer" => array( - "requestkey" => "requestkey" - ), - "${mysqlprefix}chatmessage" => array( - "idx_agentid" => "agentid" - ), - "${mysqlprefix}chatsitevisitor" => array( - "threadid" => "threadid" - ), - "${mysqlprefix}requestcallback" => array( - "token" => "token" - ), - "${mysqlprefix}visitedpage" => array( - "visitorid" => "visitorid" - ) -); - -$memtables = array(); - -$dbtables_can_update = array( - "${mysqlprefix}chatthread" => array("agentId", "userTyping", "agentTyping", "messageCount", "nextagent", "shownmessageid", "userid", "userAgent", "groupid", "dtmchatstarted", "dtmclosed", "invitationstate"), - "${mysqlprefix}chatthreadstatistics" => array("missedthreads", "sentinvitations", "acceptedinvitations", "rejectedinvitations", "ignoredinvitations"), - "${mysqlprefix}requestbuffer" => array("requestid", "requestkey", "request"), - "${mysqlprefix}chatmessage" => array("agentId", "plugin", "data"), - "${mysqlprefix}chatoperator" => array("vcavatar", "vcjabbername", "iperm", "istatus", "idisabled", "vcemail", "dtmrestore", "vcrestoretoken", "code"), - "${mysqlprefix}chatoperatorstatistics" => array("sentinvitations", "acceptedinvitations", "rejectedinvitations", "ignoredinvitations"), - "${mysqlprefix}chatban" => array(), - "${mysqlprefix}chatgroup" => array("vcemail", "iweight", "parent", "vctitle", "vcchattitle", "vclogo", "vchosturl"), - "${mysqlprefix}chatgroupoperator" => array(), - "${mysqlprefix}chatresponses" => array("vctitle"), - "${mysqlprefix}chatsitevisitor" => array(), - "${mysqlprefix}requestcallback" => array("callbackid", "token", "function", "arguments"), - "${mysqlprefix}visitedpage" => array(), - "${mysqlprefix}visitedpagestatistics" => array("sentinvitations", "acceptedinvitations", "rejectedinvitations", "ignoredinvitations"), -); - -function show_install_err($text) -{ - global $page, $version, $errors, $mibewroot; - $page = array( - 'version' => $version, - 'localeLinks' => get_locale_links("$mibewroot/install/index.php") - ); - $errors = array($text); - start_html_output(); - require('../view/install_err.php'); - exit; -} - -function create_table($id, $link) -{ - global $dbtables, $dbtables_indexes, $memtables, $dbencoding, $mysqlprefix; - - if (!isset($dbtables[$id])) { - show_install_err("Unknown table: $id, " . mysql_error($link)); - } - - $query = - "CREATE TABLE $id\n" . - "(\n"; - foreach ($dbtables[$id] as $k => $v) { - $query .= " $k $v,\n"; - } - - if (isset($dbtables_indexes[$id])) { - foreach ($dbtables_indexes[$id] as $k => $v) { - $query .= " INDEX $k ($v),\n"; - } - } - - $query = preg_replace("/,\n$/", "", $query); - $query .= ") charset $dbencoding"; - if (in_array($id, $memtables)) { - $query .= " ENGINE=MEMORY"; - } else { - $query .= " ENGINE=InnoDb"; - } - - mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link)); - - if ($id == "${mysqlprefix}chatoperator") { - // Create First Administrator - // Grant all privileges by default only for First Administrator - mysql_query( - "INSERT INTO ${mysqlprefix}chatoperator ( " . - "vclogin, " . - "vcpassword, " . - "vclocalename, " . - "vccommonname, " . - "vcavatar, " . - "vcemail, " . - "iperm " . - ") values ( " . - "'admin', " . - "MD5(''), " . - "'', " . - "'Administrator', " . - "'Administrator', " . - "'', " . - "65535" . - ")", - $link - ); - } else if ($id == "${mysqlprefix}chatrevision") { - $result = mysql_query("INSERT INTO ${mysqlprefix}chatrevision VALUES (1)", $link); - if (! $result) { - die(' Query failed: ' . mysql_error($link)); - } - } -} - -function get_tables($link) -{ - global $mysqldb, $errors; - $result = mysql_query("SHOW TABLES FROM `$mysqldb`", $link); - if ($result) { - $arr = array(); - while ($row = mysql_fetch_array($result, MYSQL_NUM)) { - $arr[] = $row[0]; - } - mysql_free_result($result); - return $arr; - - } else { - $errors[] = "Cannot get tables from database. Error: " . mysql_error($link); - return false; - } -} - -function get_columns($tablename, $link) -{ - global $errors; - $result = mysql_query("SHOW COLUMNS FROM $tablename", $link); - if ($result) { - $arr = array(); - while ($row = mysql_fetch_array($result, MYSQL_NUM)) { - $arr[] = $row[0]; - } - mysql_free_result($result); - return $arr; - - } else { - $errors[] = "Cannot get columns from table \"$tablename\". Error: " . mysql_error($link); - return false; - } -} - -function get_indexes($tablename, $link) -{ - global $mysqldb, $errors; - $result = mysql_query("SELECT index_name FROM information_schema.statistics where table_schema = '$mysqldb' and table_name = '$tablename' and index_name != 'PRIMARY'", $link); - if ($result) { - $arr = array(); - while ($row = mysql_fetch_array($result, MYSQL_NUM)) { - $arr[] = $row[0]; - } - mysql_free_result($result); - return $arr; - - } else { - $errors[] = "Cannot get indexes for table \"$tablename\". Error: " . mysql_error($link); - return false; - } -} - -?> \ No newline at end of file diff --git a/src/messenger/mibew/install/dbperform.php b/src/messenger/mibew/install/dbperform.php deleted file mode 100644 index 9b120e21..00000000 --- a/src/messenger/mibew/install/dbperform.php +++ /dev/null @@ -1,322 +0,0 @@ - $columns) { - $curr_columns = get_columns($id, $link); - if ($curr_columns === false) { - show_install_err($errors[0]); - } - $tocreate = array_diff(array_keys($columns), $curr_columns); - foreach ($tocreate as $v) { - $absent_columns[] = "$id.$v"; - } - } - - if (in_array("${mysqlprefix}chatmessage.agentId", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD agentId int NOT NULL DEFAULT 0 AFTER ikind", $link); - runsql("update ${mysqlprefix}chatmessage, ${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND ikind = 2 AND (vclocalename = tname OR vccommonname = tname)", $link); - } - - if (in_array("${mysqlprefix}chatmessage.plugin", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD plugin varchar(256) NOT NULL DEFAULT '' AFTER tmessage", $link); - } - - if (in_array("${mysqlprefix}chatmessage.data", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD data text AFTER plugin", $link); - } - - if (in_array("${mysqlprefix}chatthread.agentId", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD agentId int NOT NULL DEFAULT 0 AFTER agentName", $link); - runsql("update ${mysqlprefix}chatthread, ${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND (vclocalename = agentName OR vccommonname = agentName)", $link); - } - - if (in_array("${mysqlprefix}chatthread.dtmchatstarted", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD dtmchatstarted int NOT NULL DEFAULT 0 AFTER dtmcreated", $link); - runsql("update ${mysqlprefix}chatthread set dtmchatstarted = dtmcreated", $link); - } - - if (in_array("${mysqlprefix}chatthread.dtmclosed", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD dtmclosed int NOT NULL DEFAULT 0 AFTER dtmmodified", $link); - runsql("update ${mysqlprefix}chatthread set dtmclosed = dtmmodified", $link); - } - - if (in_array("${mysqlprefix}chatthread.agentTyping", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD agentTyping int DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatthread.userTyping", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD userTyping int DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatthread.messageCount", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD messageCount varchar(16)", $link); - runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD INDEX idx_threadid_ikind (threadid, ikind)", $link); - runsql("UPDATE ${mysqlprefix}chatthread t SET t.messageCount = (SELECT COUNT(*) FROM ${mysqlprefix}chatmessage WHERE ${mysqlprefix}chatmessage.threadid = t.threadid AND ikind = 1)", $link); - runsql("ALTER TABLE ${mysqlprefix}chatmessage DROP INDEX idx_threadid_ikind", $link); - } - - if (in_array("${mysqlprefix}chatthread.nextagent", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD nextagent int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatthread.shownmessageid", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD shownmessageid int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatthread.userid", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD userid varchar(255) DEFAULT \"\"", $link); - } - - if (in_array("${mysqlprefix}chatthread.invitationstate", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD invitationstate int NOT NULL DEFAULT 0 AFTER istate", $link); - } - - if (in_array("${mysqlprefix}chatthreadstatistics.missedthreads", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthreadstatistics ADD missedthreads int NOT NULL DEFAULT 0 AFTER threads", $link); - } - - if (in_array("${mysqlprefix}chatthreadstatistics.sentinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthreadstatistics ADD sentinvitations int NOT NULL DEFAULT 0 AFTER missedthreads", $link); - } - - if (in_array("${mysqlprefix}chatthreadstatistics.acceptedinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthreadstatistics ADD acceptedinvitations int NOT NULL DEFAULT 0 AFTER sentinvitations", $link); - } - - if (in_array("${mysqlprefix}chatthreadstatistics.rejectedinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthreadstatistics ADD rejectedinvitations int NOT NULL DEFAULT 0 AFTER acceptedinvitations", $link); - } - - if (in_array("${mysqlprefix}chatthreadstatistics.ignoredinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthreadstatistics ADD ignoredinvitations int NOT NULL DEFAULT 0 AFTER rejectedinvitations", $link); - } - - if (in_array("${mysqlprefix}chatoperator.iperm", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD iperm int DEFAULT 65535", $link); - } - - if (in_array("${mysqlprefix}chatoperator.istatus", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD istatus int DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatoperator.idisabled", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD idisabled int DEFAULT 0 AFTER istatus", $link); - } - - if (in_array("${mysqlprefix}chatoperator.vcavatar", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcavatar varchar(255)", $link); - } - - if (in_array("${mysqlprefix}chatoperator.vcjabbername", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcjabbername varchar(255)", $link); - } - - if (in_array("${mysqlprefix}chatoperator.vcemail", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcemail varchar(64)", $link); - } - - if (in_array("${mysqlprefix}chatoperator.dtmrestore", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD dtmrestore int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatoperator.vcrestoretoken", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcrestoretoken varchar(64)", $link); - } - - if (in_array("${mysqlprefix}chatoperator.code", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD code varchar(64) DEFAULT ''", $link); - } - - if (in_array("${mysqlprefix}chatoperatorstatistics.sentinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperatorstatistics ADD sentinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatoperatorstatistics.acceptedinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperatorstatistics ADD acceptedinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatoperatorstatistics.rejectedinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperatorstatistics ADD rejectedinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatoperatorstatistics.ignoredinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperatorstatistics ADD ignoredinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatresponses.vctitle", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatresponses ADD vctitle varchar(100) NOT NULL DEFAULT '' AFTER groupid", $link); - } - - if (in_array("${mysqlprefix}chatthread.groupid", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD groupid int references ${mysqlprefix}chatgroup(groupid)", $link); - } - - if (in_array("${mysqlprefix}chatthread.userAgent", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatthread ADD userAgent varchar(255)", $link); - } - - if (in_array("${mysqlprefix}chatgroup.vcemail", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD vcemail varchar(64)", $link); - } - - if (in_array("${mysqlprefix}chatgroup.iweight", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD iweight int DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}chatgroup.parent", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD parent int DEFAULT NULL AFTER groupid", $link); - } - - if (in_array("${mysqlprefix}chatgroup.vctitle", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD vctitle varchar(255) DEFAULT ''", $link); - } - - if (in_array("${mysqlprefix}chatgroup.vcchattitle", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD vcchattitle varchar(255) DEFAULT ''", $link); - } - - if (in_array("${mysqlprefix}chatgroup.vclogo", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD vclogo varchar(255) DEFAULT ''", $link); - } - - if (in_array("${mysqlprefix}chatgroup.vchosturl", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD vchosturl varchar(255) DEFAULT ''", $link); - } - - if (in_array("${mysqlprefix}visitedpagestatistics.sentinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}visitedpagestatistics ADD sentinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}visitedpagestatistics.acceptedinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}visitedpagestatistics ADD acceptedinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}visitedpagestatistics.rejectedinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}visitedpagestatistics ADD rejectedinvitations int NOT NULL DEFAULT 0", $link); - } - - if (in_array("${mysqlprefix}visitedpagestatistics.ignoredinvitations", $absent_columns)) { - runsql("ALTER TABLE ${mysqlprefix}visitedpagestatistics ADD ignoredinvitations int NOT NULL DEFAULT 0", $link); - } - -// Add absent indexes - $absent_indexes = array(); - foreach ($dbtables_indexes as $id => $indexes) { - $curr_indexes = get_indexes($id, $link); - if ($curr_indexes === false) { - show_install_err($errors[0]); - } - $tocreate = array_diff(array_keys($indexes), $curr_indexes); - foreach ($tocreate as $i) { - $absent_indexes[] = "$id.$i"; - } - } - - if (in_array("${mysqlprefix}chatgroup.parent", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD INDEX (parent)", $link); - } - - if (in_array("${mysqlprefix}chatgroupoperator.groupid", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroupoperator ADD INDEX (groupid)", $link); - } - - if (in_array("${mysqlprefix}chatgroupoperator.operatorid", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}chatgroupoperator ADD INDEX (operatorid)", $link); - } - - if (in_array("${mysqlprefix}chatmessage.idx_agentid", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD INDEX idx_agentid (agentid)", $link); - } - - if (in_array("${mysqlprefix}chatsitevisitor.threadid", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}chatsitevisitor ADD INDEX (threadid)", $link); - } - - if (in_array("${mysqlprefix}visitedpage.visitorid", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}visitedpage ADD INDEX (visitorid)", $link); - } - - if (in_array("${mysqlprefix}chatoperatorstatistics.operatorid", $absent_indexes)) { - runsql("ALTER TABLE ${mysqlprefix}chatoperatorstatistics ADD INDEX (operatorid)", $link); - } - } -} - -mysql_close($link); -header("Location: $mibewroot/install/index.php"); -exit; -?> \ No newline at end of file diff --git a/src/messenger/mibew/install/index.php b/src/messenger/mibew/install/index.php deleted file mode 100644 index 22201333..00000000 --- a/src/messenger/mibew/install/index.php +++ /dev/null @@ -1,371 +0,0 @@ - $version, - 'localeLinks' => get_locale_links("$mibewroot/install/index.php") -); - -$page['done'] = array(); -$page['nextstep'] = false; -$page['nextnotice'] = false; -$page['soundcheck'] = false; -$errors = array(); - -function check_mibewroot() -{ - global $page, $errors, $mibewroot; - $requestUri = $_SERVER["REQUEST_URI"]; - if (!preg_match('/^(.*)\\/install(\\/[^\\/\\\\]*)?$/', $requestUri, $matches)) { - $errors[] = "Cannot detect application location: $requestUri"; - return false; - } - $applocation = $matches[1]; - - if ($applocation != $mibewroot) { - $errors[] = "Please, check file ${applocation}/libs/config.php
Wrong value of \$mibewroot variable, should be \"$applocation\""; - $mibewroot = $applocation; - return false; - } - - $page['done'][] = getlocal2("install.0.app", array($applocation)); - return true; -} - -function fpermissions($file) -{ - $perms = fileperms($file); - if (($perms & 0x8000) == 0x8000) { - $info = '-'; - } elseif (($perms & 0x4000) == 0x4000) { - $info = 'd'; - } else { - $info = '?'; - } - - // Owner - $info .= (($perms & 0x0100) ? 'r' : '-'); - $info .= (($perms & 0x0080) ? 'w' : '-'); - $info .= (($perms & 0x0040) ? - (($perms & 0x0800) ? 's' : 'x') : - (($perms & 0x0800) ? 'S' : '-')); - - // Group - $info .= (($perms & 0x0020) ? 'r' : '-'); - $info .= (($perms & 0x0010) ? 'w' : '-'); - $info .= (($perms & 0x0008) ? - (($perms & 0x0400) ? 's' : 'x') : - (($perms & 0x0400) ? 'S' : '-')); - - // World - $info .= (($perms & 0x0004) ? 'r' : '-'); - $info .= (($perms & 0x0002) ? 'w' : '-'); - $info .= (($perms & 0x0001) ? - (($perms & 0x0200) ? 't' : 'x') : - (($perms & 0x0200) ? 'T' : '-')); - - return $info; -} - -function check_files() -{ - global $page, $errors, $mibewroot; - - $packageFile = dirname(__FILE__) . "/package"; - $fp = @fopen($packageFile, "r"); - if ($fp === FALSE) { - $errors[] = getlocal2("install.cannot_read", array("$mibewroot/install/package")); - if (file_exists($packageFile)) { - $errors[] = getlocal2("install.check_permissions", array(fpermissions($packageFile))); - } - return false; - } - - $knownFiles = array(); - while (!feof($fp)) { - $line = fgets($fp, 4096); - $keyval = preg_split("/ /", $line, 2); - if (isset($keyval[1])) { - $knownFiles[$keyval[0]] = trim($keyval[1]); - } - } - fclose($fp); - - foreach ($knownFiles as $file => $sum) { - $relativeName = dirname(__FILE__) . "/../$file"; - if (!is_readable($relativeName)) { - if (file_exists($relativeName)) { - $errors[] = getlocal2("install.cannot_read", array("$mibewroot/$file")); - $errors[] = getlocal2("install.check_permissions", array(fpermissions($relativeName))); - } else { - $errors[] = getlocal2("install.no_file", array("$mibewroot/$file")); - } - return false; - } - if ($sum != "-") { - $result = md5_file($relativeName); - if ($result != $sum) { - // try without \r - $result = md5(str_replace("\r", "", file_get_contents($relativeName))); - } - if ($result != $sum) { - $errors[] = getlocal2("install.bad_checksum", array("$mibewroot/$file")); - $errors[] = getlocal("install.check_files"); - return false; - } - } - } - - $page['done'][] = getlocal("install.0.package"); - return true; -} - -function check_connection() -{ - global $mysqlhost, $mysqllogin, $mysqlpass, $page, $errors, $mibewroot; - $link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass); - if ($link) { - $result = mysql_query("SELECT VERSION() as c", $link); - if ($result && $ver = mysql_fetch_array($result, MYSQL_ASSOC)) { - $page['done'][] = getlocal2("install.1.connected", array($ver['c'])); - mysql_free_result($result); - } else { - $errors[] = "Version of your SQL server is unknown. Please check. Error: " . mysql_error($link); - mysql_close($link); - return null; - } - return $link; - } else { - $errors[] = getlocal2("install.connection.error", array(mysql_error())); - return null; - } -} - -function check_database($link) -{ - global $mysqldb, $force_charset_in_connection, $dbencoding, $page, $mibewroot; - if (mysql_select_db($mysqldb, $link)) { - $page['done'][] = getlocal2("install.2.db_exists", array($mysqldb)); - if ($force_charset_in_connection) { - mysql_query("SET character set $dbencoding", $link); - } - return true; - } else { - $page['nextstep'] = getlocal2("install.2.create", array($mysqldb)); - $page['nextnotice'] = getlocal("install.2.notice"); - $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=createdb"; - } - return false; -} - -function check_tables($link) -{ - global $dbtables, $page, $mibewroot; - $curr_tables = get_tables($link); - if ($curr_tables !== false) { - $tocreate = array_diff(array_keys($dbtables), $curr_tables); - if (count($tocreate) == 0) { - $page['done'][] = getlocal("install.3.tables_exist"); - return true; - } else { - $page['nextstep'] = getlocal("install.3.create"); - $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=ct"; - } - } - return false; -} - -function check_columns($link) -{ - global $dbtables, $dbtables_can_update, $dbtables_indexes, $errors, $page, $mibewroot; - - $need_to_create_columns = false; - foreach ($dbtables as $id => $columns) { - $curr_columns = get_columns($id, $link); - if ($curr_columns === false) { - return false; - } - $tocreate = array_diff(array_keys($columns), $curr_columns); - if (count($tocreate) != 0) { - $cannot_update = array_diff($tocreate, $dbtables_can_update[$id]); - if (count($cannot_update) != 0) { - $errors[] = "Key columns are absent in table `$id'. Unable to continue installation."; - $page['nextstep'] = getlocal("install.kill_tables"); - $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=dt"; - $page['nextnotice'] = getlocal("install.kill_tables.notice"); - return false; - } - $need_to_create_columns = true; - } - } - - $need_to_create_indexes = false; - foreach ($dbtables_indexes as $id => $indexes) { - $curr_indexes = get_indexes($id, $link); - if ($curr_indexes === false) { - return false; - } - $tocreate = array_diff(array_keys($indexes), $curr_indexes); - if (count($tocreate) != 0) { - $need_to_create_indexes = true; - } - } - - if ($need_to_create_columns || $need_to_create_indexes) { - $page['nextstep'] = getlocal("install.4.create"); - $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=addcolumns"; - $page['nextnotice'] = getlocal("install.4.notice"); - return false; - } - - $page['done'][] = getlocal("install.4.done"); - return true; -} - -function check_sound() -{ - global $page; - - $page['soundcheck'] = true; - $page['done'][] = getlocal2("install.5.text", array( - "" . getlocal("install.5.newvisitor") . "", - "" . getlocal("install.5.newmessage") . "" - )); -} - -function check_admin($link) -{ - global $mysqlprefix; - $result = mysql_query("select * from ${mysqlprefix}chatoperator where vclogin = 'admin'", $link); - if ($result) { - $line = mysql_fetch_array($result, MYSQL_ASSOC); - mysql_free_result($result); - return $line['vcpassword'] != md5(''); - } - - return false; -} - -function add_canned_messages($link){ - global $mysqlprefix; - $localesresult = mysql_query("select locale from ${mysqlprefix}chatresponses", $link); - $existlocales = array(); - for ($i = 0; $i < mysql_num_rows($localesresult); $i++) { - $existlocales[] = mysql_result($localesresult, $i, 'locale'); - } - $result = array(); - foreach (get_available_locales() as $locale) { - if (! in_array($locale, $existlocales)) { - foreach (explode("\n", getstring_('chat.predefined_answers', $locale)) as $answer) { - $result[] = array('locale' => $locale, 'vctitle' => cutstring($answer, 97, '...'), 'vcvalue' => $answer); - } - } - } - if (count($result) > 0) { - $updatequery = "insert into ${mysqlprefix}chatresponses (vctitle,vcvalue,locale,groupid) values "; - for ($i = 0; $i < count($result); $i++) { - if ($i > 0) { - $updatequery .= ", "; - } - $updatequery .= "('" . mysql_real_escape_string($result[$i]['vctitle'], $link) . "', " - . "'" . mysql_real_escape_string($result[$i]['vcvalue'], $link) . "', " - . "'" . mysql_real_escape_string($result[$i]['locale'], $link) . "', NULL)"; - } - mysql_query($updatequery, $link); - } -} - -function check_status() -{ - global $page, $mibewroot, $dbversion, $mysqlprefix; - - $page['done'][] = getlocal2("install.0.php", array(phpversion())); - - if (!check_mibewroot()) { - return; - } - - if (!check_files()) { - return; - } - - $link = check_connection(); - if (!$link) { - return; - } - - if (!check_database($link)) { - mysql_close($link); - return; - } - - if (!check_tables($link)) { - mysql_close($link); - return; - } - - if (!check_columns($link)) { - mysql_close($link); - return; - } - - add_canned_messages($link); - - check_sound(); - - $page['done'][] = getlocal("installed.message"); - - if (!check_admin($link)) { - $page['nextstep'] = getlocal("installed.login_link"); - $page['nextnotice'] = getlocal2("installed.notice", array("${mibewroot}/install/")); - $page['nextstepurl'] = "$mibewroot/operator/login.php?login=admin"; - } - - $page['show_small_login'] = true; - - // Update current dbversion - $res = mysql_query("select COUNT(*) as count from ${mysqlprefix}chatconfig where vckey = 'dbversion'", $link); - if(mysql_result($res, 0, 'count') == 0) { - mysql_query("insert into ${mysqlprefix}chatconfig (vckey) values ('dbversion')", $link); - } - - mysql_query("update ${mysqlprefix}chatconfig set vcvalue = '{$dbversion}' where vckey='dbversion'", $link); - mysql_close($link); - -} - -check_status(); - -start_html_output(); -require('../view/install_index.php'); -?> \ No newline at end of file diff --git a/src/messenger/mibew/install/migrate.php b/src/messenger/mibew/install/migrate.php deleted file mode 100644 index c9983e13..00000000 --- a/src/messenger/mibew/install/migrate.php +++ /dev/null @@ -1,68 +0,0 @@ -throwExeptions(true); - -$update_datetime = array( - '{chatthread}' => array( - 'dtmcreated', - 'dtmchatstarted', - 'dtmmodified', - 'lastpinguser', - 'lastpingagent' - ), - '{chatmessage}' => array( - 'dtmcreated' - ), - '{chatoperator}' => array( - 'dtmlastvisited', - 'dtmrestore' - ), - '{chatban}' => array( - 'dtmcreated', - 'dtmtill' - ), - '{chatsitevisitor}' => array( - 'firsttime', - 'lasttime', - 'invitationtime' - ), - '{visitedpage}' => array( - 'visittime' - ), - '{visitedpagestatistics}' => array( - 'visittime' - ) -); - -foreach($update_datetime as $table => $columns) { - echo("Table: {$table}
"); - foreach($columns as $column) { - echo("-- Column: {$column}
"); - $db->query("ALTER TABLE {$table} CHANGE {$column} {$column}_tmp datetime"); - $db->query("ALTER TABLE {$table} ADD COLUMN {$column} int NOT NULL DEFAULT 0 AFTER {$column}_tmp"); - $db->query("UPDATE {$table} SET {$column} = UNIX_TIMESTAMP({$column}_tmp)"); - $db->query("ALTER TABLE {$table} DROP COLUMN {$column}_tmp"); - } -} - - -?> \ No newline at end of file diff --git a/src/messenger/mibew/install/whatsnew.txt b/src/messenger/mibew/install/whatsnew.txt deleted file mode 100644 index 200b5242..00000000 --- a/src/messenger/mibew/install/whatsnew.txt +++ /dev/null @@ -1,181 +0,0 @@ - 1.6.5 - ----- - [+] Apache 2 license - [!] csrf fixes - - 1.6.4 - ----- - [+] core UI improvements, "you are offline" and "new features" notification panels - [+] online/away operators list (on "awaiting visitors" page) by Andrew Armstrong - [+] several instances of mibew in one DB ($mysqlprefix variable) - [+] ability to override notification email for group - [!] various compatibility fixes: button image, captcha, check webimroot variable (installation) - [!] check file permissions/checksum (installation) - [!] fix speed of history search, fix redirection to groups - [!] fix sound issues in windows - - 1.6.3 - ----- - [+] password restore functionality for agent - [+] new Blue logo; new buttons: mgreen, mblue - [!] fixed: button code conflicts with spam filters and mod_security - [!] workarounds if some functions are disabled in php - [!] compatibility with PHP 5.3.0 - [+] new domain: mibew.org - - 1.6.2 - ----- - [+] bi-licensed: EPL / GPL - [+] operator is away status, show status on redirect/survey/operators pages - [+] Captcha - Leave Message - [+] groups page: last active column - [+] pre-chat survey, redirect page: show group status - online/offline/away - [!] do not show empty groups in redirect/survey - [!] compatibility with the latest mod_security rules - [+] performance options in settings: update intervals, operator online time threshold - [+] information messages: visitor navigated to ... - [!] html code in templates, better appearance in Safari - - 1.6.1 - ----- - [!] 404 installation problem - [+] new permission: "Ability to modify profile" - [+] new project name: Mibew Messenger - [!] fixed localization of dates for all languages, nice formatting: Today/Yesterday - [!] fixed online/offline image for groups - [+] ability to delete operators, confirmation dialog when deleting group/operator/blocked address - [+] Information about last activity for operators: Online, Today at 22, 01 Jan.., or Never - [+] new theme: simplicity (by Sheldmandu) - [!] chat templates are fixed according to html standards - - 1.6.0 - ----- - [+] completely new layout of all administrator pages, XHTML 1.0 - [+] New awaiting users and chat log pages - [+] right menu, show/hide menu on awaiting users page, nice locale chooser - [+] main page: warning if database is outdated (after install) - [+] "Updates": news, link to the latest version - [+] Operator's profile page - [+] Configurable pre-chat survey - [+] Create/edit/remove groups - [+] Canned messages page - [+] Statistics page - [+] Popup dialog notification of the new visitor (turned off by default) - [+] Send message option: enter vs ctrl-enter - [!] Slow loading of awating visitors page - - 1.5.2 - ----- - [+] Ability to disable sound notifications for chat (toolbar button) - [+] Switch to SSL in chat (should be enabled in "Settings -> Optional Services") - [!] lost query parameters after login redirect - [+] added referrer into button code - [+] ability to add text for operator into button code, define visitor's name and email - [!] geolocation on IPs in history - [!] Translation UI: added sorting, filters, fixed several problems - [+] New chat buttons - - 1.5.1 - ----- - [!] significant optimization of chat window (both themes), reduced number of images and their sizes - [+] tabs in settings: Optional Services, Themes preview - [+] better French and Spanish translations, additional languages are stored separately - [+] detect Chrome browser, show its version - [!] reverted order in title, removed available_locales variable from config.php (detect automatically) - [!] return English message by default (when translation for other language is absent) - [!] problems with styles, fixed error messages in avatar uploading - [+] nice confirmation when form is saved - - 1.5.0 - ----- - [!] sound notifications: FF (mac,win), Opera (mac,win), IE, Safari (mac,win) - [+] chat styles support: selectors in button generation and in settings - [+] styles are applied as set of page templates - [+] added styles preview page (the link from settings page) with "fake" chat - [+] 2 styles are included: original (old one) and default (new green scheme) - [+] new options in settings: user can change name, presentable name pattern - [+] customizable geolocation link for IPs on pending users page - [+] permissions support: Agents -> some agent -> Permissions - [+] New permissions: - [x] System administration: settings, operators management, button generation - [x] Take over chat thread - [x] View another operator's chat thread - - 1.4.2 - ----- - - [+] Operators photos (appears in users chat window) - [+] pending users: show first user message (below the name) - [+] pending users: show visitors's browser name and version - [+] mark user with unique id to be able to see its dialogs later - [+] special button in operator's thread to browse previous chats - [+] Spam Blocking - - 1.4.1 - ----- - - [+] redirect visitor to another operator - [+] predefined answers (without proper management yet) - [+] play notification sounds (new message, new visitor) - [+] confirmation when trying to intercept another operator's visitor - [+] ability to view threads without taking - - 1.4.0 - ----- - - [+] introduce messenger settings page, persist several options in DB instead of config.php - [+] improve history search speed - [+] do not show typing notification for disconnected remote - [!] monitor connection status, show reconnecing message when connection is low (pendings users and chat window) - [!] support lang & language args in button code, create correct code for link - [!] fix safari, opera 9.5+ (+ several others compatibility fixes) - - 1.0.10 - ------ - - [+] Number of messages from visitor in history - [+] State "loading" (means user is still loading his window) - [+] Timers on peding users page are ticking now - [!] Company logo link target is now an option in config - [!] Mail encoding fixed (separate option) - [!] Operator/user locale is stored in cookie - [!] localized dates - [!] fixed installing on DB with numeric name - [!] empty and double messages - [!] #1983764 - - 1.0.9 - ----- - - [+] typing notifications in chat window - [!] completly new encoding handling, default is utf-8, page encoding is set in resources - [!] fixed user name storage in cookie (now utf8 in base64) - [!] some fixes for Opera - [!] force utf-8 for xml - - 1.0.8 - ----- - - [+] install/update wizard, can create database and update it if needed - [+] leave message form when no operator is available - [!] location of web application can be other than /webim (see config.php) - [!] locale-specific resources extracted into /locales - [!] some fixes for Safari browser - [!] email validation in forms - - 1.0.7 - ----- - - [+] history search with pagination - [+] advanced button generation: secure link, include hostname, choosing images - [+] post referer into thread as a message (visible only for agent) - [+] new config options: user can change name, company name, logo - [+] notify operator if user closed his window - [+] notify visitor if operator has connection problems and move it into priority queue - [+] automatically take visitor if operator connection restored - [!] encoding problems in Internet Explorer - [!] quotes in messages & user names - [!] do not reopen closed threads - [!] some fixes in handling thread locale - [!] version in menu, locales chooser in menu - diff --git a/src/messenger/mibew/js/compiled/brws.js b/src/messenger/mibew/js/compiled/brws.js deleted file mode 100644 index a419e774..00000000 --- a/src/messenger/mibew/js/compiled/brws.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -var myAgent="",myVer=0,myRealAgent="";function detectAgent(){for(var a="opera msie safari firefox netscape mozilla".split(" "),d=navigator.userAgent.toLowerCase(),b=0;b$2");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'$2'); -return new b.SafeString(a)});b.registerHelper("formatTime",function(a){var c=new Date(1E3*a);a=c.getHours().toString();var b=c.getMinutes().toString(),c=c.getSeconds().toString();return(10>a?"0"+a:a)+":"+(10>b?"0"+b:b)+":"+(10>c?"0"+c:c)});b.registerHelper("urlReplace",function(a){return new b.SafeString(a.replace(/((?:https?|ftp):\/\/\S*)/g,'$1'))});b.registerHelper("nl2br",function(a){return new b.SafeString(a.replace(/\n/g,"
"))});b.registerHelper("L10n",function(a){return e.Localization.get(a)|| -""})})(Mibew,Handlebars); diff --git a/src/messenger/mibew/js/compiled/default/init.js b/src/messenger/mibew/js/compiled/default/init.js deleted file mode 100644 index 8fe6de9f..00000000 --- a/src/messenger/mibew/js/compiled/default/init.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -var Mibew={};(function(a,b){b.Marionette.TemplateCache.prototype.compileTemplate=function(a){return Handlebars.compile(a)};a.Models={};a.Collections={};a.Views={};a.Objects={};a.Objects.Models={};a.Objects.Collections={}})(Mibew,Backbone); diff --git a/src/messenger/mibew/js/compiled/default/localization.js b/src/messenger/mibew/js/compiled/default/localization.js deleted file mode 100644 index 3c1c8aa6..00000000 --- a/src/messenger/mibew/js/compiled/default/localization.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,d){b.Localization={};var c={};b.Localization.get=function(a){return!c.hasOwnProperty(a)?!1:c[a]};b.Localization.set=function(a){d.extend(c,a)}})(Mibew,_); diff --git a/src/messenger/mibew/js/compiled/default/model_views/control.js b/src/messenger/mibew/js/compiled/default/model_views/control.js deleted file mode 100644 index 592fed24..00000000 --- a/src/messenger/mibew/js/compiled/default/model_views/control.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,c,d){b.Views.Control=c.Marionette.ItemView.extend({template:d.templates.default_control,modelEvents:{change:"render"},events:{mouseover:"mouseOver",mouseleave:"mouseLeave"},attributes:function(){var a=[];a.push("control");this.className&&(a.push(this.className),this.className="");var b=this.getDashedControlType();b&&a.push(b);return{"class":a.join(" ")}},mouseOver:function(){var a=this.getDashedControlType();this.$el.addClass("active"+(a?"-"+a:""))},mouseLeave:function(){var a=this.getDashedControlType(); -this.$el.removeClass("active"+(a?"-"+a:""))},getDashedControlType:function(){"undefined"==typeof this.dashedControlType&&(this.dashedControlType=b.Utils.toDashFormat(this.model.getModelType())||"");return this.dashedControlType}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/mibew/js/compiled/default/model_views/message.js b/src/messenger/mibew/js/compiled/default/model_views/message.js deleted file mode 100644 index d20189f6..00000000 --- a/src/messenger/mibew/js/compiled/default/model_views/message.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(c,d,e){var f={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"},g=/[&<>'"`]/g;c.Views.Message=d.Marionette.ItemView.extend({template:e.templates.message,className:"message",modelEvents:{change:"render"},serializeData:function(){var a=this.model.toJSON(),b=this.model.get("kind");a.allowFormatting=b!=this.model.KIND_USER&&b!=this.model.KIND_AGENT;a.kindName=this.kindToString(b);a.message=this.escapeString(a.message);return a},kindToString:function(a){return a==this.model.KIND_USER? -"user":a==this.model.KIND_AGENT?"agent":a==this.model.KIND_FOR_AGENT?"hidden":a==this.model.KIND_INFO?"inf":a==this.model.KIND_CONN?"conn":a==this.model.KIND_EVENTS?"event":a==this.model.KIND_PLUGIN?"plugin":""},escapeString:function(a){return a.replace(g,function(a){return f[a]||"&"})}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/mibew/js/compiled/default/models/base.js b/src/messenger/mibew/js/compiled/default/models/base.js deleted file mode 100644 index 4c4ff0c9..00000000 --- a/src/messenger/mibew/js/compiled/default/models/base.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b){a.Models.Base=b.Model.extend({getModelType:function(){return""}})})(Mibew,Backbone); diff --git a/src/messenger/mibew/js/compiled/default/models/control.js b/src/messenger/mibew/js/compiled/default/models/control.js deleted file mode 100644 index d7df45aa..00000000 --- a/src/messenger/mibew/js/compiled/default/models/control.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.Control=a.Models.Base.extend({defaults:{title:"",weight:0}})})(Mibew); diff --git a/src/messenger/mibew/js/compiled/default/models/message.js b/src/messenger/mibew/js/compiled/default/models/message.js deleted file mode 100644 index 8438f7fa..00000000 --- a/src/messenger/mibew/js/compiled/default/models/message.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.Message=a.Models.Base.extend({defaults:{kind:null,created:0,name:"",message:"",plugin:"",data:{}},KIND_USER:1,KIND_AGENT:2,KIND_FOR_AGENT:3,KIND_INFO:4,KIND_CONN:5,KIND_EVENTS:6,KIND_PLUGIN:7})})(Mibew); diff --git a/src/messenger/mibew/js/compiled/default/models/page.js b/src/messenger/mibew/js/compiled/default/models/page.js deleted file mode 100644 index f5136b9d..00000000 --- a/src/messenger/mibew/js/compiled/default/models/page.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b){a.Models.Page=b.Model.extend()})(Mibew,Backbone); diff --git a/src/messenger/mibew/js/compiled/default/models/thread.js b/src/messenger/mibew/js/compiled/default/models/thread.js deleted file mode 100644 index ee451f31..00000000 --- a/src/messenger/mibew/js/compiled/default/models/thread.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.Thread=a.Models.Base.extend({defaults:{id:0,token:0,lastId:0,state:null},STATE_QUEUE:0,STATE_WAITING:1,STATE_CHATTING:2,STATE_CLOSED:3,STATE_LOADING:4,STATE_LEFT:5,STATE_INVITED:6})})(Mibew); diff --git a/src/messenger/mibew/js/compiled/default/models/user.js b/src/messenger/mibew/js/compiled/default/models/user.js deleted file mode 100644 index 4573bda3..00000000 --- a/src/messenger/mibew/js/compiled/default/models/user.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.User=a.Models.Base.extend({defaults:{isAgent:!1,name:""}})})(Mibew); diff --git a/src/messenger/mibew/js/compiled/default/server.js b/src/messenger/mibew/js/compiled/default/server.js deleted file mode 100644 index f7a4dfc0..00000000 --- a/src/messenger/mibew/js/compiled/default/server.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,f,g,e){b.Server=function(a){this.updateTimer=null;this.options=e.extend({url:"",requestsFrequency:2,reconnectPause:1,onTimeout:function(){},onTransportError:function(){},onCallError:function(){},onUpdateError:function(){},onResponseError:function(){}},a);this.callbacks={};this.callPeriodically={};this.callPeriodicallyLastId=0;this.ajaxRequest=null;this.buffer=[];this.functions={};this.functionsLastId=0;this.mibewAPI=new f(new this.options.interactionType)};b.Server.prototype.callFunctions= -function(a,c,b){try{if(!(a instanceof Array))throw Error("The first arguments must be an array");for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}; -b.Utils.playSound=function(a){c("body").append('')}})(Mibew,$); diff --git a/src/messenger/mibew/js/compiled/default_app.js b/src/messenger/mibew/js/compiled/default_app.js deleted file mode 100644 index 1f7cf1f2..00000000 --- a/src/messenger/mibew/js/compiled/default_app.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(){var k=Handlebars.template,l=Handlebars.templates=Handlebars.templates||{};l.default_control=k(function(a,b,e,h,f){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);f=f||{};h=this.escapeExpression;a="";(e=e.title)?e=e.call(b,{hash:{},data:f}):(e=b.title,e="function"===typeof e?e.apply(b):e);return a+=h(e)+""});l.message=k(function(a,b,e,h,f){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,a.helpers);f=f||{};var c,g=this.escapeExpression,j=e.helperMissing;a={hash:{}, -data:f};a=""+(g((c=e.formatTime||b.formatTime,c?c.call(b,b.created,a):j.call(b,"formatTime",b.created,a)))+"\n");if((c=e["if"].call(b,b.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d;b="";(d=e.name)?d=d.call(a,{hash:{},data:c}):(d=a.name,d="function"===typeof d?d.apply(a):d);return b+=g(d)+": "},f),data:f}))||0===c)a+=c;a+="\n";if((c=e["if"].call(b,b.allowFormatting,{hash:{},inverse:this.program(5,function(a,b){var c,d;d={hash:{},data:b};return g((c=e.apply||a.apply,c?c.call(a,a.message,"urlReplace, nl2br",d):j.call(a,"apply",a.message,"urlReplace, nl2br",d)))},f),fn:this.program(3,function(a,c){var b,d;d={hash:{},data:c};return g((b=e.apply||a.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",d):j.call(a, -"apply",a.message,"urlReplace, nl2br, allowTags",d)))},f),data:f}))||0===c)a+=c;return a+="
"})})(); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -var Mibew={};(function(a,b){b.Marionette.TemplateCache.prototype.compileTemplate=function(a){return Handlebars.compile(a)};a.Models={};a.Collections={};a.Views={};a.Objects={};a.Objects.Models={};a.Objects.Collections={}})(Mibew,Backbone); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(e,b){b.registerHelper("apply",function(a,c){var f=a,e=/^[0-9A-z_]+$/;c=c.split(/\s*,\s*/);for(var d in c)if(c.hasOwnProperty(d)&&e.test(c[d])){if("function"!=typeof b.helpers[c[d]])throw Error("Unregistered helper '"+c[d]+"'!");f=b.helpers[c[d]](f).toString()}return new b.SafeString(f)});b.registerHelper("allowTags",function(a){a=a.replace(/<(span|strong)>(.*?)<\/\1>/g,"<$1>$2");a=a.replace(/<span class="(.*?)">(.*?)<\/span>/g,'$2'); -return new b.SafeString(a)});b.registerHelper("formatTime",function(a){var c=new Date(1E3*a);a=c.getHours().toString();var b=c.getMinutes().toString(),c=c.getSeconds().toString();return(10>a?"0"+a:a)+":"+(10>b?"0"+b:b)+":"+(10>c?"0"+c:c)});b.registerHelper("urlReplace",function(a){return new b.SafeString(a.replace(/((?:https?|ftp):\/\/\S*)/g,'$1'))});b.registerHelper("nl2br",function(a){return new b.SafeString(a.replace(/\n/g,"
"))});b.registerHelper("L10n",function(a){return e.Localization.get(a)|| -""})})(Mibew,Handlebars); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,d){b.Localization={};var c={};b.Localization.get=function(a){return!c.hasOwnProperty(a)?!1:c[a]};b.Localization.set=function(a){d.extend(c,a)}})(Mibew,_); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,f,g,e){b.Server=function(a){this.updateTimer=null;this.options=e.extend({url:"",requestsFrequency:2,reconnectPause:1,onTimeout:function(){},onTransportError:function(){},onCallError:function(){},onUpdateError:function(){},onResponseError:function(){}},a);this.callbacks={};this.callPeriodically={};this.callPeriodicallyLastId=0;this.ajaxRequest=null;this.buffer=[];this.functions={};this.functionsLastId=0;this.mibewAPI=new f(new this.options.interactionType)};b.Server.prototype.callFunctions= -function(a,c,b){try{if(!(a instanceof Array))throw Error("The first arguments must be an array");for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)}; -b.Utils.playSound=function(a){c("body").append('')}})(Mibew,$); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b){a.Models.Base=b.Model.extend({getModelType:function(){return""}})})(Mibew,Backbone); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.Control=a.Models.Base.extend({defaults:{title:"",weight:0}})})(Mibew); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.Message=a.Models.Base.extend({defaults:{kind:null,created:0,name:"",message:"",plugin:"",data:{}},KIND_USER:1,KIND_AGENT:2,KIND_FOR_AGENT:3,KIND_INFO:4,KIND_CONN:5,KIND_EVENTS:6,KIND_PLUGIN:7})})(Mibew); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b){a.Models.Page=b.Model.extend()})(Mibew,Backbone); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.Thread=a.Models.Base.extend({defaults:{id:0,token:0,lastId:0,state:null},STATE_QUEUE:0,STATE_WAITING:1,STATE_CHATTING:2,STATE_CLOSED:3,STATE_LOADING:4,STATE_LEFT:5,STATE_INVITED:6})})(Mibew); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Models.User=a.Models.Base.extend({defaults:{isAgent:!1,name:""}})})(Mibew); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b){a.Collections.Controls=b.Collection.extend({comparator:function(a){return a.get("weight")}})})(Mibew,Backbone); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,c,d){b.Views.Control=c.Marionette.ItemView.extend({template:d.templates.default_control,modelEvents:{change:"render"},events:{mouseover:"mouseOver",mouseleave:"mouseLeave"},attributes:function(){var a=[];a.push("control");this.className&&(a.push(this.className),this.className="");var b=this.getDashedControlType();b&&a.push(b);return{"class":a.join(" ")}},mouseOver:function(){var a=this.getDashedControlType();this.$el.addClass("active"+(a?"-"+a:""))},mouseLeave:function(){var a=this.getDashedControlType(); -this.$el.removeClass("active"+(a?"-"+a:""))},getDashedControlType:function(){"undefined"==typeof this.dashedControlType&&(this.dashedControlType=b.Utils.toDashFormat(this.model.getModelType())||"");return this.dashedControlType}})})(Mibew,Backbone,Handlebars); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(c,d,e){var f={"<":"<",">":">","&":"&",'"':""","'":"'","`":"`"},g=/[&<>'"`]/g;c.Views.Message=d.Marionette.ItemView.extend({template:e.templates.message,className:"message",modelEvents:{change:"render"},serializeData:function(){var a=this.model.toJSON(),b=this.model.get("kind");a.allowFormatting=b!=this.model.KIND_USER&&b!=this.model.KIND_AGENT;a.kindName=this.kindToString(b);a.message=this.escapeString(a.message);return a},kindToString:function(a){return a==this.model.KIND_USER? -"user":a==this.model.KIND_AGENT?"agent":a==this.model.KIND_FOR_AGENT?"hidden":a==this.model.KIND_INFO?"inf":a==this.model.KIND_CONN?"conn":a==this.model.KIND_EVENTS?"event":a==this.model.KIND_PLUGIN?"plugin":""},escapeString:function(a){return a.replace(g,function(a){return f[a]||"&"})}})})(Mibew,Backbone,Handlebars); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(d,b,f){var e=function(a,b,c){c=f.extend({model:a},c);return"function"!=typeof a.getModelType?new b(c):(a=a.getModelType())&&d.Views[a]?new d.Views[a](c):new b(c)};d.Views.CollectionBase=b.Marionette.CollectionView.extend({itemView:b.Marionette.ItemView,buildItemView:e});d.Views.CompositeBase=b.Marionette.CompositeView.extend({buildItemView:e,renderCollection:function(){var a=Array.prototype.slice.apply(arguments);b.Marionette.CollectionView.prototype.render.apply(this,a)}})})(Mibew,Backbone, -_); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Views.ControlsCollection=a.Views.CollectionBase.extend({itemView:a.Views.Control,className:"controls-collection"})})(Mibew); diff --git a/src/messenger/mibew/js/compiled/ie.js b/src/messenger/mibew/js/compiled/ie.js deleted file mode 100644 index 3ca1172a..00000000 --- a/src/messenger/mibew/js/compiled/ie.js +++ /dev/null @@ -1,11 +0,0 @@ -window.attachEvent('onload', mkwidth); -window.attachEvent('onresize', mkwidth); - -function mkwidth(){ - if(document.getElementById("wrap700")) { - document.getElementById("wrap700").style.width = document.documentElement.clientWidth < 750 ? "750px" : "100%"; - } - if(document.getElementById("wrap400")) { - document.getElementById("wrap400").style.width = document.documentElement.clientWidth < 450 ? "450px" : "100%"; - } -}; \ No newline at end of file diff --git a/src/messenger/mibew/js/compiled/locale.js b/src/messenger/mibew/js/compiled/locale.js deleted file mode 100644 index c94fffcc..00000000 --- a/src/messenger/mibew/js/compiled/locale.js +++ /dev/null @@ -1,61 +0,0 @@ -var popupStatus = 0; - -function loadPopup(){ - if(popupStatus==0){ - $("#backgroundPopup").css({ - "opacity": "0.7" - }); - $("#backgroundPopup").fadeIn("slow"); - $("#dashlocalesPopup").fadeIn("slow"); - popupStatus = 1; - } -} -function disablePopup(){ - if(popupStatus==1){ - $("#backgroundPopup").fadeOut("slow"); - $("#dashlocalesPopup").fadeOut("slow"); - popupStatus = 0; - } -} - -function normpos(a) { - if(a < 10) { - return 10; - } - return a; -} - -function centerPopup(){ - var windowWidth = document.documentElement.clientWidth; - var windowHeight = document.documentElement.clientHeight; - var popupHeight = $("#dashlocalesPopup").height(); - var popupWidth = $("#dashlocalesPopup").width(); - $("#dashlocalesPopup").css({ - "position": "absolute", - "top": normpos((windowHeight-popupHeight) * 0.2), - "left": normpos(windowWidth/2-popupWidth/2) - }); - $("#backgroundPopup").css({ - "height": windowHeight - }); -} - -$(function(){ - $("#changelang").click(function(){ - centerPopup(); - loadPopup(); - return false; - }); - $("#dashlocalesPopupClose").click(function(){ - disablePopup(); - return false; - }); - $("#backgroundPopup").click(function(){ - disablePopup(); - }); - $(document).keypress(function(e){ - if(e.keyCode==27 && popupStatus==1){ - disablePopup(); - } - }); -}); diff --git a/src/messenger/mibew/js/compiled/mibewapi.js b/src/messenger/mibew/js/compiled/mibewapi.js deleted file mode 100644 index 443c7ac7..00000000 --- a/src/messenger/mibew/js/compiled/mibewapi.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -function MibewAPI(a){this.protocolVersion="1.0";if("object"!=typeof a||!(a instanceof MibewAPIInteraction))throw Error("Wrong interaction type");this.interaction=a} -MibewAPI.prototype.checkFunction=function(a,b){if("undefined"==typeof a["function"]||""==a["function"])throw Error("Cannot call for function with no name");if(b)for(var c=0;c" + window.mibewNews[i].title + ", " + window.mibewNews[i].date + ""; - str += "
" + window.mibewNews[i].message+"
"; - } - $("#news").html(str + ""); -} - -function loadVersion() { - if(typeof(window.mibewLatest) == "undefined" || typeof(window.mibewLatest.version) == "undefined") - return; - - var current = $("#cver").html(); - - if(current != window.mibewLatest.version) { - if(current < window.mibewLatest.version) { - $("#cver").css("color","red"); - } - $("#lver").html(window.mibewLatest.version+", Download "+window.mibewLatest.title+""); - } else { - $("#cver").css("color","green"); - $("#lver").html(window.mibewLatest.version); - } -} - -$(function(){ - loadNews(); - loadVersion(); -}); \ No newline at end of file diff --git a/src/messenger/mibew/js/compiled/users/app.js b/src/messenger/mibew/js/compiled/users/app.js deleted file mode 100644 index 0844ef9d..00000000 --- a/src/messenger/mibew/js/compiled/users/app.js +++ /dev/null @@ -1,10 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,h,j){var c=0,g=function(){c++;10==c&&(alert(a.Localization.get("pending.errors.network")),c=0)},b=new h.Marionette.Application;b.addRegions({agentsRegion:"#agents-region",statusPanelRegion:"#status-panel-region",threadsRegion:"#threads-region",visitorsRegion:"#visitors-region"});b.addInitializer(function(d){a.PluginOptions=d.plugins||{};var c=a.Objects,f=a.Objects.Models,e=a.Objects.Collections;c.server=new a.Server(j.extend({interactionType:MibewAPIUsersInteraction,onTimeout:g,onTransportError:g}, -d.server));f.page=new a.Models.Page(d.page);f.agent=new a.Models.Agent(d.agent);e.threads=new a.Collections.Threads;b.threadsRegion.show(new a.Views.ThreadsCollection({collection:e.threads}));d.page.showVisitors&&(e.visitors=new a.Collections.Visitors,b.visitorsRegion.show(new a.Views.VisitorsCollection({collection:e.visitors})));f.statusPanel=new a.Models.StatusPanel;b.statusPanelRegion.show(new a.Views.StatusPanel({model:f.statusPanel}));d.page.showOnlineOperators&&(e.agents=new a.Collections.Agents, -b.agentsRegion.show(new a.Views.AgentsCollection({collection:e.agents})));c.server.callFunctionsPeriodically(function(){return[{"function":"update",arguments:{"return":{},references:{},agentId:f.agent.id}}]},function(){})});b.on("start",function(){a.Objects.server.runUpdater()});a.Application=b})(Mibew,Backbone,_); diff --git a/src/messenger/mibew/js/compiled/users/collection_views/agents_collection.js b/src/messenger/mibew/js/compiled/users/collection_views/agents_collection.js deleted file mode 100644 index 470e08bb..00000000 --- a/src/messenger/mibew/js/compiled/users/collection_views/agents_collection.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a){a.Views.AgentsCollection=a.Views.CollectionBase.extend({itemView:a.Views.Agent,className:"agents-collection",collectionEvents:{"sort add remove reset":"render"},initialize:function(){this.on("itemview:before:render",this.updateIndexes,this)},updateIndexes:function(a){var b=this.collection,c=a.model;c&&(a.isModelFirst=0==b.indexOf(c),a.isModelLast=b.indexOf(c)==b.length-1)}})})(Mibew); diff --git a/src/messenger/mibew/js/compiled/users/collection_views/threads_collection.js b/src/messenger/mibew/js/compiled/users/collection_views/threads_collection.js deleted file mode 100644 index eab187ab..00000000 --- a/src/messenger/mibew/js/compiled/users/collection_views/threads_collection.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(d,h,j){d.Views.ThreadsCollection=d.Views.CompositeBase.extend({template:h.templates.threads_collection,itemView:d.Views.QueuedThread,itemViewContainer:"#threads-container",emptyView:d.Views.NoThreads,className:"threads-collection",collectionEvents:{sort:"renderCollection","sort:field":"createSortField",add:"threadAdded"},itemViewOptions:function(a){return{tagName:d.Objects.Models.page.get("threadTag"),collection:a.get("controls")}},initialize:function(){window.setInterval(j.bind(this.updateTimers, -this),2E3);this.on("itemview:before:render",this.updateStyles,this);this.on("render",this.updateTimers,this)},updateStyles:function(a){var b=this.collection,c=a.model,d=this;if(c.id){var e=this.getQueueCode(c),f=!1,g=!1,b=b.filter(function(a){return d.getQueueCode(a)==e});0c?"0"+c:c);b.push(10>d?"0"+d:d);e(this).html(b.join(":"))}})}})(Mibew,jQuery); diff --git a/src/messenger/mibew/js/compiled/users/mibewapi_users_interaction.js b/src/messenger/mibew/js/compiled/users/mibewapi_users_interaction.js deleted file mode 100644 index 7c3956f5..00000000 --- a/src/messenger/mibew/js/compiled/users/mibewapi_users_interaction.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -MibewAPIUsersInteraction=function(){this.obligatoryArguments={"*":{agentId:null,"return":{},references:{}},result:{errorCode:0}};this.reservedFunctionNames=["result"]};MibewAPIUsersInteraction.prototype=new MibewAPIInteraction; diff --git a/src/messenger/mibew/js/compiled/users/model_views/agent.js b/src/messenger/mibew/js/compiled/users/model_views/agent.js deleted file mode 100644 index 3d4b1361..00000000 --- a/src/messenger/mibew/js/compiled/users/model_views/agent.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,c,d){b.Views.Agent=c.Marionette.ItemView.extend({template:d.templates.agent,tagName:"span",className:"agent",modelEvents:{change:"render"},initialize:function(){this.isModelLast=this.isModelFirst=!1},serializeData:function(){var a=this.model.toJSON();a.isFirst=this.isModelFirst;a.isLast=this.isModelLast;return a}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/mibew/js/compiled/users/model_views/no_threads.js b/src/messenger/mibew/js/compiled/users/model_views/no_threads.js deleted file mode 100644 index 1c5ed31d..00000000 --- a/src/messenger/mibew/js/compiled/users/model_views/no_threads.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b,c){a.Views.NoThreads=b.Marionette.ItemView.extend({template:c.templates.no_threads,initialize:function(a){this.tagName=a.tagName}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/mibew/js/compiled/users/model_views/no_visitors.js b/src/messenger/mibew/js/compiled/users/model_views/no_visitors.js deleted file mode 100644 index 2d2197fb..00000000 --- a/src/messenger/mibew/js/compiled/users/model_views/no_visitors.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b,c){a.Views.NoVisitors=b.Marionette.ItemView.extend({template:c.templates.no_visitors,initialize:function(a){this.tagName=a.tagName}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/mibew/js/compiled/users/model_views/queued_thread.js b/src/messenger/mibew/js/compiled/users/model_views/queued_thread.js deleted file mode 100644 index 780e832f..00000000 --- a/src/messenger/mibew/js/compiled/users/model_views/queued_thread.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright 2005-2013 the original author or authors. - - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(d,e){d.Views.QueuedThread=d.Views.CompositeBase.extend({template:e.templates.queued_thread,itemView:d.Views.Control,itemViewContainer:".thread-controls",className:"thread",modelEvents:{change:"render"},events:{"click .open-dialog":"openDialog","click .view-control":"viewDialog","click .track-control":"showTrack","click .ban-control":"showBan","click .geo-link":"showGeoInfo","click .first-message a":"showFirstMessage"},initialize:function(){this.lastStyles=[]},serializeData:function(){var a= -this.model,b=d.Objects.Models.page,c=a.toJSON();c.stateDesc=this.stateToDesc(a.get("state"));c.chatting=a.get("state")==a.STATE_CHATTING;c.tracked=b.get("showVisitors");c.firstMessage&&(c.firstMessagePreview=30= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var f=e.helperMissing,h=this.escapeExpression;c='';(a=e.name)?a=a.call(b,{hash:{},data:d}):(a=b.name,a="function"===typeof a?a.apply(b):a);c+=h(a);if((a=e.unless.call(b,b.isLast,{hash:{},inverse:this.noop, -fn:this.program(9,function(){return","},d),data:d}))||0===a)c+=a;return c});m.no_threads=l(function(c,b,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var f;c=e.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return b=''+(a((f=e.L10n||b.L10n,f?f.call(b,"clients.no_clients",d):c.call(b,"L10n","clients.no_clients",d)))+"")});m.no_visitors=l(function(c,b,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d|| -{};var f;c=e.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return b=''+(a((f=e.L10n||b.L10n,f?f.call(b,"visitors.no_visitors",d):c.call(b,"L10n","visitors.no_visitors",d)))+"")});m.queued_thread=l(function(c,b,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var f=e.helperMissing,h=this.escapeExpression;c='\n \n ";if((a=e["if"].call(b,b.firstMessage,{hash:{},inverse:this.noop,fn:this.program(7,function(a,b){var c,g;c='"},d),data:d}))||0===a)c+=a;c+='\n\n\n
\n ';if((a=e["if"].call(b,b.canOpen,{hash:{},inverse:this.noop,fn:this.program(9,function(a,c){var b,g;b={hash:{},data:c};return b='\n
\n ')},d),data:d}))||0===a)c+=a;c+="\n ";if((a=e["if"].call(b,b.canView,{hash:{},inverse:this.noop,fn:this.program(11,function(a,b){var c,g;c={hash:{},data:b};return c='\n
\n ')},d),data:d}))||0=== -a)c+=a;c+="\n ";if((a=e["if"].call(b,b.tracked,{hash:{},inverse:this.noop,fn:this.program(13,function(a,c){var b,g;b={hash:{},data:c};return b='\n
\n ')},d),data:d}))||0===a)c+=a;c+="\n ";if((a=e["if"].call(b,b.canBan,{hash:{},inverse:this.noop,fn:this.program(15,function(a,b){var c,g;c={hash:{},data:b}; -return c='\n
\n ')},d),data:d}))||0===a)c+=a;c+='\n
\n
\n\n';if((a=e["if"].call(b,b.userIp,{hash:{},inverse:this.program(19,function(a,c){var b;(b=e.remote)?b=b.call(a,{hash:{},data:c}):(b=a.remote,b="function"===typeof b?b.apply(a):b);return h(b)}, -d),fn:this.program(17,function(a,b){var c,g;c='';(g=e.remote)?g=g.call(a,{hash:{},data:b}):(g=a.remote,g="function"===typeof g?g.apply(a):g);return c+=h(g)+""},d),data:d}))||0===a)c+=a;c+='\n';(a=e.stateDesc)?a=a.call(b,{hash:{},data:d}):(a=b.stateDesc,a="function"===typeof a?a.apply(b):a);c+=h(a)+'\n';(a=e.agentName)?a=a.call(b,{hash:{},data:d}):(a=b.agentName,a="function"===typeof a? -a.apply(b):a);c+=h(a)+'\n\n';if((a=e.unless.call(b,b.chatting,{hash:{},inverse:this.program(23,function(){return"-"},d),fn:this.program(21,function(a,b){var c,g;c=''},d),data:d}))||0===a)c+=a;c+='\n';if((a=e["if"].call(b,b.ban,{hash:{},inverse:this.program(27,function(a,b){var c;(c=e.userAgent)?c=c.call(a,{hash:{},data:b}):(c=a.userAgent,c="function"===typeof c?c.apply(a):c);return h(c)},d),fn:this.program(25,function(a){var c;return h((c=(c=a.ban,null==c||!1===c?c:c.reason),"function"===typeof c?c.apply(a):c))},d),data:d}))||0===a)c+=a;return c+""});m.status_panel=l(function(c,b,e,a,d){this.compilerInfo= -[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var f,h=e.helperMissing,j=this.escapeExpression;c='
';(a=e.message)?a=a.call(b,{hash:{},data:d}):(a=b.message,a="function"===typeof a?a.apply(b):a);c+=j(a);if((f=e["if"].call(b,(a=b.agent,null==a||!1===a?a:a.away),{hash:{},inverse:this.program(3,function(a,c){var b,d;d={hash:{},data:c};return j((b=e.L10n||a.L10n,b?b.call(a,"pending.status.online",d):h.call(a,"L10n","pending.status.online",d)))},d),fn:this.program(1,function(a,c){var b, -d;d={hash:{},data:c};return j((b=e.L10n||a.L10n,b?b.call(a,"pending.status.away",d):h.call(a,"L10n","pending.status.away",d)))},d),data:d}))||0===f)c+=f;c+='
"});m.threads_collection=l(function(c,b,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var f,h=e.helperMissing,j=this.escapeExpression;a={hash:{},data:d};c='\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
'+(j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.name", -a):h.call(b,"L10n","pending.table.head.name",a)))+"");a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.actions",a):h.call(b,"L10n","pending.table.head.actions",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.contactid",a):h.call(b,"L10n","pending.table.head.contactid",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.state",a):h.call(b,"L10n","pending.table.head.state", -a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.operator",a):h.call(b,"L10n","pending.table.head.operator",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.total",a):h.call(b,"L10n","pending.table.head.total",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.waittime",a):h.call(b,"L10n","pending.table.head.waittime",a)))+"";a={hash:{},data:d}; -return c+=j((f=e.L10n||b.L10n,f?f.call(b,"pending.table.head.etc",a):h.call(b,"L10n","pending.table.head.etc",a)))+'
'});m.visitor=l(function(c,b,e,a,d){function f(){return"-"}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var h,j=e.helperMissing,k=this.escapeExpression;c='\n ';if((a=e.unless.call(b,b.invitationInfo,{hash:{},inverse:this.program(3,function(a,c){var b;(b=e.userName)? -b=b.call(a,{hash:{},data:c}):(b=a.userName,b="function"===typeof b?b.apply(a):b);return k(b)},d),fn:this.program(1,function(a,b){var c,d;c={hash:{},data:b};c='');(d=e.userName)?d=d.call(a,{hash:{},data:b}):(d=a.userName,d="function"===typeof d?d.apply(a):d);return c+=k(d)+""},d),data:d}))||0===a)c+=a;h={hash:{},data:d};c=c+'\n\n\n
\n
\n
\n
\n\n');if((a=e["if"].call(b,b.userIp,{hash:{},inverse:this.program(7,function(a,c){var b;(b=e.remote)?b=b.call(a,{hash:{},data:c}):(b=a.remote,b="function"===typeof b?b.apply(a):b);return k(b)},d),fn:this.program(5,function(a,b){var c,d;c=''; -(d=e.remote)?d=d.call(a,{hash:{},data:b}):(d=a.remote,d="function"===typeof d?d.apply(a):d);return c+=k(d)+""},d),data:d}))||0===a)c+=a;c+='\n\n\n';if((a=e["if"].call(b,b.invitationInfo,{hash:{},inverse:this.program(11,f,d),fn:this.program(9,function(a){var b;return k((b=(b=a.invitationInfo,null==b||!1===b?b:b.agentName),"function"===typeof b?b.apply(a):b))},d),data:d}))||0===a)c+=a;c+='\n';if((a=e["if"].call(b,b.invitationInfo,{hash:{},inverse:this.program(11,f,d),fn:this.program(13,function(a){var b;return a=""+('')},d),data:d}))||0===a)c+=a;c+='\n';(a=e.invitations)?a=a.call(b,{hash:{},data:d}):(a=b.invitations,a="function"===typeof a?a.apply(b):a);c+=k(a)+" / ";(a=e.chats)?a=a.call(b,{hash:{},data:d}):(a=b.chats,a="function"===typeof a?a.apply(b):a);c+=k(a)+'\n';(a=e.userAgent)?a=a.call(b,{hash:{},data:d}):(a=b.userAgent,a="function"===typeof a?a.apply(b):a);return c+=k(a)+""}); -m.visitors_collection=l(function(c,b,e,a,d){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=d||{};var f,h=e.helperMissing,j=this.escapeExpression;a={hash:{},data:d};c='\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
'+(j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.name",a):h.call(b,"L10n","visitors.table.head.name",a)))+"");a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.actions",a):h.call(b,"L10n", -"visitors.table.head.actions",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.contactid",a):h.call(b,"L10n","visitors.table.head.contactid",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.firsttimeonsite",a):h.call(b,"L10n","visitors.table.head.firsttimeonsite",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.lasttimeonsite",a):h.call(b,"L10n","visitors.table.head.lasttimeonsite", -a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.invited.by",a):h.call(b,"L10n","visitors.table.head.invited.by",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.invitationtime",a):h.call(b,"L10n","visitors.table.head.invitationtime",a)))+"";a={hash:{},data:d};c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.invitations",a):h.call(b,"L10n","visitors.table.head.invitations",a)))+""; -a={hash:{},data:d};return c+=j((f=e.L10n||b.L10n,f?f.call(b,"visitors.table.head.etc",a):h.call(b,"L10n","visitors.table.head.etc",a)))+'
'})})(); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(b,e){b.Regions={};b.Popup={};b.Popup.open=function(a,c,d){c=c.replace(/[^A-z0-9_]+/g,"");a=window.open(a,c,d);a.focus();a.opener=window};b.Utils.updateTimers=function(a,c){a.find(c).each(function(){var d=e(this).data("timestamp");if(d){var a=Math.round((new Date).getTime()/1E3)-d,d=a%60,c=Math.floor(a/60)%60,a=Math.floor(a/3600),b=[];0c?"0"+c:c);b.push(10>d?"0"+d:d);e(this).html(b.join(":"))}})}})(Mibew,jQuery); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -MibewAPIUsersInteraction=function(){this.obligatoryArguments={"*":{agentId:null,"return":{},references:{}},result:{errorCode:0}};this.reservedFunctionNames=["result"]};MibewAPIUsersInteraction.prototype=new MibewAPIInteraction; -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,b){a.Models.Agent=a.Models.User.extend({defaults:b.extend({},a.Models.User.prototype.defaults,{id:null,isAgent:!0,away:!1}),away:function(){this.setAvailability(!1)},available:function(){this.setAvailability(!0)},setAvailability:function(c){var b=this;a.Objects.server.callFunctions([{"function":c?"available":"away",arguments:{agentId:this.id,references:{},"return":{}}}],function(a){0==a.errorCode&&b.set({away:!c})},!0)}})})(Mibew,_); -/* - Copyright 2005-2013 the original author or authors. - Licensed under the Apache License, Version 2.0 (the "License"). - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -*/ -(function(a,c){var b=[],f=a.Models.QueuedThread=a.Models.Thread.extend({defaults:c.extend({},a.Models.Thread.prototype.defaults,{controls:null,userName:"",userIp:"",remote:"",userAgent:"",agentName:"",canOpen:!1,canView:!1,canBan:!1,ban:!1,totalTime:0,waitingTime:0,firstMessage:null}),initialize:function(){for(var e=[],b=f.getControls(),d=0,c=b.length;d