From 5d728ed7fd244b921c529d023d35dc7ffc4e0439 Mon Sep 17 00:00:00 2001 From: "Fedor A. Fetisov" Date: Sat, 14 Sep 2013 20:32:58 +0400 Subject: [PATCH] Completely wiped out the old application name --- src/messenger/webim/b.php | 2 +- src/messenger/webim/client.php | 4 +- .../images/{webimlogo.gif => mibewlogo.gif} | Bin src/messenger/webim/install/dbinfo.php | 4 +- src/messenger/webim/install/dbperform.php | 2 +- src/messenger/webim/install/index.php | 46 ++++----- src/messenger/webim/js/165/chat.js | 6 +- src/messenger/webim/js/165/update.js | 18 ++-- src/messenger/webim/js/165/users.js | 12 +-- src/messenger/webim/js/source/build.xml | 4 +- src/messenger/webim/js/source/chat.js | 6 +- src/messenger/webim/js/source/users.js | 14 +-- src/messenger/webim/libs/chat.php | 28 +++--- src/messenger/webim/libs/common.php | 58 +++++------ src/messenger/webim/libs/config.php | 10 +- src/messenger/webim/libs/demothread.php | 10 +- src/messenger/webim/libs/expand.php | 8 +- src/messenger/webim/libs/getcode.php | 8 +- src/messenger/webim/libs/groups.php | 6 +- src/messenger/webim/libs/notify.php | 10 +- src/messenger/webim/libs/operator.php | 20 ++-- .../webim/libs/operator_settings.php | 16 +-- src/messenger/webim/libs/pagination.php | 4 +- src/messenger/webim/libs/settings.php | 10 +- .../button/{webim_off.gif => mibew_off.gif} | Bin .../ar/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../be/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../bg/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../ca/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../cs/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../da/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../de/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../el/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../en/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../fa/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../fi/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../fr/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../he/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../hr/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../hu/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../id/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../it/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../lv/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../nl/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../pl/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../ro/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../ru/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../sp/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../sv/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../th/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../tr/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../ua/button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../button/{webim_on.gif => mibew_on.gif} | Bin .../button/{webim_off.gif => mibew_off.gif} | Bin .../button/{webim_on.gif => mibew_on.gif} | Bin src/messenger/webim/mail.php | 2 +- src/messenger/webim/operator/agent.php | 2 +- src/messenger/webim/operator/avatar.php | 6 +- src/messenger/webim/operator/ban.php | 2 +- src/messenger/webim/operator/blocked.php | 2 +- src/messenger/webim/operator/canned.php | 2 +- src/messenger/webim/operator/features.php | 2 +- src/messenger/webim/operator/getcode.php | 2 +- src/messenger/webim/operator/group.php | 4 +- src/messenger/webim/operator/groupmembers.php | 2 +- src/messenger/webim/operator/groups.php | 2 +- src/messenger/webim/operator/history.php | 2 +- src/messenger/webim/operator/index.php | 8 +- src/messenger/webim/operator/login.php | 6 +- src/messenger/webim/operator/logout.php | 2 +- src/messenger/webim/operator/operator.php | 6 +- src/messenger/webim/operator/operators.php | 2 +- src/messenger/webim/operator/opgroups.php | 2 +- src/messenger/webim/operator/performance.php | 2 +- src/messenger/webim/operator/permissions.php | 2 +- src/messenger/webim/operator/restore.php | 2 +- src/messenger/webim/operator/settings.php | 2 +- src/messenger/webim/operator/themes.php | 6 +- src/messenger/webim/operator/translate.php | 10 +- src/messenger/webim/operator/update.php | 12 +-- .../webim/styles/default/templates/chat.tpl | 86 ++++++++-------- .../styles/default/templates/chatsimple.tpl | 46 ++++----- .../webim/styles/default/templates/error.tpl | 22 ++--- .../styles/default/templates/leavemessage.tpl | 26 ++--- .../default/templates/leavemessagesent.tpl | 22 ++--- .../webim/styles/default/templates/mail.tpl | 32 +++--- .../styles/default/templates/mailsent.tpl | 22 ++--- .../webim/styles/default/templates/nochat.tpl | 22 ++--- .../styles/default/templates/redirect.tpl | 22 ++--- .../styles/default/templates/redirected.tpl | 22 ++--- .../webim/styles/default/templates/survey.tpl | 26 ++--- .../webim/styles/original/templates/chat.tpl | 92 +++++++++--------- .../styles/original/templates/chatsimple.tpl | 46 ++++----- .../webim/styles/original/templates/error.tpl | 26 ++--- .../original/templates/leavemessage.tpl | 30 +++--- .../original/templates/leavemessagesent.tpl | 26 ++--- .../webim/styles/original/templates/mail.tpl | 26 ++--- .../styles/original/templates/mailsent.tpl | 26 ++--- .../styles/original/templates/nochat.tpl | 26 ++--- .../styles/original/templates/redirect.tpl | 28 +++--- .../styles/original/templates/redirected.tpl | 26 ++--- .../styles/original/templates/survey.tpl | 30 +++--- .../webim/styles/silver/templates/chat.tpl | 52 +++++----- .../webim/styles/silver/templates/error.tpl | 20 ++-- .../styles/silver/templates/leavemessage.tpl | 22 ++--- .../silver/templates/leavemessagesent.tpl | 20 ++-- .../webim/styles/silver/templates/mail.tpl | 22 ++--- .../styles/silver/templates/mailsent.tpl | 20 ++-- .../webim/styles/silver/templates/nochat.tpl | 20 ++-- .../styles/silver/templates/redirect.tpl | 20 ++-- .../styles/silver/templates/redirected.tpl | 20 ++-- .../webim/styles/silver/templates/survey.tpl | 22 ++--- .../styles/simplicity/templates/chat.tpl | 14 +-- .../simplicity/templates/chatsimple.tpl | 8 +- .../styles/simplicity/templates/error.tpl | 2 +- .../simplicity/templates/leavemessage.tpl | 4 +- .../simplicity/templates/leavemessagesent.tpl | 2 +- .../styles/simplicity/templates/mail.tpl | 4 +- .../styles/simplicity/templates/mailsent.tpl | 2 +- .../styles/simplicity/templates/nochat.tpl | 2 +- .../styles/simplicity/templates/redirect.tpl | 2 +- .../simplicity/templates/redirected.tpl | 2 +- .../styles/simplicity/templates/survey.tpl | 4 +- src/messenger/webim/thread.php | 2 +- src/messenger/webim/view/agent.php | 6 +- src/messenger/webim/view/agents.php | 14 +-- src/messenger/webim/view/avatar.php | 8 +- src/messenger/webim/view/ban.php | 6 +- src/messenger/webim/view/blocked_visitors.php | 12 +-- src/messenger/webim/view/canned.php | 16 +-- src/messenger/webim/view/cannededit.php | 6 +- src/messenger/webim/view/confirm.php | 10 +- src/messenger/webim/view/features.php | 10 +- src/messenger/webim/view/getcode_image.php | 4 +- src/messenger/webim/view/getcode_text.php | 4 +- src/messenger/webim/view/group.php | 6 +- src/messenger/webim/view/groupmembers.php | 6 +- src/messenger/webim/view/groups.php | 16 +-- src/messenger/webim/view/inc_errors.php | 2 +- src/messenger/webim/view/inc_locales.php | 2 +- src/messenger/webim/view/inc_main.php | 10 +- src/messenger/webim/view/inc_menu.php | 36 +++---- src/messenger/webim/view/install_err.php | 2 +- src/messenger/webim/view/install_index.php | 12 +-- src/messenger/webim/view/license.php | 2 +- src/messenger/webim/view/login.php | 8 +- src/messenger/webim/view/menu.php | 66 ++++++------- src/messenger/webim/view/notification.php | 4 +- src/messenger/webim/view/notifications.php | 10 +- src/messenger/webim/view/operator_groups.php | 6 +- src/messenger/webim/view/pending_users.php | 12 +-- src/messenger/webim/view/performance.php | 6 +- src/messenger/webim/view/permissions.php | 6 +- src/messenger/webim/view/resetpwd.php | 14 +-- src/messenger/webim/view/restore.php | 10 +- src/messenger/webim/view/settings.php | 6 +- src/messenger/webim/view/statistics.php | 6 +- src/messenger/webim/view/themes.php | 4 +- src/messenger/webim/view/thread_log.php | 4 +- src/messenger/webim/view/thread_search.php | 8 +- src/messenger/webim/view/translate.php | 6 +- src/messenger/webim/view/translatelist.php | 6 +- src/messenger/webim/view/updates.php | 10 +- src/messenger/webim/view/userhistory.php | 4 +- 195 files changed, 900 insertions(+), 900 deletions(-) rename src/messenger/webim/images/{webimlogo.gif => mibewlogo.gif} (100%) rename src/messenger/webim/locales/ar/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/ar/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/be/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/be/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/bg/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/bg/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/ca/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/ca/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/cs/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/cs/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/da/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/da/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/de/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/de/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/el/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/el/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/en/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/en/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/fa/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/fa/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/fi/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/fi/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/fr/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/fr/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/he/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/he/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/hr/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/hr/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/hu/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/hu/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/id/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/id/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/it/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/it/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/lv/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/lv/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/nl/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/nl/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/pl/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/pl/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/pt-br/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/pt-br/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/pt-pt/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/pt-pt/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/ro/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/ro/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/ru/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/ru/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/sp/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/sp/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/sv/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/sv/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/th/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/th/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/tr/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/tr/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/ua/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/ua/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/zh-cn/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/zh-cn/button/{webim_on.gif => mibew_on.gif} (100%) rename src/messenger/webim/locales/zh-tw/button/{webim_off.gif => mibew_off.gif} (100%) rename src/messenger/webim/locales/zh-tw/button/{webim_on.gif => mibew_on.gif} (100%) diff --git a/src/messenger/webim/b.php b/src/messenger/webim/b.php index bbee8c83..f541651f 100644 --- a/src/messenger/webim/b.php +++ b/src/messenger/webim/b.php @@ -31,7 +31,7 @@ if($referer && isset($_SESSION['threadid'])) { mysql_close($link); } -$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "webim"); +$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew"); $lang = verifyparam(isset($_GET['language']) ? "language" : "lang", "/^[\w-]{2,5}$/", ""); if(!$lang || !locale_pattern_check($lang) || !locale_exists($lang)) { $lang = $current_locale; diff --git a/src/messenger/webim/client.php b/src/messenger/webim/client.php index e55c50bf..371241d2 100644 --- a/src/messenger/webim/client.php +++ b/src/messenger/webim/client.php @@ -79,7 +79,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) { if($settings['usercanchangename'] == "1" && isset($_POST['name'])) { $newname = getparam("name"); if($newname != $visitor['name']) { - $data = strtr(base64_encode(myiconv($webim_encoding,"utf-8",$newname)), '+/=', '-_,'); + $data = strtr(base64_encode(myiconv($mibew_encoding,"utf-8",$newname)), '+/=', '-_,'); setcookie($namecookie, $data, time()+60*60*24*365); $visitor['name'] = $newname; } @@ -151,7 +151,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) { $token = $thread['ltoken']; $level = get_remote_level($_SERVER['HTTP_USER_AGENT']); $chatstyle = verifyparam( "style", "/^\w+$/", ""); - header("Location: $webimroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : "")); + header("Location: $mibewroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : "")); exit; } diff --git a/src/messenger/webim/images/webimlogo.gif b/src/messenger/webim/images/mibewlogo.gif similarity index 100% rename from src/messenger/webim/images/webimlogo.gif rename to src/messenger/webim/images/mibewlogo.gif diff --git a/src/messenger/webim/install/dbinfo.php b/src/messenger/webim/install/dbinfo.php index 3a81f382..d72bccb3 100644 --- a/src/messenger/webim/install/dbinfo.php +++ b/src/messenger/webim/install/dbinfo.php @@ -141,10 +141,10 @@ $dbtables_can_update = array( function show_install_err($text) { - global $page, $version, $errors, $webimroot; + global $page, $version, $errors, $mibewroot; $page = array( 'version' => $version, - 'localeLinks' => get_locale_links("$webimroot/install/index.php") + 'localeLinks' => get_locale_links("$mibewroot/install/index.php") ); $errors = array($text); start_html_output(); diff --git a/src/messenger/webim/install/dbperform.php b/src/messenger/webim/install/dbperform.php index b13f7a62..1f566104 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -163,6 +163,6 @@ if ($act == "silentcreateall") { } mysql_close($link); -header("Location: $webimroot/install/index.php"); +header("Location: $mibewroot/install/index.php"); exit; ?> diff --git a/src/messenger/webim/install/index.php b/src/messenger/webim/install/index.php index de6e6c4c..197b6630 100644 --- a/src/messenger/webim/install/index.php +++ b/src/messenger/webim/install/index.php @@ -21,7 +21,7 @@ require_once('dbinfo.php'); $page = array( 'version' => $version, - 'localeLinks' => get_locale_links("$webimroot/install/index.php") + 'localeLinks' => get_locale_links("$mibewroot/install/index.php") ); $page['done'] = array(); @@ -30,9 +30,9 @@ $page['nextnotice'] = false; $page['soundcheck'] = false; $errors = array(); -function check_webimroot() +function check_mibewroot() { - global $page, $errors, $webimroot; + global $page, $errors, $mibewroot; $requestUri = $_SERVER["REQUEST_URI"]; if (!preg_match('/^(.*)\\/install(\\/[^\\/\\\\]*)?$/', $requestUri, $matches)) { $errors[] = "Cannot detect application location: $requestUri"; @@ -40,9 +40,9 @@ function check_webimroot() } $applocation = $matches[1]; - if ($applocation != $webimroot) { - $errors[] = "Please, check file ${applocation}/libs/config.php
Wrong value of \$webimroot variable, should be \"$applocation\""; - $webimroot = $applocation; + if ($applocation != $mibewroot) { + $errors[] = "Please, check file ${applocation}/libs/config.php
Wrong value of \$mibewroot variable, should be \"$applocation\""; + $mibewroot = $applocation; return false; } @@ -87,12 +87,12 @@ function fpermissions($file) function check_files() { - global $page, $errors, $webimroot; + global $page, $errors, $mibewroot; $packageFile = dirname(__FILE__) . "/package"; $fp = @fopen($packageFile, "r"); if ($fp === FALSE) { - $errors[] = getlocal2("install.cannot_read", array("$webimroot/install/package")); + $errors[] = getlocal2("install.cannot_read", array("$mibewroot/install/package")); if (file_exists($packageFile)) { $errors[] = getlocal2("install.check_permissions", array(fpermissions($packageFile))); } @@ -113,10 +113,10 @@ function check_files() $relativeName = dirname(__FILE__) . "/../$file"; if (!is_readable($relativeName)) { if (file_exists($relativeName)) { - $errors[] = getlocal2("install.cannot_read", array("$webimroot/$file")); + $errors[] = getlocal2("install.cannot_read", array("$mibewroot/$file")); $errors[] = getlocal2("install.check_permissions", array(fpermissions($relativeName))); } else { - $errors[] = getlocal2("install.no_file", array("$webimroot/$file")); + $errors[] = getlocal2("install.no_file", array("$mibewroot/$file")); } return false; } @@ -127,7 +127,7 @@ function check_files() $result = md5(str_replace("\r", "", file_get_contents($relativeName))); } if ($result != $sum) { - $errors[] = getlocal2("install.bad_checksum", array("$webimroot/$file")); + $errors[] = getlocal2("install.bad_checksum", array("$mibewroot/$file")); $errors[] = getlocal("install.check_files"); return false; } @@ -140,7 +140,7 @@ function check_files() function check_connection() { - global $mysqlhost, $mysqllogin, $mysqlpass, $page, $errors, $webimroot; + global $mysqlhost, $mysqllogin, $mysqlpass, $page, $errors, $mibewroot; $link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass); if ($link) { $result = mysql_query("SELECT VERSION() as c", $link); @@ -161,7 +161,7 @@ function check_connection() function check_database($link) { - global $mysqldb, $force_charset_in_connection, $dbencoding, $page, $webimroot; + 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) { @@ -171,14 +171,14 @@ function check_database($link) } else { $page['nextstep'] = getlocal2("install.2.create", array($mysqldb)); $page['nextnotice'] = getlocal("install.2.notice"); - $page['nextstepurl'] = "$webimroot/install/dbperform.php?act=createdb"; + $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=createdb"; } return false; } function check_tables($link) { - global $dbtables, $page, $webimroot; + global $dbtables, $page, $mibewroot; $curr_tables = get_tables($link); if ($curr_tables !== false) { $tocreate = array_diff(array_keys($dbtables), $curr_tables); @@ -187,7 +187,7 @@ function check_tables($link) return true; } else { $page['nextstep'] = getlocal("install.3.create"); - $page['nextstepurl'] = "$webimroot/install/dbperform.php?act=ct"; + $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=ct"; } } return false; @@ -195,7 +195,7 @@ function check_tables($link) function check_columns($link) { - global $dbtables, $dbtables_can_update, $errors, $page, $webimroot; + global $dbtables, $dbtables_can_update, $errors, $page, $mibewroot; $need_to_create_columns = false; foreach ($dbtables as $id => $columns) { @@ -209,7 +209,7 @@ function check_columns($link) 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'] = "$webimroot/install/dbperform.php?act=dt"; + $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=dt"; $page['nextnotice'] = getlocal("install.kill_tables.notice"); return false; } @@ -219,7 +219,7 @@ function check_columns($link) if ($need_to_create_columns) { $page['nextstep'] = getlocal("install.4.create"); - $page['nextstepurl'] = "$webimroot/install/dbperform.php?act=addcolumns"; + $page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=addcolumns"; $page['nextnotice'] = getlocal("install.4.notice"); return false; } @@ -254,11 +254,11 @@ function check_admin($link) function check_status() { - global $page, $webimroot, $settings, $dbversion; + global $page, $mibewroot, $settings, $dbversion; $page['done'][] = getlocal2("install.0.php", array(phpversion())); - if (!check_webimroot()) { + if (!check_mibewroot()) { return; } @@ -292,8 +292,8 @@ function check_status() if (!check_admin($link)) { $page['nextstep'] = getlocal("installed.login_link"); - $page['nextnotice'] = getlocal2("installed.notice", array("${webimroot}/install/")); - $page['nextstepurl'] = "$webimroot/operator/login.php?login=admin"; + $page['nextnotice'] = getlocal2("installed.notice", array("${mibewroot}/install/")); + $page['nextstepurl'] = "$mibewroot/operator/login.php?login=admin"; } $page['show_small_login'] = true; diff --git a/src/messenger/webim/js/165/chat.js b/src/messenger/webim/js/165/chat.js index 8980b718..6dc313b7 100644 --- a/src/messenger/webim/js/165/chat.js +++ b/src/messenger/webim/js/165/chat.js @@ -14,11 +14,11 @@ Class.inherit(Ajax.ChatThreadUpdater,Ajax.Base,{initialize:function(a){this.setO update:function(){this.updateOptions("refresh");this.updater=new Ajax.Request(this._options.servl,this._options)},requestComplete:function(a){try{this.enableInput(!0);this.cansend=!0;var b=Ajax.getXml(a);b&&"thread"==b.tagName?this.updateContent(b):this.handleError(a,b,"refresh messages failed")}catch(c){}this.skipNextsound=!1;this.timer=setTimeout(this.update.bind(this),1E3*this.frequency)},postMessage:function(a){if(""!=a&&this.cansend){this.cansend=!1;this.stopUpdate();this.skipNextsound=!0;this.updateOptions("post"); var b={}.extend(this._options);b.parameters+="&message="+encodeURIComponent(a);b.onComplete=function(a){this.requestComplete(a);this._options.message&&(this._options.message.value="",this._options.message.focus())}.bind(this);"opera"!=myRealAgent&&this.enableInput(!1);this.updater=new Ajax.Request(this._options.servl,b)}},changeName:function(a){this.skipNextsound=!0;new Ajax.Request(this._options.servl,{parameters:"act=rename&thread="+(this._options.threadid||0)+"&token="+(this._options.token||0)+ "&name="+encodeURIComponent(a)})},onThreadClosed:function(a){var b=Ajax.getXml(a);b&&"closed"==b.tagName?setTimeout("window.close()",2E3):this.handleError(a,b,"cannot close")},closeThread:function(){var a="act=close&thread="+(this._options.threadid||0)+"&token="+(this._options.token||0);this._options.user&&(a+="&user=true");new Ajax.Request(this._options.servl,{parameters:a,onComplete:this.onThreadClosed.bind(this)})},processMessage:function(a,b){var c=NodeUtils.getNodeText(b);FrameUtils.insertIntoFrame(a, -c)},showTyping:function(a){$("typingdiv")&&($("typingdiv").style.display=a?"inline":"none")},setupAvatar:function(a){a=NodeUtils.getNodeText(a);this._options.avatar&&this._options.user&&(this._options.avatar.innerHTML=""!=a?'':"")},updateContent:function(a){var b=!1,c=this._options.container,d=NodeUtils.getAttrValue(a,"lastid");d&&(this._options.lastid=d);(d=NodeUtils.getAttrValue(a, +c)},showTyping:function(a){$("typingdiv")&&($("typingdiv").style.display=a?"inline":"none")},setupAvatar:function(a){a=NodeUtils.getNodeText(a);this._options.avatar&&this._options.user&&(this._options.avatar.innerHTML=""!=a?'':"")},updateContent:function(a){var b=!1,c=this._options.container,d=NodeUtils.getAttrValue(a,"lastid");d&&(this._options.lastid=d);(d=NodeUtils.getAttrValue(a, "typing"))&&this.showTyping("1"==d);(d=NodeUtils.getAttrValue(a,"canpost"))&&("1"==d&&!this.ownThread||this.ownThread&&"1"!=d)&&(window.location.href=window.location.href);for(d=0;d" + window.webimNews[i].title + ", " + window.webimNews[i].date + ""; - str += "
" + window.webimNews[i].message+"
"; + for (var i = 0; i < window.mibewNews.length; i++) { + str += "
" + window.mibewNews[i].title + ", " + window.mibewNews[i].date + "
"; + str += "
" + window.mibewNews[i].message+"
"; } $("#news").html(str + ""); } function loadVersion() { - if(typeof(window.webimLatest) == "undefined" || typeof(window.webimLatest.version) == "undefined") + if(typeof(window.mibewLatest) == "undefined" || typeof(window.mibewLatest.version) == "undefined") return; var current = $("#cver").html(); - if(current != window.webimLatest.version) { - if(current < window.webimLatest.version) { + if(current != window.mibewLatest.version) { + if(current < window.mibewLatest.version) { $("#cver").css("color","red"); } - $("#lver").html(window.webimLatest.version+", Download "+window.webimLatest.title+""); + $("#lver").html(window.mibewLatest.version+", Download "+window.mibewLatest.title+""); } else { $("#cver").css("color","green"); - $("#lver").html(window.webimLatest.version); + $("#lver").html(window.mibewLatest.version); } } diff --git a/src/messenger/webim/js/165/users.js b/src/messenger/webim/js/165/users.js index cacc18c4..7ececf67 100644 --- a/src/messenger/webim/js/165/users.js +++ b/src/messenger/webim/js/165/users.js @@ -10,9 +10,9 @@ Class.inherit(Ajax.PeriodicalUpdater,Ajax.Base,{initialize:function(a){this.setO 1E3)},handleTimeout:function(a){this._options.handleError&&this._options.handleError("timeout, reconnecting");this.stopUpdate();this.timer=setTimeout(this.update.bind(this),1E3)},stopUpdate:function(){this.updater._options&&(this.updater._options.onComplete=void 0);clearTimeout(this.timer)},update:function(){this._options.updateParams&&(this._options.parameters=this._options.updateParams());this.updater=new Ajax.Request(this._options.url,this._options)},requestComplete:function(a){try{var b=Ajax.getXml(a); b?(this._options.updateContent||Ajax.emptyFunction)(b):this._options.handleError&&this._options.handleError("reconnecting")}catch(c){}this.timer=setTimeout(this.update.bind(this),1E3*this.frequency)}}); var HtmlGenerationUtils={popupLink:function(a,b,c,d,e,m,l){return'"+d+""},generateOneRowTable:function(a){return''+a+"
"},viewOpenCell:function(a,b,c,d,e,m,l,p){m= -2;b=b+"?thread="+c;var f="",f=e||d?f+HtmlGenerationUtils.popupLink(p||!d?b:b+"&viewonly=true",localized[e?0:1],"ImCenter"+c,a,640,480,null):f+(''+a+""),f=f+"";e&&(f=f+''+HtmlGenerationUtils.popupLink(b,localized[0],"ImCenter"+c,''+localized[0]+'',640,480,null),f+="",m++);d&&(f+='',f+=HtmlGenerationUtils.popupLink(b+"&viewonly=true",localized[1],"ImCenter"+ -c,''+localized[1]+'',640,480,null),f+="",m++);""!=l&&(f+='',f+=30");return HtmlGenerationUtils.generateOneRowTable(f)},banCell:function(a,b){return''+HtmlGenerationUtils.popupLink(webimRoot+"/operator/ban.php?"+ -(b?"id="+b:"thread="+a),localized[2],"ban"+a,''+localized[2]+'',720,480,null)+""}};Ajax.ThreadListUpdater=Class.create(); +2;b=b+"?thread="+c;var f="",f=e||d?f+HtmlGenerationUtils.popupLink(p||!d?b:b+"&viewonly=true",localized[e?0:1],"ImCenter"+c,a,640,480,null):f+(''+a+""),f=f+"";e&&(f=f+''+HtmlGenerationUtils.popupLink(b,localized[0],"ImCenter"+c,''+localized[0]+'',640,480,null),f+="",m++);d&&(f+='',f+=HtmlGenerationUtils.popupLink(b+"&viewonly=true",localized[1],"ImCenter"+ +c,''+localized[1]+'',640,480,null),f+="",m++);""!=l&&(f+='',f+=30");return HtmlGenerationUtils.generateOneRowTable(f)},banCell:function(a,b){return''+HtmlGenerationUtils.popupLink(mibewRoot+"/operator/ban.php?"+ +(b?"id="+b:"thread="+a),localized[2],"ban"+a,''+localized[2]+'',720,480,null)+""}};Ajax.ThreadListUpdater=Class.create(); Class.inherit(Ajax.ThreadListUpdater,Ajax.Base,{initialize:function(a){this.setOptions(a);this._options.updateParams=this.updateParams.bind(this);this._options.handleError=this.handleError.bind(this);this._options.updateContent=this.updateContent.bind(this);this._options.lastrevision=0;this.threadTimers={};this.delta=0;this.t=this._options.table;this.periodicalUpdater=new Ajax.PeriodicalUpdater(this._options)},updateParams:function(){return"since="+this._options.lastrevision+"&status="+this._options.istatus+ (this._options.showonline?"&showonline=1":"")},setStatus:function(a){this._options.status.innerHTML=a},handleError:function(a){this.setStatus(a)},updateThread:function(a){function b(a,b,c,d){if(a=CommonUtils.getCell(c,b,a))a.innerHTML=d}for(var c,d,e,m=!1,l=!1,p=!1,f=null,q=null,g=0;g"+NodeUtils.getNodeValue(a,"useragent")+"";null!=f&&(r=""+NodeUtils.getNodeValue(a, @@ -21,7 +21,7 @@ this._options.agentservl,c,m,l,f,w,"chat"!=d)),CommonUtils.insertCell(g,"contid" [s,t,d],g.className="blocked"==f&&"chat"!=d?"ban":"in"+d,b(this.t,g,"name",HtmlGenerationUtils.viewOpenCell(n,this._options.agentservl,c,m,l,f,w,"chat"!=d)),b(this.t,g,"contid",u),b(this.t,g,"state",e),b(this.t,g,"op",v),b(this.t,g,"time",this.getTimeSince(s)),b(this.t,g,"wait","chat"!=d?this.getTimeSince(t):"-"),b(this.t,g,"etc",r);return!1}},updateQueueMessages:function(){function a(a,b){var c=$(b),l=$(b+"end");return null==c||null==l?!1:c.rowIndex+1a&&(a="0"+a);60<=b&&(c=Math.floor(b/60),b%=60,10>b&&(b="0"+b),c+=":");return c+b+":"+a},updateTimers:function(){for(var a in this.threadTimers)if(null!=this.threadTimers[a]){var b=this.threadTimers[a],c=CommonUtils.getRow("thr"+a,this.t);if(null!=c){var d=this.getTimeSince(b[0]), e=CommonUtils.getCell("time",c,this.t);e&&(e.innerHTML=d);b="chat"!=b[2]?this.getTimeSince(b[1]):"-";if(c=CommonUtils.getCell("wait",c,this.t))c.innerHTML=b}}},updateThreads:function(a){var b=!1,c=NodeUtils.getAttrValue(a,"time"),d=NodeUtils.getAttrValue(a,"revision");c&&(this.delta=(new Date).getTime()-c);d&&(this._options.lastrevision=d);for(c=0;c '+m}}b.innerHTML= +"Away":"Up to date");b&&(playSound(mibewRoot+"/sounds/new_user.wav"),window.focus(),updaterOptions.showpopup&&alert(localized[5]))},updateOperators:function(a){var b=$("onlineoperators");if(b){for(var c=[],d=0;d '+m}}b.innerHTML= c.join(", ")}},updateContent:function(a){if("update"==a.tagName)for(var b=0;b - + - + diff --git a/src/messenger/webim/js/source/chat.js b/src/messenger/webim/js/source/chat.js index 2eef7a7e..d13e6d83 100644 --- a/src/messenger/webim/js/source/chat.js +++ b/src/messenger/webim/js/source/chat.js @@ -198,7 +198,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { var imageLink = NodeUtils.getNodeText(avatar); if( this._options.avatar && this._options.user ) { this._options.avatar.innerHTML = imageLink != "" - ? "\"\"\"\"\"\"/" : ""; } @@ -253,7 +253,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, { if(!this.skipNextsound) { var tsound = $('soundimg'); if(tsound == null || tsound.className.match(new RegExp("\\bisound\\b")) ) { - playSound(Chat.webimRoot+'/sounds/new_message.wav'); + playSound(Chat.mibewRoot+'/sounds/new_message.wav'); } } if( !this.focused ) { @@ -391,7 +391,7 @@ Behaviour.register({ }); EventHelper.register(window, 'onload', function(){ - Chat.webimRoot = threadParams.wroot; + Chat.mibewRoot = threadParams.wroot; Chat.cssfile = threadParams.cssfile; Chat.threadUpdater = new Ajax.ChatThreadUpdater(({ignorectrl:-1,container:myRealAgent=='safari'?self.frames[0]:$("chatwnd"),avatar:$("avatarwnd"),message:$("msgwnd")}).extend( threadParams || {} )); }); \ No newline at end of file diff --git a/src/messenger/webim/js/source/users.js b/src/messenger/webim/js/source/users.js index fdcf9db3..a729058a 100644 --- a/src/messenger/webim/js/source/users.js +++ b/src/messenger/webim/js/source/users.js @@ -85,13 +85,13 @@ var HtmlGenerationUtils = { gen += ''; if( canopen ) { gen += ''; - gen += HtmlGenerationUtils.popupLink( link, localized[0], "ImCenter"+id, ''+localized[0]+'', 640, 480, null); + gen += HtmlGenerationUtils.popupLink( link, localized[0], "ImCenter"+id, ''+localized[0]+'', 640, 480, null); gen += ''; cellsCount++; } if( canview ) { gen += ''; - gen += HtmlGenerationUtils.popupLink( link+"&viewonly=true", localized[1], "ImCenter"+id, ''+localized[1]+'', 640, 480, null); + gen += HtmlGenerationUtils.popupLink( link+"&viewonly=true", localized[1], "ImCenter"+id, ''+localized[1]+'', 640, 480, null); gen += ''; cellsCount++; } @@ -104,7 +104,7 @@ var HtmlGenerationUtils = { }, banCell: function(id,banid){ return ''+ - HtmlGenerationUtils.popupLink( webimRoot+'/operator/ban.php?'+(banid ? 'id='+banid : 'thread='+id), localized[2], "ban"+id, ''+localized[2]+'', 720, 480, null)+ + HtmlGenerationUtils.popupLink( mibewRoot+'/operator/ban.php?'+(banid ? 'id='+banid : 'thread='+id), localized[2], "ban"+id, ''+localized[2]+'', 720, 480, null)+ ''; } }; @@ -301,7 +301,7 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { this.updateTimers(); this.setStatus(this._options.istatus ? "Away" : "Up to date"); if( newAdded ) { - playSound(webimRoot+'/sounds/new_user.wav'); + playSound(mibewRoot+'/sounds/new_user.wav'); window.focus(); if(updaterOptions.showpopup) { alert(localized[5]); @@ -325,7 +325,7 @@ Class.inherit( Ajax.ThreadListUpdater, Ajax.Base, { var isAway = NodeUtils.getAttrValue(node, 'away') != null; names[names.length] = - ''+localized[1]+' '+ name; } @@ -365,7 +365,7 @@ if($("sidebar") && $("wcontent") && $("togglemenu")) { } } -var webimRoot = ""; +var mibewRoot = ""; Behaviour.register({ '#togglemenu' : function(el) { @@ -376,7 +376,7 @@ Behaviour.register({ }); EventHelper.register(window, 'onload', function(){ - webimRoot = updaterOptions.wroot; + mibewRoot = updaterOptions.wroot; new Ajax.ThreadListUpdater(({table:$("threadlist"),status:$("connstatus"),istatus:0}).extend(updaterOptions || {})); if(!updaterOptions.havemenu) { togglemenu(); diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index b19bb6c9..f2d1eef8 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -114,7 +114,7 @@ function message_to_text($msg) function get_messages($threadid, $meth, $isuser, &$lastid) { - global $kind_for_agent, $kind_avatar, $webim_encoding, $mysqlprefix; + global $kind_for_agent, $kind_avatar, $mibew_encoding, $mysqlprefix; $link = connect(); $query = sprintf( @@ -129,10 +129,10 @@ function get_messages($threadid, $meth, $isuser, &$lastid) if ($meth == 'xml') { switch ($msg['ikind']) { case $kind_avatar: - $message = "" . myiconv($webim_encoding, "utf-8", escape_with_cdata($msg['tmessage'])) . ""; + $message = "" . myiconv($mibew_encoding, "utf-8", escape_with_cdata($msg['tmessage'])) . ""; break; default: - $message = "" . myiconv($webim_encoding, "utf-8", escape_with_cdata(message_to_html($msg))) . "\n"; + $message = "" . myiconv($mibew_encoding, "utf-8", escape_with_cdata(message_to_html($msg))) . "\n"; } } else { if ($msg['ikind'] != $kind_avatar) { @@ -152,7 +152,7 @@ function get_messages($threadid, $meth, $isuser, &$lastid) function print_thread_messages($thread, $token, $lastid, $isuser, $format, $agentid = null) { - global $webim_encoding, $webimroot, $connection_timeout, $settings; + global $mibew_encoding, $mibewroot, $connection_timeout, $settings; $threadid = $thread['threadid']; $istyping = abs($thread['current'] - $thread[$isuser ? "lpagent" : "lpuser"]) < $connection_timeout && $thread[$isuser ? "agentTyping" : "userTyping"] == "1" ? "1" : "0"; @@ -171,12 +171,12 @@ function print_thread_messages($thread, $token, $lastid, $isuser, $format, $agen $output = get_messages($threadid, "html", $isuser, $lastid); start_html_output(); - $url = "$webimroot/thread.php?act=refresh&thread=" . safe_htmlspecialchars($threadid) . "&token=" . safe_htmlspecialchars($token) . "&html=on&user=" . ($isuser ? "true" : "false"); + $url = "$mibewroot/thread.php?act=refresh&thread=" . safe_htmlspecialchars($threadid) . "&token=" . safe_htmlspecialchars($token) . "&html=on&user=" . ($isuser ? "true" : "false"); print( "" . "\n\n" . - "\n" . + "\n" . "\n" . "\n" . "chat\n" . @@ -287,7 +287,7 @@ function setup_logo() loadsettings(); $page['ct.company.name'] = safe_htmlspecialchars(topage($settings['title'])); $page['ct.company.chatLogoURL'] = safe_htmlspecialchars(topage($settings['logo'])); - $page['webimHost'] = safe_htmlspecialchars(topage($settings['hosturl'])); + $page['mibewHost'] = safe_htmlspecialchars(topage($settings['hosturl'])); } function setup_leavemessage($name, $email, $message, $groupid, $groupname, $info, $referrer, $canshowcaptcha) @@ -344,7 +344,7 @@ function setup_survey($name, $email, $groupid, $info, $referrer, $canshowcaptcha function setup_chatview_for_user($thread, $level) { - global $page, $webimroot, $settings; + global $page, $mibewroot, $settings; loadsettings(); $page = array(); $page['agent'] = false; @@ -370,7 +370,7 @@ function setup_chatview_for_user($thread, $level) } $params = "thread=" . $thread['threadid'] . "&token=" . $thread['ltoken']; - $page['mailLink'] = safe_htmlspecialchars("$webimroot/client.php?" . $params . "&level=$level&act=mailthread"); + $page['mailLink'] = safe_htmlspecialchars("$mibewroot/client.php?" . $params . "&level=$level&act=mailthread"); if ($settings['enablessl'] == "1" && !is_secure_request()) { $page['sslLink'] = safe_htmlspecialchars(get_app_location(true, true) . "/client.php?" . $params . "&level=$level"); @@ -409,7 +409,7 @@ function load_canned_messages($locale, $groupid) function setup_chatview_for_operator($thread, $operator) { - global $page, $webimroot, $company_logo_link, $company_name, $settings; + global $page, $mibewroot, $company_logo_link, $company_name, $settings; loadsettings(); $page = array(); $page['agent'] = true; @@ -435,7 +435,7 @@ function setup_chatview_for_operator($thread, $operator) $page['isOpera95'] = is_agent_opera95(); $page['neediframesrc'] = needsFramesrc(); $page['historyParams'] = array("userid" => "" . $thread['userid']); - $page['historyParamsLink'] = safe_htmlspecialchars(add_params($webimroot . "/operator/userhistory.php", $page['historyParams'])); + $page['historyParamsLink'] = safe_htmlspecialchars(add_params($mibewroot . "/operator/userhistory.php", $page['historyParams'])); $predefinedres = ""; $canned_messages = load_canned_messages($thread['locale'], $thread['groupid']); foreach ($canned_messages as $answer) { @@ -443,7 +443,7 @@ function setup_chatview_for_operator($thread, $operator) } $page['predefinedAnswers'] = $predefinedres; $params = "thread=" . $thread['threadid'] . "&token=" . $thread['ltoken']; - $page['redirectLink'] = safe_htmlspecialchars("$webimroot/operator/agent.php?" . $params . "&act=redirect"); + $page['redirectLink'] = safe_htmlspecialchars("$mibewroot/operator/agent.php?" . $params . "&act=redirect"); $page['namePostfix'] = ""; $page['frequency'] = $settings['updatefrequency_chat']; @@ -750,13 +750,13 @@ function check_connections_from_remote($remote, $link) function visitor_from_request() { - global $namecookie, $webim_encoding, $usercookie; + global $namecookie, $mibew_encoding, $usercookie; $defaultName = getstring("chat.default.username"); $userName = $defaultName; if (isset($_COOKIE[$namecookie])) { $data = base64_decode(strtr($_COOKIE[$namecookie], '-_,', '+/=')); if (strlen($data) > 0) { - $userName = myiconv("utf-8", $webim_encoding, $data); + $userName = myiconv("utf-8", $mibew_encoding, $data); } } diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index ca5a02f4..9e9b464d 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -22,7 +22,7 @@ require_once(dirname(__FILE__) . '/converter.php'); require_once(dirname(__FILE__) . '/config.php'); // Sanitize path to application and remove extra slashes -$webimroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $webimroot))))); +$mibewroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot))))); // Sanitize database tables prefix $mysqlprefix = preg_replace('/[^A-Za-z0-9_$]/', '', $mysqlprefix); @@ -41,7 +41,7 @@ $jsver = "165"; if (is_secure_request()) { @ini_set('session.cookie_secure', TRUE); } -@ini_set('session.cookie_path', "$webimroot/"); +@ini_set('session.cookie_path', "$mibewroot/"); @ini_set('session.name', 'MibewSessionID'); session_start(); @@ -150,7 +150,7 @@ function get_user_locale() function get_locale() { - global $webimroot, $locale_cookie_name; + global $mibewroot, $locale_cookie_name; $locale = verifyparam("locale", "/./", ""); @@ -164,7 +164,7 @@ function get_locale() $locale = get_user_locale(); } - setcookie($locale_cookie_name, $locale, time() + 60 * 60 * 24 * 1000, "$webimroot/"); + setcookie($locale_cookie_name, $locale, time() + 60 * 60 * 24 * 1000, "$mibewroot/"); return $locale; } @@ -194,9 +194,9 @@ function get_locale_links($href) function load_messages($locale) { - global $messages, $webim_encoding, $output_encoding; + global $messages, $mibew_encoding, $output_encoding; $hash = array(); - $current_encoding = $webim_encoding; + $current_encoding = $mibew_encoding; $fp = fopen(dirname(__FILE__) . "/../locales/$locale/properties", "r"); if ($fp === FALSE) { @@ -210,10 +210,10 @@ function load_messages($locale) $current_encoding = trim($keyval[1]); } else if ($keyval[0] == 'output_encoding') { $output_encoding[$locale] = trim($keyval[1]); - } else if ($current_encoding == $webim_encoding) { + } else if ($current_encoding == $mibew_encoding) { $hash[$keyval[0]] = str_replace("\\n", "\n", trim($keyval[1])); } else { - $hash[$keyval[0]] = myiconv($current_encoding, $webim_encoding, str_replace("\\n", "\n", trim($keyval[1]))); + $hash[$keyval[0]] = myiconv($current_encoding, $mibew_encoding, str_replace("\\n", "\n", trim($keyval[1]))); } } } @@ -223,10 +223,10 @@ function load_messages($locale) function getoutputenc() { - global $current_locale, $output_encoding, $webim_encoding, $messages; + global $current_locale, $output_encoding, $mibew_encoding, $messages; if (!isset($messages[$current_locale])) load_messages($current_locale); - return isset($output_encoding[$current_locale]) ? $output_encoding[$current_locale] : $webim_encoding; + return isset($output_encoding[$current_locale]) ? $output_encoding[$current_locale] : $mibew_encoding; } function getstring_($text, $locale, $raw = false) @@ -254,22 +254,22 @@ function getstring($text, $raw = false) function getlocal($text, $raw = false) { - global $current_locale, $webim_encoding; - $string = myiconv($webim_encoding, getoutputenc(), getstring_($text, $current_locale), true); + global $current_locale, $mibew_encoding; + $string = myiconv($mibew_encoding, getoutputenc(), getstring_($text, $current_locale), true); return $raw ? $string : sanitize_string($string, 'low', 'moderate'); } function getlocal_($text, $locale, $raw = false) { - global $webim_encoding; - $string = myiconv($webim_encoding, getoutputenc(), getstring_($text, $locale), true); + global $mibew_encoding; + $string = myiconv($mibew_encoding, getoutputenc(), getstring_($text, $locale), true); return $raw ? $string : sanitize_string($string, 'low', 'moderate'); } function topage($text) { - global $webim_encoding; - return myiconv($webim_encoding, getoutputenc(), $text); + global $mibew_encoding; + return myiconv($mibew_encoding, getoutputenc(), $text); } function getstring2_($text, $params, $locale, $raw = false) @@ -290,8 +290,8 @@ function getstring2($text, $params, $raw = false) function getlocal2($text, $params, $raw = false) { - global $current_locale, $webim_encoding; - $string = myiconv($webim_encoding, getoutputenc(), getstring_($text, $current_locale, true)); + global $current_locale, $mibew_encoding; + $string = myiconv($mibew_encoding, getoutputenc(), getstring_($text, $current_locale, true)); for ($i = 0; $i < count($params); $i++) { $string = str_replace("{" . $i . "}", $params[$i], $string); } @@ -301,8 +301,8 @@ function getlocal2($text, $params, $raw = false) /* prepares for Javascript string */ function getlocalforJS($text, $params) { - global $current_locale, $webim_encoding; - $string = myiconv($webim_encoding, getoutputenc(), getstring_($text, $current_locale, true)); + global $current_locale, $mibew_encoding; + $string = myiconv($mibew_encoding, getoutputenc(), getstring_($text, $current_locale, true)); $string = str_replace("\"", "\\\"", str_replace("\n", "\\n", $string)); for ($i = 0; $i < count($params); $i++) { $string = str_replace("{" . $i . "}", $params[$i], $string); @@ -313,9 +313,9 @@ function getlocalforJS($text, $params) /* ajax server actions use utf-8 */ function getrawparam($name) { - global $webim_encoding; + global $mibew_encoding; if (isset($_POST[$name])) { - $value = myiconv("utf-8", $webim_encoding, $_POST[$name]); + $value = myiconv("utf-8", $mibew_encoding, $_POST[$name]); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } @@ -327,9 +327,9 @@ function getrawparam($name) /* form processors use current Output encoding */ function getparam($name) { - global $webim_encoding; + global $mibew_encoding; if (isset($_POST[$name])) { - $value = myiconv(getoutputenc(), $webim_encoding, $_POST[$name]); + $value = myiconv(getoutputenc(), $mibew_encoding, $_POST[$name]); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } @@ -363,11 +363,11 @@ function unicode_urldecode($url) function getgetparam($name, $default = '') { - global $webim_encoding; + global $mibew_encoding; if (!isset($_GET[$name]) || !$_GET[$name]) { return $default; } - $value = myiconv("utf-8", $webim_encoding, unicode_urldecode($_GET[$name])); + $value = myiconv("utf-8", $mibew_encoding, unicode_urldecode($_GET[$name])); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } @@ -563,11 +563,11 @@ function is_valid_email($email) function get_app_location($showhost, $issecure) { - global $webimroot; + global $mibewroot; if ($showhost) { - return ($issecure ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . $webimroot; + return ($issecure ? "https://" : "http://") . $_SERVER['HTTP_HOST'] . $mibewroot; } else { - return $webimroot; + return $mibewroot; } } diff --git a/src/messenger/webim/libs/config.php b/src/messenger/webim/libs/config.php index 53d9aef4..5fd2268d 100644 --- a/src/messenger/webim/libs/config.php +++ b/src/messenger/webim/libs/config.php @@ -18,19 +18,19 @@ /* * Application path on server */ -$webimroot = "/webim"; +$mibewroot = "/mibew"; /* * Internal encoding */ -$webim_encoding = "utf-8"; +$mibew_encoding = "utf-8"; /* * MySQL Database parameters */ $mysqlhost = "localhost"; -$mysqldb = "webim_db"; -$mysqllogin = "webim_lite"; +$mysqldb = "mibew_db"; +$mysqllogin = "mibew"; $mysqlpass = "123"; $mysqlprefix = ""; @@ -40,7 +40,7 @@ $force_charset_in_connection = true; /* * Mailbox */ -$webim_mailbox = "webim@yourdomain.com"; +$mibew_mailbox = "mibew@yourdomain.com"; $mail_encoding = "utf-8"; /* diff --git a/src/messenger/webim/libs/demothread.php b/src/messenger/webim/libs/demothread.php index 4f093447..7338e357 100644 --- a/src/messenger/webim/libs/demothread.php +++ b/src/messenger/webim/libs/demothread.php @@ -17,9 +17,9 @@ function demo_print_message($msg, $format) { - global $webim_encoding; + global $mibew_encoding; if ($format == "xml") { - print "" . myiconv($webim_encoding, "utf-8", escape_with_cdata(message_to_html($msg))) . "\n"; + print "" . myiconv($mibew_encoding, "utf-8", escape_with_cdata(message_to_html($msg))) . "\n"; } else { print topage(message_to_html($msg)); } @@ -27,7 +27,7 @@ function demo_print_message($msg, $format) function demo_process_thread($act, $outformat, $lastid, $isuser, $canpost, $istyping, $postmessage) { - global $kind_for_agent, $kind_info, $kind_events, $kind_user, $kind_agent, $webimroot, $settings; + global $kind_for_agent, $kind_info, $kind_events, $kind_user, $kind_agent, $mibewroot, $settings; loadsettings(); if ($act == "refresh" || $act == "post") { $lastid++; @@ -36,12 +36,12 @@ function demo_process_thread($act, $outformat, $lastid, $isuser, $canpost, $isty print(""); } else { start_html_output(); - $url = "$webimroot/thread.php?act=refresh&thread=0&token=123&html=on&user=" . ($isuser ? "true" : "false"); + $url = "$mibewroot/thread.php?act=refresh&thread=0&token=123&html=on&user=" . ($isuser ? "true" : "false"); print( "" . "\n\n" . - "\n" . + "\n" . "\n" . "\n" . "chat\n" . diff --git a/src/messenger/webim/libs/expand.php b/src/messenger/webim/libs/expand.php index 89954710..2df1c2f5 100644 --- a/src/messenger/webim/libs/expand.php +++ b/src/messenger/webim/libs/expand.php @@ -42,16 +42,16 @@ function expand_condition($matches) function expand_var($matches) { - global $page, $webimroot, $jsver, $errors, $current_style; + global $page, $mibewroot, $jsver, $errors, $current_style; $prefix = $matches[1]; $var = $matches[2]; if (!$prefix) { - if ($var == 'webimroot') { - return $webimroot; + if ($var == 'mibewroot') { + return $mibewroot; } else if ($var == 'jsver') { return $jsver; } else if ($var == 'tplroot') { - return "$webimroot/styles/$current_style"; + return "$mibewroot/styles/$current_style"; } else if ($var == 'styleid') { return $current_style; } else if ($var == 'pagination') { diff --git a/src/messenger/webim/libs/getcode.php b/src/messenger/webim/libs/getcode.php index 28830785..1e0274d9 100644 --- a/src/messenger/webim/libs/getcode.php +++ b/src/messenger/webim/libs/getcode.php @@ -17,11 +17,11 @@ function setup_getcode_tabs($active) { - global $page, $webimroot; + global $page, $mibewroot; $page['tabselected'] = $active; $page['tabs'] = array( - array('title' => getlocal("page_getcode.tab.image"), 'link' => "$webimroot/operator/getcode.php"), - array('title' => getlocal("page_getcode.tab.text"), 'link' => "$webimroot/operator/gettextcode.php"), + array('title' => getlocal("page_getcode.tab.image"), 'link' => "$mibewroot/operator/getcode.php"), + array('title' => getlocal("page_getcode.tab.text"), 'link' => "$mibewroot/operator/gettextcode.php"), ); } @@ -38,7 +38,7 @@ function generate_button($title, $locale, $style, $group, $inner, $showhost, $fo $modsecfix = $modsecurity ? ".replace('http://','').replace('https://','')" : ""; $jslink = safe_htmlspecialchars(append_query("'" . $link, "url='+escape(document.location.href$modsecfix)+'&referrer='+escape(document.referrer$modsecfix)")); $temp = get_popup(safe_htmlspecialchars($link), "$jslink", - $inner, safe_htmlspecialchars($title), "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1"); + $inner, safe_htmlspecialchars($title), "mibew", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1"); return "" . $temp . ""; } diff --git a/src/messenger/webim/libs/groups.php b/src/messenger/webim/libs/groups.php index 791e58e1..a4820f15 100644 --- a/src/messenger/webim/libs/groups.php +++ b/src/messenger/webim/libs/groups.php @@ -36,12 +36,12 @@ function get_group_name($group) function setup_group_settings_tabs($gid, $active) { - global $page, $webimroot, $settings; + global $page, $mibewroot, $settings; if ($gid) { $page['tabselected'] = $active; $page['tabs'] = array( - array('title' => getlocal("page_group.tab.main"), 'link' => "$webimroot/operator/group.php?gid=$gid"), - array('title' => getlocal("page_group.tab.members"), 'link' => "$webimroot/operator/groupmembers.php?gid=$gid"), + array('title' => getlocal("page_group.tab.main"), 'link' => "$mibewroot/operator/group.php?gid=$gid"), + array('title' => getlocal("page_group.tab.members"), 'link' => "$mibewroot/operator/groupmembers.php?gid=$gid"), ); } else { $page['tabs'] = array(); diff --git a/src/messenger/webim/libs/notify.php b/src/messenger/webim/libs/notify.php index b4103173..95fda855 100644 --- a/src/messenger/webim/libs/notify.php +++ b/src/messenger/webim/libs/notify.php @@ -33,19 +33,19 @@ function log_notification($locale, $kind, $to, $subj, $text, $refop, $link) function mibew_mail($toaddr, $reply_to, $subject, $body, $link) { - global $webim_encoding, $webim_mailbox, $mail_encoding, $current_locale; + global $mibew_encoding, $mibew_mailbox, $mail_encoding, $current_locale; - $headers = "From: $webim_mailbox\r\n" - . "Reply-To: " . myiconv($webim_encoding, $mail_encoding, $reply_to) . "\r\n" + $headers = "From: $mibew_mailbox\r\n" + . "Reply-To: " . myiconv($mibew_encoding, $mail_encoding, $reply_to) . "\r\n" . "Content-Type: text/plain; charset=$mail_encoding\r\n" . 'X-Mailer: PHP/' . phpversion(); - $real_subject = "=?" . $mail_encoding . "?B?" . base64_encode(myiconv($webim_encoding, $mail_encoding, $subject)) . "?="; + $real_subject = "=?" . $mail_encoding . "?B?" . base64_encode(myiconv($mibew_encoding, $mail_encoding, $subject)) . "?="; $body = preg_replace("/\n/", "\r\n", $body); log_notification($current_locale, "mail", $toaddr, $subject, $body, null, $link); - @mail($toaddr, $real_subject, wordwrap(myiconv($webim_encoding, $mail_encoding, $body), 70), $headers); + @mail($toaddr, $real_subject, wordwrap(myiconv($mibew_encoding, $mail_encoding, $body), 70), $headers); } function mibew_xmpp($toaddr, $subject, $text, $link) diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index d3f8d6ca..35b1e157 100644 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -211,7 +211,7 @@ function append_query($link, $pv) function check_login($redirect = true) { - global $webimroot, $mysqlprefix, $remember_cookie_name; + global $mibewroot, $mysqlprefix, $remember_cookie_name; if (!isset($_SESSION["${mysqlprefix}operator"])) { if (isset($_COOKIE[$remember_cookie_name])) { list($login, $pwd) = preg_split('/\x0/', base64_decode($_COOKIE[$remember_cookie_name]), 2); @@ -227,7 +227,7 @@ function check_login($redirect = true) } if ($redirect) { $_SESSION['backpath'] = $requested; - header("Location: $webimroot/operator/login.php"); + header("Location: $mibewroot/operator/login.php"); exit; } else { return null; @@ -244,30 +244,30 @@ function get_logged_in() function login_operator($operator, $remember, $https = FALSE) { - global $webimroot, $mysqlprefix, $remember_cookie_name; + global $mibewroot, $mysqlprefix, $remember_cookie_name; $_SESSION["${mysqlprefix}operator"] = $operator; if ($remember) { $value = base64_encode($operator['vclogin'] . "\x0" . calculate_password_hash($operator['vclogin'], $operator['vcpassword'])); - setcookie($remember_cookie_name, $value, time() + 60 * 60 * 24 * 1000, "$webimroot/", NULL, $https, TRUE); + setcookie($remember_cookie_name, $value, time() + 60 * 60 * 24 * 1000, "$mibewroot/", NULL, $https, TRUE); } else if (isset($_COOKIE[$remember_cookie_name])) { - setcookie($remember_cookie_name, '', time() - 3600, "$webimroot/"); + setcookie($remember_cookie_name, '', time() - 3600, "$mibewroot/"); } } function logout_operator() { - global $webimroot, $mysqlprefix, $remember_cookie_name; + global $mibewroot, $mysqlprefix, $remember_cookie_name; unset($_SESSION["${mysqlprefix}operator"]); unset($_SESSION['backpath']); if (isset($_COOKIE[$remember_cookie_name])) { - setcookie($remember_cookie_name, '', time() - 3600, "$webimroot/"); + setcookie($remember_cookie_name, '', time() - 3600, "$mibewroot/"); } } function setup_redirect_links($threadid, $token) { - global $page, $webimroot, $settings, $mysqlprefix; + global $page, $mibewroot, $settings, $mysqlprefix; loadsettings(); $link = connect(); @@ -306,7 +306,7 @@ function setup_redirect_links($threadid, $token) : getlocal("char.redirect.operator.away_suff") ) : ""; - $agent_list .= "
  • " . safe_htmlspecialchars(topage(get_operator_name($agent))) . " $status
  • "; @@ -323,7 +323,7 @@ function setup_redirect_links($threadid, $token) : ($group['ilastseenaway'] !== NULL && $group['ilastseenaway'] < $settings['online_timeout'] ? getlocal("char.redirect.operator.away_suff") : ""); - $group_list .= "
  • " . safe_htmlspecialchars(topage(get_group_name($group))) . " $status
  • "; diff --git a/src/messenger/webim/libs/operator_settings.php b/src/messenger/webim/libs/operator_settings.php index 86e5a4e3..f3ccbb3a 100644 --- a/src/messenger/webim/libs/operator_settings.php +++ b/src/messenger/webim/libs/operator_settings.php @@ -17,23 +17,23 @@ function setup_operator_settings_tabs($opId, $active) { - global $page, $webimroot, $settings; + global $page, $mibewroot, $settings; loadsettings(); if ($opId) { $page['tabselected'] = $active; if ($settings['enablegroups'] == '1') { $page['tabs'] = array( - array('title' => getlocal("page_agent.tab.main"), 'link' => "$webimroot/operator/operator.php?op=$opId"), - array('title' => getlocal("page_agent.tab.avatar"), 'link' => "$webimroot/operator/avatar.php?op=$opId"), - array('title' => getlocal("page_agent.tab.groups"), 'link' => "$webimroot/operator/opgroups.php?op=$opId"), - array('title' => getlocal("page_agent.tab.permissions"), 'link' => "$webimroot/operator/permissions.php?op=$opId"), + array('title' => getlocal("page_agent.tab.main"), 'link' => "$mibewroot/operator/operator.php?op=$opId"), + array('title' => getlocal("page_agent.tab.avatar"), 'link' => "$mibewroot/operator/avatar.php?op=$opId"), + array('title' => getlocal("page_agent.tab.groups"), 'link' => "$mibewroot/operator/opgroups.php?op=$opId"), + array('title' => getlocal("page_agent.tab.permissions"), 'link' => "$mibewroot/operator/permissions.php?op=$opId"), ); } else { $page['tabs'] = array( - array('title' => getlocal("page_agent.tab.main"), 'link' => "$webimroot/operator/operator.php?op=$opId"), - array('title' => getlocal("page_agent.tab.avatar"), 'link' => "$webimroot/operator/avatar.php?op=$opId"), - array('title' => getlocal("page_agent.tab.permissions"), 'link' => "$webimroot/operator/permissions.php?op=$opId"), + array('title' => getlocal("page_agent.tab.main"), 'link' => "$mibewroot/operator/operator.php?op=$opId"), + array('title' => getlocal("page_agent.tab.avatar"), 'link' => "$mibewroot/operator/avatar.php?op=$opId"), + array('title' => getlocal("page_agent.tab.permissions"), 'link' => "$mibewroot/operator/permissions.php?op=$opId"), ); if ($active == 3) $active--; } diff --git a/src/messenger/webim/libs/pagination.php b/src/messenger/webim/libs/pagination.php index da3a27aa..daf28172 100644 --- a/src/messenger/webim/libs/pagination.php +++ b/src/messenger/webim/libs/pagination.php @@ -28,8 +28,8 @@ function generate_pagination_link($page, $title, $raw = false) function generate_pagination_image($id, $alt) { - global $webimroot; - return "\"""; + global $mibewroot; + return "\"""; } function prepare_pagination($items_count, $default_items_per_page = 15) diff --git a/src/messenger/webim/libs/settings.php b/src/messenger/webim/libs/settings.php index ea3caf23..febfd3cf 100644 --- a/src/messenger/webim/libs/settings.php +++ b/src/messenger/webim/libs/settings.php @@ -32,13 +32,13 @@ function update_settings() function setup_settings_tabs($active) { - global $page, $webimroot; + global $page, $mibewroot; $page['tabselected'] = $active; $page['tabs'] = array( - array('title' => getlocal("page_settings.tab.main"), 'link' => "$webimroot/operator/settings.php"), - array('title' => getlocal("page_settings.tab.features"), 'link' => "$webimroot/operator/features.php"), - array('title' => getlocal("page_settings.tab.performance"), 'link' => "$webimroot/operator/performance.php"), - array('title' => getlocal("page_settings.tab.themes"), 'link' => "$webimroot/operator/themes.php"), + array('title' => getlocal("page_settings.tab.main"), 'link' => "$mibewroot/operator/settings.php"), + array('title' => getlocal("page_settings.tab.features"), 'link' => "$mibewroot/operator/features.php"), + array('title' => getlocal("page_settings.tab.performance"), 'link' => "$mibewroot/operator/performance.php"), + array('title' => getlocal("page_settings.tab.themes"), 'link' => "$mibewroot/operator/themes.php"), ); } diff --git a/src/messenger/webim/locales/ar/button/webim_off.gif b/src/messenger/webim/locales/ar/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/ar/button/webim_off.gif rename to src/messenger/webim/locales/ar/button/mibew_off.gif diff --git a/src/messenger/webim/locales/ar/button/webim_on.gif b/src/messenger/webim/locales/ar/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/ar/button/webim_on.gif rename to src/messenger/webim/locales/ar/button/mibew_on.gif diff --git a/src/messenger/webim/locales/be/button/webim_off.gif b/src/messenger/webim/locales/be/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/be/button/webim_off.gif rename to src/messenger/webim/locales/be/button/mibew_off.gif diff --git a/src/messenger/webim/locales/be/button/webim_on.gif b/src/messenger/webim/locales/be/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/be/button/webim_on.gif rename to src/messenger/webim/locales/be/button/mibew_on.gif diff --git a/src/messenger/webim/locales/bg/button/webim_off.gif b/src/messenger/webim/locales/bg/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/bg/button/webim_off.gif rename to src/messenger/webim/locales/bg/button/mibew_off.gif diff --git a/src/messenger/webim/locales/bg/button/webim_on.gif b/src/messenger/webim/locales/bg/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/bg/button/webim_on.gif rename to src/messenger/webim/locales/bg/button/mibew_on.gif diff --git a/src/messenger/webim/locales/ca/button/webim_off.gif b/src/messenger/webim/locales/ca/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/ca/button/webim_off.gif rename to src/messenger/webim/locales/ca/button/mibew_off.gif diff --git a/src/messenger/webim/locales/ca/button/webim_on.gif b/src/messenger/webim/locales/ca/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/ca/button/webim_on.gif rename to src/messenger/webim/locales/ca/button/mibew_on.gif diff --git a/src/messenger/webim/locales/cs/button/webim_off.gif b/src/messenger/webim/locales/cs/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/cs/button/webim_off.gif rename to src/messenger/webim/locales/cs/button/mibew_off.gif diff --git a/src/messenger/webim/locales/cs/button/webim_on.gif b/src/messenger/webim/locales/cs/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/cs/button/webim_on.gif rename to src/messenger/webim/locales/cs/button/mibew_on.gif diff --git a/src/messenger/webim/locales/da/button/webim_off.gif b/src/messenger/webim/locales/da/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/da/button/webim_off.gif rename to src/messenger/webim/locales/da/button/mibew_off.gif diff --git a/src/messenger/webim/locales/da/button/webim_on.gif b/src/messenger/webim/locales/da/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/da/button/webim_on.gif rename to src/messenger/webim/locales/da/button/mibew_on.gif diff --git a/src/messenger/webim/locales/de/button/webim_off.gif b/src/messenger/webim/locales/de/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/de/button/webim_off.gif rename to src/messenger/webim/locales/de/button/mibew_off.gif diff --git a/src/messenger/webim/locales/de/button/webim_on.gif b/src/messenger/webim/locales/de/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/de/button/webim_on.gif rename to src/messenger/webim/locales/de/button/mibew_on.gif diff --git a/src/messenger/webim/locales/el/button/webim_off.gif b/src/messenger/webim/locales/el/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/el/button/webim_off.gif rename to src/messenger/webim/locales/el/button/mibew_off.gif diff --git a/src/messenger/webim/locales/el/button/webim_on.gif b/src/messenger/webim/locales/el/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/el/button/webim_on.gif rename to src/messenger/webim/locales/el/button/mibew_on.gif diff --git a/src/messenger/webim/locales/en/button/webim_off.gif b/src/messenger/webim/locales/en/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/en/button/webim_off.gif rename to src/messenger/webim/locales/en/button/mibew_off.gif diff --git a/src/messenger/webim/locales/en/button/webim_on.gif b/src/messenger/webim/locales/en/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/en/button/webim_on.gif rename to src/messenger/webim/locales/en/button/mibew_on.gif diff --git a/src/messenger/webim/locales/fa/button/webim_off.gif b/src/messenger/webim/locales/fa/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/fa/button/webim_off.gif rename to src/messenger/webim/locales/fa/button/mibew_off.gif diff --git a/src/messenger/webim/locales/fa/button/webim_on.gif b/src/messenger/webim/locales/fa/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/fa/button/webim_on.gif rename to src/messenger/webim/locales/fa/button/mibew_on.gif diff --git a/src/messenger/webim/locales/fi/button/webim_off.gif b/src/messenger/webim/locales/fi/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/fi/button/webim_off.gif rename to src/messenger/webim/locales/fi/button/mibew_off.gif diff --git a/src/messenger/webim/locales/fi/button/webim_on.gif b/src/messenger/webim/locales/fi/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/fi/button/webim_on.gif rename to src/messenger/webim/locales/fi/button/mibew_on.gif diff --git a/src/messenger/webim/locales/fr/button/webim_off.gif b/src/messenger/webim/locales/fr/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/fr/button/webim_off.gif rename to src/messenger/webim/locales/fr/button/mibew_off.gif diff --git a/src/messenger/webim/locales/fr/button/webim_on.gif b/src/messenger/webim/locales/fr/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/fr/button/webim_on.gif rename to src/messenger/webim/locales/fr/button/mibew_on.gif diff --git a/src/messenger/webim/locales/he/button/webim_off.gif b/src/messenger/webim/locales/he/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/he/button/webim_off.gif rename to src/messenger/webim/locales/he/button/mibew_off.gif diff --git a/src/messenger/webim/locales/he/button/webim_on.gif b/src/messenger/webim/locales/he/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/he/button/webim_on.gif rename to src/messenger/webim/locales/he/button/mibew_on.gif diff --git a/src/messenger/webim/locales/hr/button/webim_off.gif b/src/messenger/webim/locales/hr/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/hr/button/webim_off.gif rename to src/messenger/webim/locales/hr/button/mibew_off.gif diff --git a/src/messenger/webim/locales/hr/button/webim_on.gif b/src/messenger/webim/locales/hr/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/hr/button/webim_on.gif rename to src/messenger/webim/locales/hr/button/mibew_on.gif diff --git a/src/messenger/webim/locales/hu/button/webim_off.gif b/src/messenger/webim/locales/hu/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/hu/button/webim_off.gif rename to src/messenger/webim/locales/hu/button/mibew_off.gif diff --git a/src/messenger/webim/locales/hu/button/webim_on.gif b/src/messenger/webim/locales/hu/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/hu/button/webim_on.gif rename to src/messenger/webim/locales/hu/button/mibew_on.gif diff --git a/src/messenger/webim/locales/id/button/webim_off.gif b/src/messenger/webim/locales/id/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/id/button/webim_off.gif rename to src/messenger/webim/locales/id/button/mibew_off.gif diff --git a/src/messenger/webim/locales/id/button/webim_on.gif b/src/messenger/webim/locales/id/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/id/button/webim_on.gif rename to src/messenger/webim/locales/id/button/mibew_on.gif diff --git a/src/messenger/webim/locales/it/button/webim_off.gif b/src/messenger/webim/locales/it/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/it/button/webim_off.gif rename to src/messenger/webim/locales/it/button/mibew_off.gif diff --git a/src/messenger/webim/locales/it/button/webim_on.gif b/src/messenger/webim/locales/it/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/it/button/webim_on.gif rename to src/messenger/webim/locales/it/button/mibew_on.gif diff --git a/src/messenger/webim/locales/lv/button/webim_off.gif b/src/messenger/webim/locales/lv/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/lv/button/webim_off.gif rename to src/messenger/webim/locales/lv/button/mibew_off.gif diff --git a/src/messenger/webim/locales/lv/button/webim_on.gif b/src/messenger/webim/locales/lv/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/lv/button/webim_on.gif rename to src/messenger/webim/locales/lv/button/mibew_on.gif diff --git a/src/messenger/webim/locales/nl/button/webim_off.gif b/src/messenger/webim/locales/nl/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/nl/button/webim_off.gif rename to src/messenger/webim/locales/nl/button/mibew_off.gif diff --git a/src/messenger/webim/locales/nl/button/webim_on.gif b/src/messenger/webim/locales/nl/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/nl/button/webim_on.gif rename to src/messenger/webim/locales/nl/button/mibew_on.gif diff --git a/src/messenger/webim/locales/pl/button/webim_off.gif b/src/messenger/webim/locales/pl/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/pl/button/webim_off.gif rename to src/messenger/webim/locales/pl/button/mibew_off.gif diff --git a/src/messenger/webim/locales/pl/button/webim_on.gif b/src/messenger/webim/locales/pl/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/pl/button/webim_on.gif rename to src/messenger/webim/locales/pl/button/mibew_on.gif diff --git a/src/messenger/webim/locales/pt-br/button/webim_off.gif b/src/messenger/webim/locales/pt-br/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/pt-br/button/webim_off.gif rename to src/messenger/webim/locales/pt-br/button/mibew_off.gif diff --git a/src/messenger/webim/locales/pt-br/button/webim_on.gif b/src/messenger/webim/locales/pt-br/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/pt-br/button/webim_on.gif rename to src/messenger/webim/locales/pt-br/button/mibew_on.gif diff --git a/src/messenger/webim/locales/pt-pt/button/webim_off.gif b/src/messenger/webim/locales/pt-pt/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/pt-pt/button/webim_off.gif rename to src/messenger/webim/locales/pt-pt/button/mibew_off.gif diff --git a/src/messenger/webim/locales/pt-pt/button/webim_on.gif b/src/messenger/webim/locales/pt-pt/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/pt-pt/button/webim_on.gif rename to src/messenger/webim/locales/pt-pt/button/mibew_on.gif diff --git a/src/messenger/webim/locales/ro/button/webim_off.gif b/src/messenger/webim/locales/ro/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/ro/button/webim_off.gif rename to src/messenger/webim/locales/ro/button/mibew_off.gif diff --git a/src/messenger/webim/locales/ro/button/webim_on.gif b/src/messenger/webim/locales/ro/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/ro/button/webim_on.gif rename to src/messenger/webim/locales/ro/button/mibew_on.gif diff --git a/src/messenger/webim/locales/ru/button/webim_off.gif b/src/messenger/webim/locales/ru/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/ru/button/webim_off.gif rename to src/messenger/webim/locales/ru/button/mibew_off.gif diff --git a/src/messenger/webim/locales/ru/button/webim_on.gif b/src/messenger/webim/locales/ru/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/ru/button/webim_on.gif rename to src/messenger/webim/locales/ru/button/mibew_on.gif diff --git a/src/messenger/webim/locales/sp/button/webim_off.gif b/src/messenger/webim/locales/sp/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/sp/button/webim_off.gif rename to src/messenger/webim/locales/sp/button/mibew_off.gif diff --git a/src/messenger/webim/locales/sp/button/webim_on.gif b/src/messenger/webim/locales/sp/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/sp/button/webim_on.gif rename to src/messenger/webim/locales/sp/button/mibew_on.gif diff --git a/src/messenger/webim/locales/sv/button/webim_off.gif b/src/messenger/webim/locales/sv/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/sv/button/webim_off.gif rename to src/messenger/webim/locales/sv/button/mibew_off.gif diff --git a/src/messenger/webim/locales/sv/button/webim_on.gif b/src/messenger/webim/locales/sv/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/sv/button/webim_on.gif rename to src/messenger/webim/locales/sv/button/mibew_on.gif diff --git a/src/messenger/webim/locales/th/button/webim_off.gif b/src/messenger/webim/locales/th/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/th/button/webim_off.gif rename to src/messenger/webim/locales/th/button/mibew_off.gif diff --git a/src/messenger/webim/locales/th/button/webim_on.gif b/src/messenger/webim/locales/th/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/th/button/webim_on.gif rename to src/messenger/webim/locales/th/button/mibew_on.gif diff --git a/src/messenger/webim/locales/tr/button/webim_off.gif b/src/messenger/webim/locales/tr/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/tr/button/webim_off.gif rename to src/messenger/webim/locales/tr/button/mibew_off.gif diff --git a/src/messenger/webim/locales/tr/button/webim_on.gif b/src/messenger/webim/locales/tr/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/tr/button/webim_on.gif rename to src/messenger/webim/locales/tr/button/mibew_on.gif diff --git a/src/messenger/webim/locales/ua/button/webim_off.gif b/src/messenger/webim/locales/ua/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/ua/button/webim_off.gif rename to src/messenger/webim/locales/ua/button/mibew_off.gif diff --git a/src/messenger/webim/locales/ua/button/webim_on.gif b/src/messenger/webim/locales/ua/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/ua/button/webim_on.gif rename to src/messenger/webim/locales/ua/button/mibew_on.gif diff --git a/src/messenger/webim/locales/zh-cn/button/webim_off.gif b/src/messenger/webim/locales/zh-cn/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/zh-cn/button/webim_off.gif rename to src/messenger/webim/locales/zh-cn/button/mibew_off.gif diff --git a/src/messenger/webim/locales/zh-cn/button/webim_on.gif b/src/messenger/webim/locales/zh-cn/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/zh-cn/button/webim_on.gif rename to src/messenger/webim/locales/zh-cn/button/mibew_on.gif diff --git a/src/messenger/webim/locales/zh-tw/button/webim_off.gif b/src/messenger/webim/locales/zh-tw/button/mibew_off.gif similarity index 100% rename from src/messenger/webim/locales/zh-tw/button/webim_off.gif rename to src/messenger/webim/locales/zh-tw/button/mibew_off.gif diff --git a/src/messenger/webim/locales/zh-tw/button/webim_on.gif b/src/messenger/webim/locales/zh-tw/button/mibew_on.gif similarity index 100% rename from src/messenger/webim/locales/zh-tw/button/webim_on.gif rename to src/messenger/webim/locales/zh-tw/button/mibew_on.gif diff --git a/src/messenger/webim/mail.php b/src/messenger/webim/mail.php index b832830d..1949d77a 100644 --- a/src/messenger/webim/mail.php +++ b/src/messenger/webim/mail.php @@ -61,7 +61,7 @@ $subject = getstring("mail.user.history.subject", true); $body = getstring2("mail.user.history.body", array($thread['userName'],$history), true); $link = connect(); -mibew_mail($email, $webim_mailbox, $subject, $body, $link); +mibew_mail($email, $mibew_mailbox, $subject, $body, $link); mysql_close($link); setup_logo(); diff --git a/src/messenger/webim/operator/agent.php b/src/messenger/webim/operator/agent.php index ef0df6c4..20215bae 100644 --- a/src/messenger/webim/operator/agent.php +++ b/src/messenger/webim/operator/agent.php @@ -83,7 +83,7 @@ if (!isset($_GET['token'])) { } $token = $thread['ltoken']; - header("Location: $webimroot/operator/agent.php?thread=" . intval($threadid) . "&token=" . intval($token) . "&level=" . urlencode($remote_level)); + header("Location: $mibewroot/operator/agent.php?thread=" . intval($threadid) . "&token=" . intval($token) . "&level=" . urlencode($remote_level)); exit; } diff --git a/src/messenger/webim/operator/avatar.php b/src/messenger/webim/operator/avatar.php index 1d100e7e..59529e5f 100644 --- a/src/messenger/webim/operator/avatar.php +++ b/src/messenger/webim/operator/avatar.php @@ -64,7 +64,7 @@ if (!$op) { if (!@move_uploaded_file($_FILES['avatarFile']['tmp_name'], $full_file_path)) { $errors[] = failed_uploading_file($orig_filename, "errors.file.move.error"); } else { - $avatar = "$webimroot/images/avatar/$new_file_name"; + $avatar = "$mibewroot/images/avatar/$new_file_name"; } } } else { @@ -77,7 +77,7 @@ if (!$op) { if ($opId && $avatar && $_SESSION["${mysqlprefix}operator"] && $operator['operatorid'] == $opId) { $_SESSION["${mysqlprefix}operator"]['vcavatar'] = $avatar; } - header("Location: $webimroot/operator/avatar.php?op=" . intval($opId)); + header("Location: $mibewroot/operator/avatar.php?op=" . intval($opId)); exit; } else { $page['avatar'] = topage($op['vcavatar']); @@ -86,7 +86,7 @@ if (!$op) { } else { if (isset($_GET['delete']) && $_GET['delete'] == "true" && $canmodify) { update_operator_avatar($op['operatorid'], ''); - header("Location: $webimroot/operator/avatar.php?op=" . intval($opId)); + header("Location: $mibewroot/operator/avatar.php?op=" . intval($opId)); exit; } $page['avatar'] = topage($op['vcavatar']); diff --git a/src/messenger/webim/operator/ban.php b/src/messenger/webim/operator/ban.php index c5a6ce7b..2bee0ef8 100644 --- a/src/messenger/webim/operator/ban.php +++ b/src/messenger/webim/operator/ban.php @@ -79,7 +79,7 @@ if (isset($_POST['address'])) { mysql_close($link); if (!$threadid) { - header("Location: $webimroot/operator/blocked.php"); + header("Location: $mibewroot/operator/blocked.php"); exit; } else { $page['saved'] = true; diff --git a/src/messenger/webim/operator/blocked.php b/src/messenger/webim/operator/blocked.php index 6aaf6418..db0ef806 100644 --- a/src/messenger/webim/operator/blocked.php +++ b/src/messenger/webim/operator/blocked.php @@ -39,7 +39,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') { if (count($errors) == 0) { perform_query("delete from ${mysqlprefix}chatban where banid = " . intval($banId), $link); - header("Location: $webimroot/operator/blocked.php"); + header("Location: $mibewroot/operator/blocked.php"); exit; } } diff --git a/src/messenger/webim/operator/canned.php b/src/messenger/webim/operator/canned.php index 7cecd191..27d0c24e 100644 --- a/src/messenger/webim/operator/canned.php +++ b/src/messenger/webim/operator/canned.php @@ -110,7 +110,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'delete') { $link = connect(); perform_query("delete from ${mysqlprefix}chatresponses where id = " . intval($key), $link); mysql_close($link); - header("Location: $webimroot/operator/canned.php?lang=" . urlencode($lang) . "&group=" . intval($groupid)); + header("Location: $mibewroot/operator/canned.php?lang=" . urlencode($lang) . "&group=" . intval($groupid)); exit; } } diff --git a/src/messenger/webim/operator/features.php b/src/messenger/webim/operator/features.php index 20f6290b..5d042659 100644 --- a/src/messenger/webim/operator/features.php +++ b/src/messenger/webim/operator/features.php @@ -48,7 +48,7 @@ if (isset($_POST['sent'])) { $settings[$opt] = verifyparam($opt, "/^on$/", "") == "on" ? "1" : "0"; } update_settings(); - header("Location: $webimroot/operator/features.php?stored"); + header("Location: $mibewroot/operator/features.php?stored"); exit; } else { $errors[] = "Not an administrator"; diff --git a/src/messenger/webim/operator/getcode.php b/src/messenger/webim/operator/getcode.php index b0c9ce4b..b4042959 100644 --- a/src/messenger/webim/operator/getcode.php +++ b/src/messenger/webim/operator/getcode.php @@ -24,7 +24,7 @@ $operator = check_login(); loadsettings(); $imageLocales = get_image_locales_map("../locales"); -$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "webim"); +$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew"); if (!isset($imageLocales[$image])) { $errors[] = "Unknown image: $image"; $avail = array_keys($imageLocales); diff --git a/src/messenger/webim/operator/group.php b/src/messenger/webim/operator/group.php index b1c97a20..328be2d5 100644 --- a/src/messenger/webim/operator/group.php +++ b/src/messenger/webim/operator/group.php @@ -95,11 +95,11 @@ if (isset($_POST['name'])) { if (count($errors) == 0) { if (!$groupid) { $newdep = create_group($name, $description, $commonname, $commondescription, $email); - header("Location: $webimroot/operator/groupmembers.php?gid=" . intval($newdep['groupid'])); + header("Location: $mibewroot/operator/groupmembers.php?gid=" . intval($newdep['groupid'])); exit; } else { update_group($groupid, $name, $description, $commonname, $commondescription, $email); - header("Location: $webimroot/operator/group.php?gid=" . intval($groupid) . "&stored"); + header("Location: $mibewroot/operator/group.php?gid=" . intval($groupid) . "&stored"); exit; } } else { diff --git a/src/messenger/webim/operator/groupmembers.php b/src/messenger/webim/operator/groupmembers.php index ff9034c5..7a405869 100644 --- a/src/messenger/webim/operator/groupmembers.php +++ b/src/messenger/webim/operator/groupmembers.php @@ -74,7 +74,7 @@ if (!$group) { } update_group_members($groupid, $new_members); - header("Location: $webimroot/operator/groupmembers.php?gid=" . intval($groupid) . "&stored"); + header("Location: $mibewroot/operator/groupmembers.php?gid=" . intval($groupid) . "&stored"); exit; } diff --git a/src/messenger/webim/operator/groups.php b/src/messenger/webim/operator/groups.php index 4181a8e0..b9ff7ab6 100644 --- a/src/messenger/webim/operator/groups.php +++ b/src/messenger/webim/operator/groups.php @@ -39,7 +39,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') { perform_query("delete from ${mysqlprefix}chatgroupoperator where groupid = " . intval($groupid), $link); perform_query("update ${mysqlprefix}chatthread set groupid = 0 where groupid = " . intval($groupid), $link); mysql_close($link); - header("Location: $webimroot/operator/groups.php"); + header("Location: $mibewroot/operator/groups.php"); exit; } } diff --git a/src/messenger/webim/operator/history.php b/src/messenger/webim/operator/history.php index d13a58ee..82d8c318 100644 --- a/src/messenger/webim/operator/history.php +++ b/src/messenger/webim/operator/history.php @@ -27,7 +27,7 @@ loadsettings(); setlocale(LC_TIME, getstring("time.locale")); $page = array(); -$query = isset($_GET['q']) ? myiconv(getoutputenc(), $webim_encoding, $_GET['q']) : false; +$query = isset($_GET['q']) ? myiconv(getoutputenc(), $mibew_encoding, $_GET['q']) : false; if ($query !== false) { $link = connect(); diff --git a/src/messenger/webim/operator/index.php b/src/messenger/webim/operator/index.php index dd04117d..9858010c 100644 --- a/src/messenger/webim/operator/index.php +++ b/src/messenger/webim/operator/index.php @@ -27,13 +27,13 @@ mysql_close($link); $page = array( 'version' => $version, - 'localeLinks' => get_locale_links("$webimroot/operator/index.php"), + 'localeLinks' => get_locale_links("$mibewroot/operator/index.php"), 'needUpdate' => $settings['dbversion'] != $dbversion, 'needChangePassword' => check_password_hash($operator['vclogin'], '', $operator['vcpassword']), - 'profilePage' => "$webimroot/operator/operator.php?op=".safe_htmlspecialchars($operator['operatorid']), - 'updateWizard' => "$webimroot/install/", + 'profilePage' => "$mibewroot/operator/operator.php?op=".safe_htmlspecialchars($operator['operatorid']), + 'updateWizard' => "$mibewroot/install/", 'newFeatures' => $settings['featuresversion'] != $featuresversion, - 'featuresPage' => "$webimroot/operator/features.php", + 'featuresPage' => "$mibewroot/operator/features.php", 'isOnline' => $isonline ); diff --git a/src/messenger/webim/operator/login.php b/src/messenger/webim/operator/login.php index 9b88c694..538f2020 100644 --- a/src/messenger/webim/operator/login.php +++ b/src/messenger/webim/operator/login.php @@ -30,10 +30,10 @@ if (isset($_POST['login']) && isset($_POST['password'])) { if ($operator && isset($operator['vcpassword']) && check_password_hash($login, $password, $operator['vcpassword'])) { $target = $password == '' - ? "$webimroot/operator/operator.php?op=" . intval($operator['operatorid']) + ? "$mibewroot/operator/operator.php?op=" . intval($operator['operatorid']) : (isset($_SESSION['backpath']) ? $_SESSION['backpath'] - : "$webimroot/operator/index.php"); + : "$mibewroot/operator/index.php"); login_operator($operator, $remember, is_secure_request()); header("Location: $target"); @@ -48,7 +48,7 @@ if (isset($_POST['login']) && isset($_POST['password'])) { $page['formlogin'] = $login; } -$page['localeLinks'] = get_locale_links("$webimroot/operator/login.php"); +$page['localeLinks'] = get_locale_links("$mibewroot/operator/login.php"); start_html_output(); require('../view/login.php'); ?> \ No newline at end of file diff --git a/src/messenger/webim/operator/logout.php b/src/messenger/webim/operator/logout.php index cb392052..eef18e38 100644 --- a/src/messenger/webim/operator/logout.php +++ b/src/messenger/webim/operator/logout.php @@ -20,6 +20,6 @@ require_once('../libs/operator.php'); logout_operator(); -header("Location: $webimroot/operator/login.php"); +header("Location: $mibewroot/operator/login.php"); exit; ?> \ No newline at end of file diff --git a/src/messenger/webim/operator/operator.php b/src/messenger/webim/operator/operator.php index 8dda95a2..6b65e32a 100644 --- a/src/messenger/webim/operator/operator.php +++ b/src/messenger/webim/operator/operator.php @@ -84,7 +84,7 @@ if (isset($_POST['login']) && isset($_POST['password'])) { if (count($errors) == 0) { if (!$opId) { $newop = create_operator($login, $email, $jabber, $password, $localname, $commonname, $jabbernotify ? 1 : 0, ""); - header("Location: $webimroot/operator/avatar.php?op=" . intval($newop['operatorid'])); + header("Location: $mibewroot/operator/avatar.php?op=" . intval($newop['operatorid'])); exit; } else { update_operator($opId, $login, $email, $jabber, $password, $localname, $commonname, $jabbernotify ? 1 : 0); @@ -93,11 +93,11 @@ if (isset($_POST['login']) && isset($_POST['password'])) { $toDashboard = check_password_hash($login, '', $operator['vcpassword']) && $password != ''; $_SESSION["${mysqlprefix}operator"]['vcpassword'] = calculate_password_hash($login, $password); if($toDashboard) { - header("Location: $webimroot/operator/index.php"); + header("Location: $mibewroot/operator/index.php"); exit; } } - header("Location: $webimroot/operator/operator.php?op=" . intval($opId) . "&stored"); + header("Location: $mibewroot/operator/operator.php?op=" . intval($opId) . "&stored"); exit; } } else { diff --git a/src/messenger/webim/operator/operators.php b/src/messenger/webim/operator/operators.php index d97bb873..e049feaa 100644 --- a/src/messenger/webim/operator/operators.php +++ b/src/messenger/webim/operator/operators.php @@ -51,7 +51,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') { perform_query("delete from ${mysqlprefix}chatoperator where operatorid = " . intval($operatorid), $link); mysql_close($link); - header("Location: $webimroot/operator/operators.php"); + header("Location: $mibewroot/operator/operators.php"); exit; } } diff --git a/src/messenger/webim/operator/opgroups.php b/src/messenger/webim/operator/opgroups.php index 47dde302..58435613 100644 --- a/src/messenger/webim/operator/opgroups.php +++ b/src/messenger/webim/operator/opgroups.php @@ -64,7 +64,7 @@ if (!$op) { } update_operator_groups($op['operatorid'], $new_groups); - header("Location: $webimroot/operator/opgroups.php?op=" . intval($opId) . "&stored"); + header("Location: $mibewroot/operator/opgroups.php?op=" . intval($opId) . "&stored"); exit; } } diff --git a/src/messenger/webim/operator/performance.php b/src/messenger/webim/operator/performance.php index a0727702..3eca94e6 100644 --- a/src/messenger/webim/operator/performance.php +++ b/src/messenger/webim/operator/performance.php @@ -71,7 +71,7 @@ if (isset($_POST['onlinetimeout'])) { $settings[$opt] = $params[$opt]; } update_settings(); - header("Location: $webimroot/operator/performance.php?stored"); + header("Location: $mibewroot/operator/performance.php?stored"); exit; } } diff --git a/src/messenger/webim/operator/permissions.php b/src/messenger/webim/operator/permissions.php index 9aeb1874..f4c41091 100644 --- a/src/messenger/webim/operator/permissions.php +++ b/src/messenger/webim/operator/permissions.php @@ -62,7 +62,7 @@ if (!$op) { if ($opId && $_SESSION["${mysqlprefix}operator"] && $operator['operatorid'] == $opId) { $_SESSION["${mysqlprefix}operator"]['iperm'] = $new_permissions; } - header("Location: $webimroot/operator/permissions.php?op=" . intval($opId) . "&stored"); + header("Location: $mibewroot/operator/permissions.php?op=" . intval($opId) . "&stored"); exit; } diff --git a/src/messenger/webim/operator/restore.php b/src/messenger/webim/operator/restore.php index f95e9769..3f6b9e66 100644 --- a/src/messenger/webim/operator/restore.php +++ b/src/messenger/webim/operator/restore.php @@ -57,7 +57,7 @@ if (isset($_POST['loginoremail'])) { $page['formloginoremail'] = topage($loginoremail); -$page['localeLinks'] = get_locale_links("$webimroot/operator/restore.php"); +$page['localeLinks'] = get_locale_links("$mibewroot/operator/restore.php"); $page['isdone'] = false; start_html_output(); require('../view/restore.php'); diff --git a/src/messenger/webim/operator/settings.php b/src/messenger/webim/operator/settings.php index 0ec0cf1b..e38227df 100644 --- a/src/messenger/webim/operator/settings.php +++ b/src/messenger/webim/operator/settings.php @@ -79,7 +79,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { $settings[$opt] = $params[$opt]; } update_settings(); - header("Location: $webimroot/operator/settings.php?stored"); + header("Location: $mibewroot/operator/settings.php?stored"); exit; } } diff --git a/src/messenger/webim/operator/themes.php b/src/messenger/webim/operator/themes.php index 1b3bf601..5a3f8f26 100644 --- a/src/messenger/webim/operator/themes.php +++ b/src/messenger/webim/operator/themes.php @@ -50,7 +50,7 @@ if ($showerrors || $show == 'error') { if ($show == 'chat' || $show == 'mail' || $show == 'leavemessage' || $show == 'leavemessagesent' || $show == 'chatsimple' || $show == 'nochat') { setup_chatview_for_user(array('threadid' => 0, 'userName' => getstring("chat.default.username"), 'ltoken' => 123), "ajaxed"); - $page['mailLink'] = "$webimroot/operator/themes.php?preview=$preview&show=mail"; + $page['mailLink'] = "$mibewroot/operator/themes.php?preview=$preview&show=mail"; $page['info'] = ""; expand("../styles", "$preview", "$show.tpl"); exit; @@ -87,7 +87,7 @@ if ($show == 'redirect' || $show == 'redirected' || $show == 'agentchat' || $sho } elseif ($show == 'redirected') { $page['message'] = getlocal2("chat.redirected.content", array("Administrator")); } - $page['redirectLink'] = "$webimroot/operator/themes.php?preview=$preview&show=redirect"; + $page['redirectLink'] = "$mibewroot/operator/themes.php?preview=$preview&show=redirect"; expand("../styles", "$preview", "$show.tpl"); exit; } @@ -123,7 +123,7 @@ $page['availableTemplates'] = array( "agentchat", "agentrochat", "error", "all"); -$page['showlink'] = "$webimroot/operator/themes.php?preview=$preview&" . ($showerrors ? "showerr=on&" : "") . "show="; +$page['showlink'] = "$mibewroot/operator/themes.php?preview=$preview&" . ($showerrors ? "showerr=on&" : "") . "show="; $page['previewList'] = array(); foreach ($templateList as $tpl) { diff --git a/src/messenger/webim/operator/translate.php b/src/messenger/webim/operator/translate.php index 7b281aba..a88e3854 100644 --- a/src/messenger/webim/operator/translate.php +++ b/src/messenger/webim/operator/translate.php @@ -53,10 +53,10 @@ function load_idlist($name) function save_message($locale, $key, $value) { - global $webim_encoding; + global $mibew_encoding; $result = ""; $added = false; - $current_encoding = $webim_encoding; + $current_encoding = $mibew_encoding; $fp = fopen(dirname(__FILE__) . "/../locales/$locale/properties", "r"); if ($fp === FALSE) { die "unable to open properties for locale $locale"; @@ -68,7 +68,7 @@ function save_message($locale, $key, $value) if ($keyval[0] == 'encoding') { $current_encoding = trim($keyval[1]); } else if (!$added && $keyval[0] == $key) { - $line = "$key=" . myiconv($webim_encoding, $current_encoding, str_replace("\r", "", str_replace("\n", "\\n", trim($value)))) . "\n"; + $line = "$key=" . myiconv($mibew_encoding, $current_encoding, str_replace("\r", "", str_replace("\n", "\\n", trim($value)))) . "\n"; $added = true; } } @@ -76,7 +76,7 @@ function save_message($locale, $key, $value) } fclose($fp); if (!$added) { - $result .= "$key=" . myiconv($webim_encoding, $current_encoding, str_replace("\r", "", str_replace("\n", "\\n", trim($value)))) . "\n"; + $result .= "$key=" . myiconv($mibew_encoding, $current_encoding, str_replace("\r", "", str_replace("\n", "\\n", trim($value)))) . "\n"; } $fp = @fopen(dirname(__FILE__) . "/../locales/$locale/properties", "w"); if ($fp !== FALSE) { @@ -96,7 +96,7 @@ function save_message($locale, $key, $value) $remoteHost = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $extAddr; fwrite($fp, "# " . date(DATE_RFC822) . " by $remoteHost using $userbrowser\n"); - fwrite($fp, "$key=" . myiconv($webim_encoding, $current_encoding, str_replace("\r", "", str_replace("\n", "\\n", trim($value)))) . "\n"); + fwrite($fp, "$key=" . myiconv($mibew_encoding, $current_encoding, str_replace("\r", "", str_replace("\n", "\\n", trim($value)))) . "\n"); fclose($fp); } } diff --git a/src/messenger/webim/operator/update.php b/src/messenger/webim/operator/update.php index 2375fc8e..c59a5356 100644 --- a/src/messenger/webim/operator/update.php +++ b/src/messenger/webim/operator/update.php @@ -24,7 +24,7 @@ require_once('../libs/groups.php'); $operator = get_logged_in(); if (!$operator) { start_xml_output(); - echo "" . safe_htmlspecialchars(safe_htmlspecialchars(myiconv($webim_encoding, "utf-8", escape_with_cdata(getstring("agent.not_logged_in"))))) . ""; + echo "" . safe_htmlspecialchars(safe_htmlspecialchars(myiconv($mibew_encoding, "utf-8", escape_with_cdata(getstring("agent.not_logged_in"))))) . ""; exit; } @@ -48,7 +48,7 @@ $threadstate_key = array( function thread_to_xml($thread, $link) { global $state_chatting, $threadstate_to_string, $threadstate_key, -$webim_encoding, $operator, $settings, +$mibew_encoding, $operator, $settings, $can_viewthreads, $can_takeover, $mysqlprefix; $state = $threadstate_to_string[$thread['istate']]; $result = ""; foreach ($output as $thr) { - print myiconv($webim_encoding, "utf-8", $thr); + print myiconv($mibew_encoding, "utf-8", $thr); } echo ""; } function print_operators() { - global $webim_encoding; + global $mibew_encoding; echo ""; $operators = operator_get_all(); @@ -159,7 +159,7 @@ function print_operators() if (!operator_is_online($operator)) continue; - $name = myiconv($webim_encoding, "utf-8", safe_htmlspecialchars(safe_htmlspecialchars($operator['vclocalename']))); + $name = myiconv($mibew_encoding, "utf-8", safe_htmlspecialchars(safe_htmlspecialchars($operator['vclocalename']))); $away = operator_is_away($operator) ? " away=\"1\"" : ""; echo ""; diff --git a/src/messenger/webim/styles/default/templates/chat.tpl b/src/messenger/webim/styles/default/templates/chat.tpl index 3fe78eba..c778c380 100644 --- a/src/messenger/webim/styles/default/templates/chat.tpl +++ b/src/messenger/webim/styles/default/templates/chat.tpl @@ -2,15 +2,15 @@ ${msg:chat.window.title.agent} - + - - + + - +