diff --git a/src/messenger/webim/README b/src/messenger/webim/README index 40fb9483..123e94f1 100644 --- a/src/messenger/webim/README +++ b/src/messenger/webim/README @@ -9,14 +9,14 @@ REQUIREMENTS INSTALLATION -1. Create folder with name 'webim' in the root of your website. +1. Create folder with name 'mibew' in the root of your website. 2. Upload all the files contained in this archive (retaining the directory structure) into created folder. - Be sure to chromo the webim folder to 755 and the install folder to 644. -3. Add a MySQL database with the name 'webim' -4. Edit /webim/libs/config.php to the information needed to connect to the database -5. Using your web browser visit http:///webim/install/ and + Be sure to chromo the mibew folder to 755 and the install folder to 644. +3. Add a MySQL database with the name 'mibew' +4. Edit /mibew/libs/config.php to the information needed to connect to the database +5. Using your web browser visit http:///mibew/install/ and hit 'Create tables' -6. Remove /webim/install/ directory from your server +6. Remove /mibew/install/ directory from your server 7. Logon as user: admin password: @@ -24,18 +24,18 @@ INSTALLATION 9. Change your password and name. 10. Wait for your visitors on 'Pending users' page. -On unix/linux platforms change the owner of /webim/images/avatar folder +On unix/linux platforms change the owner of /mibew/images/avatar folder to the user, under which the web server is running (for instance, www). -The owner should have all rights on the folder /webim/images/avatar -(chmod 700 /webim/images/avatar). +The owner should have all rights on the folder /mibew/images/avatar +(chmod 700 /mibew/images/avatar). UPDATE -1. Backup your /webim/libs/config.php -2. Backup your /webim/images/avatar folder. -3. Delete the items in the webim folder on the server. -4. Upload all the files contained in the downloaded archive (retaining the directory structure) into webim folder. +1. Backup your /mibew/libs/config.php +2. Backup your /mibew/images/avatar folder. +3. Delete the items in the mibew folder on the server. +4. Upload all the files contained in the downloaded archive (retaining the directory structure) into mibew folder. 5. Re-edit the MySQL database settings you config.php -6. Visit http:///webim/install/ and follow the instructions to update database (if needed). -7. Remove /webim/install/ directory from your server -8. Restore contents of /webim/images/avatar folder. \ No newline at end of file +6. Visit http:///mibew/install/ and follow the instructions to update database (if needed). +7. Remove /mibew/install/ directory from your server +8. Restore contents of /mibew/images/avatar folder. \ No newline at end of file diff --git a/src/messenger/webim/b.php b/src/messenger/webim/b.php index a0be44eb..36cdd818 100644 --- a/src/messenger/webim/b.php +++ b/src/messenger/webim/b.php @@ -30,7 +30,7 @@ if($referer && isset($_SESSION['threadid'])) { } } -$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_exists($lang)) { $lang = $current_locale; diff --git a/src/messenger/webim/client.php b/src/messenger/webim/client.php index 6ec8e397..c632c247 100644 --- a/src/messenger/webim/client.php +++ b/src/messenger/webim/client.php @@ -168,7 +168,7 @@ if( !isset($_GET['token']) || !isset($_GET['thread']) ) { $threadid = $thread->id; $token = $thread->lastToken; $chatstyle = verifyparam( "style", "/^\w+$/", ""); - header("Location: $webimroot/client.php?thread=$threadid&token=$token".($chatstyle ? "&style=$chatstyle" : "")); + header("Location: $mibewroot/client.php?thread=$threadid&token=$token".($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 5bfe390d..95aacb7c 100644 --- a/src/messenger/webim/install/dbinfo.php +++ b/src/messenger/webim/install/dbinfo.php @@ -288,10 +288,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 81056a56..9b120e21 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -317,6 +317,6 @@ if ($act == "silentcreateall") { } mysql_close($link); -header("Location: $webimroot/install/index.php"); +header("Location: $mibewroot/install/index.php"); exit; ?> \ No newline at end of file diff --git a/src/messenger/webim/install/index.php b/src/messenger/webim/install/index.php index 977ad168..22201333 100644 --- a/src/messenger/webim/install/index.php +++ b/src/messenger/webim/install/index.php @@ -33,7 +33,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(); @@ -42,9 +42,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"; @@ -52,9 +52,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; } @@ -99,12 +99,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))); } @@ -125,10 +125,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; } @@ -139,7 +139,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; } @@ -152,7 +152,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); @@ -173,7 +173,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) { @@ -183,14 +183,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); @@ -199,7 +199,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; @@ -207,7 +207,7 @@ function check_tables($link) function check_columns($link) { - global $dbtables, $dbtables_can_update, $dbtables_indexes, $errors, $page, $webimroot; + global $dbtables, $dbtables_can_update, $dbtables_indexes, $errors, $page, $mibewroot; $need_to_create_columns = false; foreach ($dbtables as $id => $columns) { @@ -221,7 +221,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; } @@ -243,7 +243,7 @@ function check_columns($link) if ($need_to_create_columns || $need_to_create_indexes) { $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; } @@ -307,11 +307,11 @@ function add_canned_messages($link){ function check_status() { - global $page, $webimroot, $dbversion, $mysqlprefix; + global $page, $mibewroot, $dbversion, $mysqlprefix; $page['done'][] = getlocal2("install.0.php", array(phpversion())); - if (!check_webimroot()) { + if (!check_mibewroot()) { return; } @@ -347,8 +347,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/compiled/chat/models/sound_managers/chat.js b/src/messenger/webim/js/compiled/chat/models/sound_managers/chat.js index aedc5653..5ae8c63a 100644 --- a/src/messenger/webim/js/compiled/chat/models/sound_managers/chat.js +++ b/src/messenger/webim/js/compiled/chat/models/sound_managers/chat.js @@ -5,5 +5,5 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,c){a.Models.ChatSoundManager=a.Models.BaseSoundManager.extend({defaults:c.extend({},a.Models.BaseSoundManager.prototype.defaults,{skipNextMessageSound:!1}),initialize:function(){var b=a.Objects,c=this;b.Collections.messages.on("multiple:add",this.playNewMessageSound,this);b.Models.messageForm.on("before:post",function(){c.set({skipNextMessageSound:!0})})},playNewMessageSound:function(){if(!this.get("skipNextMessageSound")){var b=a.Objects.Models.page.get("webimRoot");b&&this.play(b+"/sounds/new_message.wav")}this.set({skipNextMessageSound:!1})}})})(Mibew, +(function(a,c){a.Models.ChatSoundManager=a.Models.BaseSoundManager.extend({defaults:c.extend({},a.Models.BaseSoundManager.prototype.defaults,{skipNextMessageSound:!1}),initialize:function(){var b=a.Objects,c=this;b.Collections.messages.on("multiple:add",this.playNewMessageSound,this);b.Models.messageForm.on("before:post",function(){c.set({skipNextMessageSound:!0})})},playNewMessageSound:function(){if(!this.get("skipNextMessageSound")){var b=a.Objects.Models.page.get("mibewRoot");b&&this.play(b+"/sounds/new_message.wav")}this.set({skipNextMessageSound:!1})}})})(Mibew, _); diff --git a/src/messenger/webim/js/compiled/chat_app.js b/src/messenger/webim/js/compiled/chat_app.js index a2dc6592..1fbd805a 100644 --- a/src/messenger/webim/js/compiled/chat_app.js +++ b/src/messenger/webim/js/compiled/chat_app.js @@ -125,7 +125,7 @@ a):a.trigger("submit:error",a,{code:b.errorCode,message:b.errorMessage||""})},!0 You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,c){a.Models.ChatSoundManager=a.Models.BaseSoundManager.extend({defaults:c.extend({},a.Models.BaseSoundManager.prototype.defaults,{skipNextMessageSound:!1}),initialize:function(){var b=a.Objects,c=this;b.Collections.messages.on("multiple:add",this.playNewMessageSound,this);b.Models.messageForm.on("before:post",function(){c.set({skipNextMessageSound:!0})})},playNewMessageSound:function(){if(!this.get("skipNextMessageSound")){var b=a.Objects.Models.page.get("webimRoot");b&&this.play(b+"/sounds/new_message.wav")}this.set({skipNextMessageSound:!1})}})})(Mibew, +(function(a,c){a.Models.ChatSoundManager=a.Models.BaseSoundManager.extend({defaults:c.extend({},a.Models.BaseSoundManager.prototype.defaults,{skipNextMessageSound:!1}),initialize:function(){var b=a.Objects,c=this;b.Collections.messages.on("multiple:add",this.playNewMessageSound,this);b.Models.messageForm.on("before:post",function(){c.set({skipNextMessageSound:!0})})},playNewMessageSound:function(){if(!this.get("skipNextMessageSound")){var b=a.Objects.Models.page.get("mibewRoot");b&&this.play(b+"/sounds/new_message.wav")}this.set({skipNextMessageSound:!1})}})})(Mibew, _); /* Copyright 2005-2013 the original author or authors. diff --git a/src/messenger/webim/js/compiled/update.js b/src/messenger/webim/js/compiled/update.js index a575db8c..a5eae88d 100644 --- a/src/messenger/webim/js/compiled/update.js +++ b/src/messenger/webim/js/compiled/update.js @@ -1,29 +1,29 @@ function loadNews() { - if (typeof(window.webimNews) == "undefined" || typeof(window.webimNews.length) == "undefined") + if (typeof(window.mibewNews) == "undefined" || typeof(window.mibewNews.length) == "undefined") return; var str = "
"; - for (var i = 0; i < window.webimNews.length; i++) { - str += "
" + 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/compiled/users/collection_views/threads_collection.js b/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js index 4ff2e849..eab187ab 100644 --- a/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js +++ b/src/messenger/webim/js/compiled/users/collection_views/threads_collection.js @@ -7,6 +7,6 @@ */ (function(d,h,j){d.Views.ThreadsCollection=d.Views.CompositeBase.extend({template:h.templates.threads_collection,itemView:d.Views.QueuedThread,itemViewContainer:"#threads-container",emptyView:d.Views.NoThreads,className:"threads-collection",collectionEvents:{sort:"renderCollection","sort:field":"createSortField",add:"threadAdded"},itemViewOptions:function(a){return{tagName:d.Objects.Models.page.get("threadTag"),collection:a.get("controls")}},initialize:function(){window.setInterval(j.bind(this.updateTimers, this),2E3);this.on("itemview:before:render",this.updateStyles,this);this.on("render",this.updateTimers,this)},updateStyles:function(a){var b=this.collection,c=a.model,d=this;if(c.id){var e=this.getQueueCode(c),f=!1,g=!1,b=b.filter(function(a){return d.getQueueCode(a)==e});0id . "&token=" . $thread->lastToken; // Set link to send mail page - $data['chat']['links']['mail'] = "$webimroot/client.php?" + $data['chat']['links']['mail'] = "$mibewroot/client.php?" . $params . "&act=mailthread"; @@ -478,13 +478,13 @@ function setup_chatview_for_user(Thread $thread) { /** * Prepare some data for chat for operator * - * @global string $webimroot Root URL path for Mibew - * @global string $webim_encoding Current Mibew encoding + * @global string $mibewroot Root URL path for Mibew + * @global string $mibew_encoding Current Mibew encoding * @param Thread $thread thread object * @return array Array of chat view data */ function setup_chatview_for_operator(Thread $thread, $operator) { - global $webimroot, $webim_encoding; + global $mibewroot, $mibew_encoding; $data = setup_chatview($thread); @@ -518,7 +518,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) { // Set history window params $history_link_params = array("userid" => (string)$thread->userId); $data['chat']['links']['history'] = add_params( - $webimroot . "/operator/userhistory.php", + $mibewroot . "/operator/userhistory.php", $history_link_params ); @@ -527,7 +527,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) { $visitor = track_get_visitor_by_threadid($thread->id); $tracked_link_params = array("visitor" => "" . $visitor['visitorid']); $data['chat']['links']['tracked'] = add_params( - $webimroot . "/operator/tracked.php", + $mibewroot . "/operator/tracked.php", $tracked_link_params ); } @@ -552,7 +552,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) { : cutstring($answer['vcvalue'], 97, '...')) ), 'full' => myiconv( - $webim_encoding, + $mibew_encoding, getoutputenc(), $answer['vcvalue'] ) @@ -562,7 +562,7 @@ function setup_chatview_for_operator(Thread $thread, $operator) { } // Set link to user redirection page $params = "thread=" . $thread->id . "&token=" . $thread->lastToken; - $data['chat']['links']['redirect'] = "$webimroot/operator/agent.php?" + $data['chat']['links']['redirect'] = "$mibewroot/operator/agent.php?" . $params . "&act=redirect"; @@ -587,13 +587,13 @@ function ban_for_addr($addr) 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/classes/thread.php b/src/messenger/webim/libs/classes/thread.php index 2a452e7b..5a37db78 100644 --- a/src/messenger/webim/libs/classes/thread.php +++ b/src/messenger/webim/libs/classes/thread.php @@ -721,7 +721,7 @@ Class Thread { * Load messages from database corresponding to the thread those ID's more * than $lastid * - * @global $webim_encoding + * @global $mibew_encoding * @param boolean $is_user Boolean TRUE if messages loads for user * and boolean FALSE if they loads for operator. * @param int $lastid ID of the last loaded message. @@ -738,7 +738,7 @@ Class Thread { * @see Thread::postMessage() */ public function getMessages($is_user, &$last_id) { - global $webim_encoding; + global $mibew_encoding; $db = Database::getInstance(); @@ -760,7 +760,7 @@ Class Thread { foreach ($messages as $key => $msg) { // Change sender name encoding $messages[$key]['name'] = myiconv( - $webim_encoding, + $mibew_encoding, "utf-8", $msg['name'] ); @@ -776,7 +776,7 @@ Class Thread { // Change message body encoding $messages[$key]['message'] = myiconv( - $webim_encoding, + $mibew_encoding, "utf-8", $msg['message'] ); diff --git a/src/messenger/webim/libs/classes/thread_processor.php b/src/messenger/webim/libs/classes/thread_processor.php index 87592449..0490a6e2 100644 --- a/src/messenger/webim/libs/classes/thread_processor.php +++ b/src/messenger/webim/libs/classes/thread_processor.php @@ -355,7 +355,7 @@ class ThreadProcessor extends ClientSideProcessor { * @throws ThreadProcessorException */ protected function apiRename($args) { - global $namecookie, $webim_encoding; + global $namecookie, $mibew_encoding; // Check rename possibility if( Settings::get('usercanchangename') != "1" ) { @@ -374,7 +374,7 @@ class ThreadProcessor extends ClientSideProcessor { //Rename user $thread->renameUser($args['name']); // Update user name in cookies - $data = strtr(base64_encode(myiconv($webim_encoding,"utf-8",$args['name'])), '+/=', '-_,'); + $data = strtr(base64_encode(myiconv($mibew_encoding,"utf-8",$args['name'])), '+/=', '-_,'); setcookie($namecookie, $data, time()+60*60*24*365); } @@ -455,7 +455,7 @@ class ThreadProcessor extends ClientSideProcessor { $newname = $args['name']; if($newname != $visitor['name']) { $data = strtr( - base64_encode(myiconv($webim_encoding,"utf-8",$newname)), + base64_encode(myiconv($mibew_encoding,"utf-8",$newname)), '+/=', '-_,' ); @@ -656,7 +656,7 @@ class ThreadProcessor extends ClientSideProcessor { ); // Send - webim_mail($inbox_mail, $email, $subject, $body); + mibew_mail($inbox_mail, $email, $subject, $body); } } } diff --git a/src/messenger/webim/libs/classes/users_processor.php b/src/messenger/webim/libs/classes/users_processor.php index e4b67a3f..b22f2356 100644 --- a/src/messenger/webim/libs/classes/users_processor.php +++ b/src/messenger/webim/libs/classes/users_processor.php @@ -473,7 +473,7 @@ class UsersProcessor extends ClientSideProcessor { /** * Return updated operators list. API function * - * @global string $webim_encoding Encoding for the current locale + * @global string $mibew_encoding Encoding for the current locale * * @param array $args Associative array of arguments. It must contains * following keys: @@ -483,7 +483,7 @@ class UsersProcessor extends ClientSideProcessor { * - 'operators': array of online operators */ protected function apiUpdateOperators($args) { - global $webim_encoding; + global $mibew_encoding; // Check access and get operators info $operator = self::checkOperator($args['agentId']); @@ -514,7 +514,7 @@ class UsersProcessor extends ClientSideProcessor { 'id' => (int)$item['operatorid'], // Convert name to UTF-8 'name' => myiconv( - $webim_encoding, + $mibew_encoding, "utf-8", htmlspecialchars($item['vclocalename']) ), diff --git a/src/messenger/webim/libs/common/constants.php b/src/messenger/webim/libs/common/constants.php index 1531b71f..0f3063b1 100644 --- a/src/messenger/webim/libs/common/constants.php +++ b/src/messenger/webim/libs/common/constants.php @@ -48,6 +48,6 @@ $default_cron_key = md5( /** * Name for cookie to track visitor */ -$visitorcookie = "WEBIM_VisitorID"; +$visitorcookie = "MIBEW_VisitorID"; ?> \ No newline at end of file diff --git a/src/messenger/webim/libs/common/locale.php b/src/messenger/webim/libs/common/locale.php index 99cd39f5..9337bb6e 100644 --- a/src/messenger/webim/libs/common/locale.php +++ b/src/messenger/webim/libs/common/locale.php @@ -64,8 +64,8 @@ function get_user_locale() { global $default_locale; - if (isset($_COOKIE['webim_locale'])) { - $requested_lang = $_COOKIE['webim_locale']; + if (isset($_COOKIE['mibew_locale'])) { + $requested_lang = $_COOKIE['mibew_locale']; if (locale_exists($requested_lang)) return $requested_lang; } @@ -89,13 +89,13 @@ function get_user_locale() function get_locale() { - global $webimroot, $locale_pattern; + global $mibewroot, $locale_pattern; $locale = verifyparam("locale", $locale_pattern, ""); if ($locale && locale_exists($locale)) { $_SESSION['locale'] = $locale; - setcookie('webim_locale', $locale, time() + 60 * 60 * 24 * 1000, "$webimroot/"); + setcookie('mibew_locale', $locale, time() + 60 * 60 * 24 * 1000, "$mibewroot/"); } else if (isset($_SESSION['locale'])) { $locale = $_SESSION['locale']; } @@ -161,14 +161,14 @@ function load_messages($locale) { /** * Read and parse locale file. * - * @global string $webim_encoding Internal Mibew encoding. Defined in + * @global string $mibew_encoding Internal Mibew encoding. Defined in * libs/config.php. * * @param string $path Locale file path * @return array Associative array with following keys: * - 'encoding': string, one of service field from locale file, determines * encoding of strings in the locale file. If there is no 'encoding' field in - * the locale file, this variable will be equal to $webim_encoding. + * the locale file, this variable will be equal to $mibew_encoding. * * - 'output_encoding': string, one of service field from locale file, * determines in what encoding document should be output for this locale. @@ -177,14 +177,14 @@ function load_messages($locale) { * * - 'messages': associative array of localized strings. The keys of the array * are localization keys and the values of the array are localized strings. - * All localized strings have internal Mibew encoding(see $webim_encoding + * All localized strings have internal Mibew encoding(see $mibew_encoding * value in libs/config.php). */ function read_locale_file($path) { - global $webim_encoding; + global $mibew_encoding; // Set default values - $current_encoding = $webim_encoding; + $current_encoding = $mibew_encoding; $output_encoding = null; $messages = array(); @@ -202,12 +202,12 @@ function read_locale_file($path) { $current_encoding = trim($value); } else if ($key == 'output_encoding') { $output_encoding = trim($value); - } else if ($current_encoding == $webim_encoding) { + } else if ($current_encoding == $mibew_encoding) { $messages[$key] = str_replace("\\n", "\n", trim($value)); } else { $messages[$key] = myiconv( $current_encoding, - $webim_encoding, + $mibew_encoding, str_replace("\\n", "\n", trim($value)) ); } @@ -224,10 +224,10 @@ function read_locale_file($path) { 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) @@ -254,14 +254,14 @@ function getstring($text) function getlocal($text) { - global $current_locale, $webim_encoding; - return myiconv($webim_encoding, getoutputenc(), getstring_($text, $current_locale)); + global $current_locale, $mibew_encoding; + return myiconv($mibew_encoding, getoutputenc(), getstring_($text, $current_locale)); } function getlocal_($text, $locale) { - global $webim_encoding; - return myiconv($webim_encoding, getoutputenc(), getstring_($text, $locale)); + global $mibew_encoding; + return myiconv($mibew_encoding, getoutputenc(), getstring_($text, $locale)); } function getstring2_($text, $params, $locale) @@ -281,8 +281,8 @@ function getstring2($text, $params) function getlocal2($text, $params) { - global $current_locale, $webim_encoding; - $string = myiconv($webim_encoding, getoutputenc(), getstring_($text, $current_locale)); + global $current_locale, $mibew_encoding; + $string = myiconv($mibew_encoding, getoutputenc(), getstring_($text, $current_locale)); for ($i = 0; $i < count($params); $i++) { $string = str_replace("{" . $i . "}", $params[$i], $string); } @@ -292,8 +292,8 @@ function getlocal2($text, $params) /* prepares for Javascript string */ function getlocalforJS($text, $params) { - global $current_locale, $webim_encoding; - $string = myiconv($webim_encoding, getoutputenc(), getstring_($text, $current_locale)); + global $current_locale, $mibew_encoding; + $string = myiconv($mibew_encoding, getoutputenc(), getstring_($text, $current_locale)); $string = str_replace("\"", "\\\"", str_replace("\n", "\\n", $string)); for ($i = 0; $i < count($params); $i++) { $string = str_replace("{" . $i . "}", $params[$i], $string); diff --git a/src/messenger/webim/libs/common/request.php b/src/messenger/webim/libs/common/request.php index 42997214..bcdbfb2c 100644 --- a/src/messenger/webim/libs/common/request.php +++ b/src/messenger/webim/libs/common/request.php @@ -20,9 +20,9 @@ require_once(dirname(__FILE__) . '/locale.php'); /* 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); } @@ -34,9 +34,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); } @@ -47,11 +47,11 @@ function getparam($name) 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); } @@ -60,11 +60,11 @@ function getgetparam($name, $default = '') 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/common/response.php b/src/messenger/webim/libs/common/response.php index da0ad2aa..4b4145f1 100644 --- a/src/messenger/webim/libs/common/response.php +++ b/src/messenger/webim/libs/common/response.php @@ -60,8 +60,8 @@ function start_js_output(){ function topage($text) { - global $webim_encoding; - return myiconv($webim_encoding, getoutputenc(), $text); + global $mibew_encoding; + return myiconv($mibew_encoding, getoutputenc(), $text); } /** diff --git a/src/messenger/webim/libs/default_config.php b/src/messenger/webim/libs/default_config.php index 89868cf3..ff47ceda 100644 --- a/src/messenger/webim/libs/default_config.php +++ b/src/messenger/webim/libs/default_config.php @@ -25,12 +25,12 @@ /* * Application path on server */ -$webimroot = "/webim"; +$mibewroot = "/mibew"; /* * Internal encoding */ -$webim_encoding = "utf-8"; +$mibew_encoding = "utf-8"; /* * MySQL Database parameters @@ -49,7 +49,7 @@ $use_persistent_connection = false; /* * Mailbox */ -$webim_mailbox = "webim@yourdomain.com"; +$mibew_mailbox = "mibew@yourdomain.com"; $mail_encoding = "utf-8"; /* diff --git a/src/messenger/webim/libs/expand.php b/src/messenger/webim/libs/expand.php index b825401b..6332811b 100644 --- a/src/messenger/webim/libs/expand.php +++ b/src/messenger/webim/libs/expand.php @@ -44,15 +44,15 @@ function expand_condition($matches) function expand_var($matches) { - global $page, $webimroot, $errors, $current_style, $flatten_page; + global $page, $mibewroot, $errors, $current_style, $flatten_page; $prefix = $matches[1]; $var = $matches[2]; if (!$prefix) { - if ($var == 'webimroot') { - return $webimroot; + if ($var == 'mibewroot') { + return $mibewroot; } else if ($var == 'tplroot') { - return "$webimroot/styles/dialogs/$current_style"; + return "$mibewroot/styles/dialogs/$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 e4f2a48b..2eb496e3 100644 --- a/src/messenger/webim/libs/getcode.php +++ b/src/messenger/webim/libs/getcode.php @@ -35,7 +35,7 @@ function generate_button($title, $locale, $style, $invitationstyle, $group, $inn if ($operator_code) { $form_on_submit = "if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 " . "&& window.event.preventDefault) window.event.preventDefault();" . - "this.newWindow = window.open({$jslink} + '&operator_code=' + document.getElementById('mibewOperatorCodeField').value, 'webim', '{$popup_options}');" . + "this.newWindow = window.open({$jslink} + '&operator_code=' + document.getElementById('mibewOperatorCodeField').value, 'mibew', '{$popup_options}');" . "this.newWindow.focus();this.newWindow.opener=window;return false;"; $temp = '
' . '' . @@ -45,7 +45,7 @@ function generate_button($title, $locale, $style, $invitationstyle, $group, $inn // Generate button $temp = get_popup($link, "$jslink", - $inner, $title, "webim", $popup_options); + $inner, $title, "mibew", $popup_options); if (Settings::get('enabletracking')) { $widget_data = array(); diff --git a/src/messenger/webim/libs/groups.php b/src/messenger/webim/libs/groups.php index d9d0765a..0e0a31ed 100644 --- a/src/messenger/webim/libs/groups.php +++ b/src/messenger/webim/libs/groups.php @@ -37,11 +37,11 @@ function get_group_name($group) function setup_group_settings_tabs($gid, $active) { - global $page, $webimroot; + global $page, $mibewroot; if ($gid) { $page['tabs'] = array( - getlocal("page_group.tab.main") => $active != 0 ? "$webimroot/operator/group.php?gid=$gid" : "", - getlocal("page_group.tab.members") => $active != 1 ? "$webimroot/operator/groupmembers.php?gid=$gid" : "", + getlocal("page_group.tab.main") => $active != 0 ? "$mibewroot/operator/group.php?gid=$gid" : "", + getlocal("page_group.tab.members") => $active != 1 ? "$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 a9b17c21..cbd0d528 100644 --- a/src/messenger/webim/libs/notify.php +++ b/src/messenger/webim/libs/notify.php @@ -15,20 +15,20 @@ * limitations under the License. */ -function webim_mail($toaddr, $reply_to, $subject, $body) +function mibew_mail($toaddr, $reply_to, $subject, $body) { - 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); - @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); } ?> \ No newline at end of file diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index a78afb3b..a61eb694 100644 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -474,7 +474,7 @@ function append_query($link, $pv) * an associative array with folloing keys: * - 'requested_page': string, page where login check was failed. * - * @global string $webimroot Path of the mibew instalation from server root. + * @global string $mibewroot Path of the mibew instalation from server root. * It defined in libs/config.php * @global string $session_prefix Use as prefix for all session variables to * allow many instalation of the mibew messenger at one server. It defined in @@ -486,10 +486,10 @@ function append_query($link, $pv) * null otherwise. */ function check_login($redirect = true) { - global $webimroot, $session_prefix; + global $mibewroot, $session_prefix; if (!isset($_SESSION[$session_prefix."operator"])) { - if (isset($_COOKIE['webim_lite'])) { - list($login, $pwd) = preg_split("/,/", $_COOKIE['webim_lite'], 2); + if (isset($_COOKIE['mibew_operator'])) { + list($login, $pwd) = preg_split("/,/", $_COOKIE['mibew_operator'], 2); $op = operator_by_login($login); if ($op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd && !operator_is_disabled($op)) { $_SESSION[$session_prefix."operator"] = $op; @@ -511,7 +511,7 @@ function check_login($redirect = true) { // Redirect operator if need if ($redirect) { $_SESSION['backpath'] = $requested; - header("Location: $webimroot/operator/login.php"); + header("Location: $mibewroot/operator/login.php"); exit; } else { return null; @@ -523,10 +523,10 @@ function check_login($redirect = true) { // Force the admin to set a password after the installation function force_password($operator) { - global $webimroot; + global $mibewroot; if($operator['vcpassword']==md5('')) { - header("Location: $webimroot/operator/operator.php?op=1"); + header("Location: $mibewroot/operator/operator.php?op=1"); exit; } } @@ -545,7 +545,7 @@ function get_logged_in() * - 'operator': array of the logged in operator info; * - 'remember': boolean, indicates if system should remember operator. * - * @global string $webimroot Path of the mibew instalation from server root. + * @global string $mibewroot Path of the mibew instalation from server root. * It defined in libs/config.php * @global string $session_prefix Use as prefix for all session variables to * allow many instalation of the mibew messenger at one server. It defined in @@ -555,14 +555,14 @@ function get_logged_in() * @param boolean $remember Indicates if system should remember operator */ function login_operator($operator, $remember) { - global $webimroot, $session_prefix; + global $mibewroot, $session_prefix; $_SESSION[$session_prefix."operator"] = $operator; if ($remember) { $value = $operator['vclogin'] . "," . md5($operator['vcpassword']); - setcookie('webim_lite', $value, time() + 60 * 60 * 24 * 1000, "$webimroot/"); + setcookie('mibew_operator', $value, time() + 60 * 60 * 24 * 1000, "$mibewroot/"); - } else if (isset($_COOKIE['webim_lite'])) { - setcookie('webim_lite', '', time() - 3600, "$webimroot/"); + } else if (isset($_COOKIE['mibew_operator'])) { + setcookie('mibew_operator', '', time() - 3600, "$mibewroot/"); } // Trigger login event @@ -579,18 +579,18 @@ function login_operator($operator, $remember) { * * Triggers 'operatorLogout' event after operator logged out. * - * @global string $webimroot Path of the mibew instalation from server root. + * @global string $mibewroot Path of the mibew instalation from server root. * It defined in libs/config.php * @global string $session_prefix Use as prefix for all session variables to * allow many instalation of the mibew messenger at one server. It defined in * libs/common/constants.php */ function logout_operator() { - global $webimroot, $session_prefix; + global $mibewroot, $session_prefix; unset($_SESSION[$session_prefix."operator"]); unset($_SESSION['backpath']); - if (isset($_COOKIE['webim_lite'])) { - setcookie('webim_lite', '', time() - 3600, "$webimroot/"); + if (isset($_COOKIE['mibew_operator'])) { + setcookie('mibew_operator', '', time() - 3600, "$mibewroot/"); } // Trigger logout event @@ -600,7 +600,7 @@ function logout_operator() { function setup_redirect_links($threadid, $operator, $token) { - global $page, $webimroot; + global $page, $mibewroot; $operator_in_isolation = in_isolation($operator); @@ -638,7 +638,7 @@ function setup_redirect_links($threadid, $operator, $token) : getlocal("char.redirect.operator.away_suff") ) : ""; - $agent_list .= "
  • " . topage(get_operator_name($agent)) . " $status
  • "; @@ -655,7 +655,7 @@ function setup_redirect_links($threadid, $operator, $token) : ($group['ilastseenaway'] !== NULL && $group['ilastseenaway'] < Settings::get('online_timeout') ? getlocal("char.redirect.operator.away_suff") : ""); - $group_list .= "
  • " . 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 28918c42..9b0e138a 100644 --- a/src/messenger/webim/libs/operator_settings.php +++ b/src/messenger/webim/libs/operator_settings.php @@ -17,14 +17,14 @@ function setup_operator_settings_tabs($opId, $active) { - global $page, $webimroot; + global $page, $mibewroot; if ($opId) { $page['tabs'] = array( - getlocal("page_agent.tab.main") => $active != 0 ? "$webimroot/operator/operator.php?op=$opId" : "", - getlocal("page_agent.tab.avatar") => $active != 1 ? "$webimroot/operator/avatar.php?op=$opId" : "", - getlocal("page_agent.tab.groups") => $active != 2 ? "$webimroot/operator/opgroups.php?op=$opId" : "", - getlocal("page_agent.tab.permissions") => $active != 3 ? "$webimroot/operator/permissions.php?op=$opId" : "" + getlocal("page_agent.tab.main") => $active != 0 ? "$mibewroot/operator/operator.php?op=$opId" : "", + getlocal("page_agent.tab.avatar") => $active != 1 ? "$mibewroot/operator/avatar.php?op=$opId" : "", + getlocal("page_agent.tab.groups") => $active != 2 ? "$mibewroot/operator/opgroups.php?op=$opId" : "", + getlocal("page_agent.tab.permissions") => $active != 3 ? "$mibewroot/operator/permissions.php?op=$opId" : "" ); } else { $page['tabs'] = array(); diff --git a/src/messenger/webim/libs/pagination.php b/src/messenger/webim/libs/pagination.php index 2ec5a974..4c08a2ee 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) 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 8e12a5c6..1943a401 100644 --- a/src/messenger/webim/libs/settings.php +++ b/src/messenger/webim/libs/settings.php @@ -17,15 +17,15 @@ function setup_settings_tabs($active) { - global $page, $webimroot; + global $page, $mibewroot; $page['tabs'] = array( - getlocal("page_settings.tab.main") => $active != 0 ? "$webimroot/operator/settings.php" : "", - getlocal("page_settings.tab.features") => $active != 1 ? "$webimroot/operator/features.php" : "", - getlocal("page_settings.tab.performance") => $active != 2 ? "$webimroot/operator/performance.php" : "", - getlocal("page_settings.tab.themes") => $active != 3 ? "$webimroot/operator/themes.php" : "", + getlocal("page_settings.tab.main") => $active != 0 ? "$mibewroot/operator/settings.php" : "", + getlocal("page_settings.tab.features") => $active != 1 ? "$mibewroot/operator/features.php" : "", + getlocal("page_settings.tab.performance") => $active != 2 ? "$mibewroot/operator/performance.php" : "", + getlocal("page_settings.tab.themes") => $active != 3 ? "$mibewroot/operator/themes.php" : "", ); if (Settings::get('enabletracking')) { - $page['tabs'][getlocal("page_settings.tab.invitationthemes")] = ($active != 4 ? "$webimroot/operator/invitationthemes.php" : ""); + $page['tabs'][getlocal("page_settings.tab.invitationthemes")] = ($active != 4 ? "$mibewroot/operator/invitationthemes.php" : ""); } } diff --git a/src/messenger/webim/libs/statistics.php b/src/messenger/webim/libs/statistics.php index afee2b91..5c424f4a 100644 --- a/src/messenger/webim/libs/statistics.php +++ b/src/messenger/webim/libs/statistics.php @@ -29,13 +29,13 @@ function get_statistics_query($type) function setup_statistics_tabs($active) { - global $page, $webimroot; + global $page, $mibewroot; $page['tabs'] = array( - getlocal("report.bydate.title") => $active != 0 ? "$webimroot/operator/statistics.php".get_statistics_query('bydate') : "", - getlocal("report.byoperator.title") => $active != 1 ? "$webimroot/operator/statistics.php".get_statistics_query('byagent') : "" + getlocal("report.bydate.title") => $active != 0 ? "$mibewroot/operator/statistics.php".get_statistics_query('bydate') : "", + getlocal("report.byoperator.title") => $active != 1 ? "$mibewroot/operator/statistics.php".get_statistics_query('byagent') : "" ); if (Settings::get('enabletracking')) { - $page['tabs'][getlocal("report.bypage.title")] = ($active != 2 ? "$webimroot/operator/statistics.php".get_statistics_query('bypage') : ""); + $page['tabs'][getlocal("report.bypage.title")] = ($active != 2 ? "$mibewroot/operator/statistics.php".get_statistics_query('bypage') : ""); } } 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 ddbeb8d7..8406aa7b 100644 --- a/src/messenger/webim/mail.php +++ b/src/messenger/webim/mail.php @@ -68,7 +68,7 @@ $body = getstring2( array($thread->userName, $history, Settings::get('title'), Settings::get('hosturl')) ); -webim_mail($email, $webim_mailbox, $subject, $body); +mibew_mail($email, $mibew_mailbox, $subject, $body); $page = array_merge_recursive( $page, diff --git a/src/messenger/webim/operator/agent.php b/src/messenger/webim/operator/agent.php index 31b6f283..7de8a6d2 100644 --- a/src/messenger/webim/operator/agent.php +++ b/src/messenger/webim/operator/agent.php @@ -98,7 +98,7 @@ if (!isset($_GET['token'])) { } $token = $thread->lastToken; - header("Location: $webimroot/operator/agent.php?thread=$threadid&token=$token"); + header("Location: $mibewroot/operator/agent.php?thread=$threadid&token=$token"); exit; } diff --git a/src/messenger/webim/operator/avatar.php b/src/messenger/webim/operator/avatar.php index 7c1c2197..aae58ce7 100644 --- a/src/messenger/webim/operator/avatar.php +++ b/src/messenger/webim/operator/avatar.php @@ -63,7 +63,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 { @@ -76,7 +76,7 @@ if (!$op) { if ($opId && $avatar && $_SESSION[$session_prefix."operator"] && $operator['operatorid'] == $opId) { $_SESSION[$session_prefix."operator"]['vcavatar'] = $avatar; } - header("Location: $webimroot/operator/avatar.php?op=$opId"); + header("Location: $mibewroot/operator/avatar.php?op=$opId"); exit; } else { $page['avatar'] = topage($op['vcavatar']); @@ -85,7 +85,7 @@ if (!$op) { } else { if (isset($_GET['delete']) && $_GET['delete'] == "true" && $canmodify) { update_operator_avatar($op['operatorid'], ''); - header("Location: $webimroot/operator/avatar.php?op=$opId"); + header("Location: $mibewroot/operator/avatar.php?op=$opId"); exit; } $page['avatar'] = topage($op['vcavatar']); diff --git a/src/messenger/webim/operator/ban.php b/src/messenger/webim/operator/ban.php index a946dcff..f68d9c24 100644 --- a/src/messenger/webim/operator/ban.php +++ b/src/messenger/webim/operator/ban.php @@ -83,7 +83,7 @@ if (isset($_POST['address'])) { } 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 cd4a0f52..811d63cd 100644 --- a/src/messenger/webim/operator/blocked.php +++ b/src/messenger/webim/operator/blocked.php @@ -37,7 +37,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') { if (count($errors) == 0) { $db->query("delete from {chatban} where banid = ?", array($banId)); - 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 d0b98bf8..eb73c22a 100644 --- a/src/messenger/webim/operator/canned.php +++ b/src/messenger/webim/operator/canned.php @@ -78,7 +78,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'delete') { if (count($errors) == 0) { $db = Database::getInstance(); $db->query("delete from {chatresponses} where id = ?", array($key)); - header("Location: $webimroot/operator/canned.php?lang=$lang&group=$groupid"); + header("Location: $mibewroot/operator/canned.php?lang=$lang&group=$groupid"); exit; } } diff --git a/src/messenger/webim/operator/features.php b/src/messenger/webim/operator/features.php index 058ca988..ca31831d 100644 --- a/src/messenger/webim/operator/features.php +++ b/src/messenger/webim/operator/features.php @@ -49,7 +49,7 @@ if (isset($_POST['sent'])) { Settings::set($opt,(verifyparam($opt, "/^on$/", "") == "on" ? "1" : "0")); } Settings::update(); - 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 328e6ee1..ecd2b329 100644 --- a/src/messenger/webim/operator/getcode.php +++ b/src/messenger/webim/operator/getcode.php @@ -25,7 +25,7 @@ $operator = check_login(); force_password($operator); $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 77473e16..f8b3848d 100644 --- a/src/messenger/webim/operator/group.php +++ b/src/messenger/webim/operator/group.php @@ -184,7 +184,7 @@ if (isset($_POST['name'])) { 'chattitle' => $chattitle, 'hosturl' => $hosturl, 'logo' => $logo)); - header("Location: $webimroot/operator/groupmembers.php?gid=" . $newdep['groupid']); + header("Location: $mibewroot/operator/groupmembers.php?gid=" . $newdep['groupid']); exit; } else { update_group(array( @@ -200,7 +200,7 @@ if (isset($_POST['name'])) { 'chattitle' => $chattitle, 'hosturl' => $hosturl, 'logo' => $logo)); - header("Location: $webimroot/operator/group.php?gid=$groupid&stored"); + header("Location: $mibewroot/operator/group.php?gid=$groupid&stored"); exit; } } else { diff --git a/src/messenger/webim/operator/groupmembers.php b/src/messenger/webim/operator/groupmembers.php index 300103d2..19c9ef34 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=$groupid&stored"); + header("Location: $mibewroot/operator/groupmembers.php?gid=$groupid&stored"); exit; } diff --git a/src/messenger/webim/operator/groups.php b/src/messenger/webim/operator/groups.php index b658cdae..b8901413 100644 --- a/src/messenger/webim/operator/groups.php +++ b/src/messenger/webim/operator/groups.php @@ -37,7 +37,7 @@ if (isset($_GET['act']) && $_GET['act'] == 'del') { $db->query("delete from {chatgroup} where groupid = ?", array($groupid)); $db->query("delete from {chatgroupoperator} where groupid = ?", array($groupid)); $db->query("update {chatthread} set groupid = 0 where groupid = ?",array($groupid)); - 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 1c3db690..93a711a0 100644 --- a/src/messenger/webim/operator/history.php +++ b/src/messenger/webim/operator/history.php @@ -28,7 +28,7 @@ force_password($operator); 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; $searchType = verifyparam('type', '/^(all|message|operator|visitor)$/', 'all'); $searchInSystemMessages = (verifyparam('insystemmessages', '/^on$/', 'off') == 'on') || !$query; diff --git a/src/messenger/webim/operator/index.php b/src/messenger/webim/operator/index.php index 3df826e6..7df53a32 100644 --- a/src/messenger/webim/operator/index.php +++ b/src/messenger/webim/operator/index.php @@ -25,13 +25,13 @@ $isonline = is_operator_online($operator['operatorid']); $page = array( 'version' => $version, - 'localeLinks' => get_locale_links("$webimroot/operator/index.php"), + 'localeLinks' => get_locale_links("$mibewroot/operator/index.php"), 'needUpdate' => Settings::get('dbversion') != $dbversion, 'needChangePassword' => $operator['vcpassword'] == md5(''), - 'profilePage' => "$webimroot/operator/operator.php?op=".$operator['operatorid'], - 'updateWizard' => "$webimroot/install/", + 'profilePage' => "$mibewroot/operator/operator.php?op=".$operator['operatorid'], + 'updateWizard' => "$mibewroot/install/", 'newFeatures' => Settings::get('featuresversion') != $featuresversion, - 'featuresPage' => "$webimroot/operator/features.php", + 'featuresPage' => "$mibewroot/operator/features.php", 'isOnline' => $isonline ); diff --git a/src/messenger/webim/operator/invite.php b/src/messenger/webim/operator/invite.php index c40982a0..ce73e163 100644 --- a/src/messenger/webim/operator/invite.php +++ b/src/messenger/webim/operator/invite.php @@ -31,7 +31,7 @@ if (!$thread) { } // Open chat window for operator -$redirect_to = $webimroot . +$redirect_to = $mibewroot . '/operator/agent.php?thread=' . $thread->id . '&token=' . $thread->lastToken; header('Location: ' . $redirect_to); diff --git a/src/messenger/webim/operator/login.php b/src/messenger/webim/operator/login.php index 770cb2bf..71cea1cc 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']) && $operator['vcpassword'] == md5($password) && !operator_is_disabled($operator)) { $target = $password == '' - ? "$webimroot/operator/operator.php?op=" . $operator['operatorid'] + ? "$mibewroot/operator/operator.php?op=" . $operator['operatorid'] : (isset($_SESSION['backpath']) ? $_SESSION['backpath'] - : "$webimroot/operator/index.php"); + : "$mibewroot/operator/index.php"); login_operator($operator, $remember); header("Location: $target"); @@ -52,7 +52,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 66e15e42..a1fc5158 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 7fe062da..e8e8fe77 100644 --- a/src/messenger/webim/operator/operator.php +++ b/src/messenger/webim/operator/operator.php @@ -91,7 +91,7 @@ if ((isset($_POST['login']) || !is_capable(CAN_ADMINISTRATE, $operator)) && isse if (count($errors) == 0) { if (!$opId) { $newop = create_operator($login, $email, $password, $localname, $commonname, "", $code); - header("Location: $webimroot/operator/avatar.php?op=" . $newop['operatorid']); + header("Location: $mibewroot/operator/avatar.php?op=" . $newop['operatorid']); exit; } else { update_operator($opId, $login, $email, $password, $localname, $commonname, $code); @@ -100,11 +100,11 @@ if ((isset($_POST['login']) || !is_capable(CAN_ADMINISTRATE, $operator)) && isse $toDashboard = $operator['vcpassword'] == md5('') && $password != ''; $_SESSION[$session_prefix."operator"]['vcpassword'] = md5($password); if($toDashboard) { - header("Location: $webimroot/operator/index.php"); + header("Location: $mibewroot/operator/index.php"); exit; } } - header("Location: $webimroot/operator/operator.php?op=$opId&stored"); + header("Location: $mibewroot/operator/operator.php?op=$opId&stored"); exit; } } else { diff --git a/src/messenger/webim/operator/operators.php b/src/messenger/webim/operator/operators.php index d6720ef0..5fe6d077 100644 --- a/src/messenger/webim/operator/operators.php +++ b/src/messenger/webim/operator/operators.php @@ -50,7 +50,7 @@ if (isset($_GET['act'])) { if (count($errors) == 0) { delete_operator($operatorid); - header("Location: $webimroot/operator/operators.php"); + header("Location: $mibewroot/operator/operators.php"); exit; } } @@ -80,7 +80,7 @@ if (isset($_GET['act'])) { array(($act_disable ? '1' : '0'), $operatorid) ); - 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 f6314140..80f50345 100644 --- a/src/messenger/webim/operator/opgroups.php +++ b/src/messenger/webim/operator/opgroups.php @@ -66,7 +66,7 @@ if (!$op) { } update_operator_groups($op['operatorid'], $new_groups); - header("Location: $webimroot/operator/opgroups.php?op=$opId&stored"); + header("Location: $mibewroot/operator/opgroups.php?op=$opId&stored"); exit; } } diff --git a/src/messenger/webim/operator/performance.php b/src/messenger/webim/operator/performance.php index fb5e56f2..b9dc42f3 100644 --- a/src/messenger/webim/operator/performance.php +++ b/src/messenger/webim/operator/performance.php @@ -96,7 +96,7 @@ if (isset($_POST['onlinetimeout'])) { Settings::set($opt,$params[$opt]); } Settings::update(); - 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 d83af65e..02567b1a 100644 --- a/src/messenger/webim/operator/permissions.php +++ b/src/messenger/webim/operator/permissions.php @@ -53,7 +53,7 @@ if (!$op) { if ($opId && $_SESSION[$session_prefix."operator"] && $operator['operatorid'] == $opId) { $_SESSION[$session_prefix."operator"]['iperm'] = $new_permissions; } - header("Location: $webimroot/operator/permissions.php?op=$opId&stored"); + header("Location: $mibewroot/operator/permissions.php?op=$opId&stored"); exit; } diff --git a/src/messenger/webim/operator/restore.php b/src/messenger/webim/operator/restore.php index 823066d5..28876197 100644 --- a/src/messenger/webim/operator/restore.php +++ b/src/messenger/webim/operator/restore.php @@ -52,7 +52,7 @@ if (isset($_POST['loginoremail'])) { ); $href = get_app_location(true, false) . "/operator/resetpwd.php?id=" . $torestore['operatorid'] . "&token=$token"; - webim_mail($email, $email, getstring("restore.mailsubj"), getstring2("restore.mailtext", array(get_operator_name($torestore), $href))); + mibew_mail($email, $email, getstring("restore.mailsubj"), getstring2("restore.mailtext", array(get_operator_name($torestore), $href))); $page['isdone'] = true; require('../view/restore.php'); @@ -62,7 +62,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 af926216..eab2634c 100644 --- a/src/messenger/webim/operator/settings.php +++ b/src/messenger/webim/operator/settings.php @@ -90,7 +90,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { Settings::set($opt,$params[$opt]); } Settings::update(); - 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 7313ca53..f69045d8 100644 --- a/src/messenger/webim/operator/themes.php +++ b/src/messenger/webim/operator/themes.php @@ -40,7 +40,7 @@ $screenshots = array(); foreach($style_config['screenshots'] as $name => $desc) { $screenshots[] = array( 'name' => $name, - 'file' => $webimroot . '/styles/dialogs/' . $preview + 'file' => $mibewroot . '/styles/dialogs/' . $preview . '/screenshots/' . $name . '.png', 'description' => $desc ); diff --git a/src/messenger/webim/operator/translate.php b/src/messenger/webim/operator/translate.php index 391f20fc..ab33e3f9 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"); while (!feof($fp)) { $line = fgets($fp, 4096); @@ -65,7 +65,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; } } @@ -73,7 +73,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) { @@ -93,7 +93,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/styles/dialogs/default/handlebars_templates/chat/layout.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/layout.handlebars index a57f69c8..d2d48d61 100644 --- a/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/layout.handlebars +++ b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/layout.handlebars @@ -2,16 +2,16 @@