wiped out the old application name
| @ -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://<yourdomain>/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://<yourdomain>/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: <empty> | ||||
| @ -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://<yourdomain>/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. | ||||
| 6. Visit http://<yourdomain>/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. | ||||
| @ -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; | ||||
|  | ||||
| @ -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; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB | 
| @ -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(); | ||||
|  | ||||
| @ -317,6 +317,6 @@ if ($act == "silentcreateall") { | ||||
| } | ||||
| 
 | ||||
| mysql_close($link); | ||||
| header("Location: $webimroot/install/index.php"); | ||||
| header("Location: $mibewroot/install/index.php"); | ||||
| exit; | ||||
| ?>
 | ||||
| @ -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<br/>Wrong value of \$webimroot variable, should be \"$applocation\"";
 | ||||
| 		$webimroot = $applocation; | ||||
| 	if ($applocation != $mibewroot) { | ||||
| 		$errors[] = "Please, check file ${applocation}/libs/config.php<br/>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; | ||||
|  | ||||
| @ -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, | ||||
| _); | ||||
|  | ||||
| @ -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. | ||||
|  | ||||
| @ -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 = "<div>"; | ||||
| 	for (var i = 0; i < window.webimNews.length; i++) { | ||||
| 		str += "<div class=\"newstitle\"><a hre" + "f=\"" + window.webimNews[i].link + "\">" + window.webimNews[i].title + "</a>, <span class=\"small\">" + window.webimNews[i].date + "</span></div>"; | ||||
| 		str += "<div class=\"newstext\">" + window.webimNews[i].message+"</div>"; | ||||
| 	for (var i = 0; i < window.mibewNews.length; i++) { | ||||
| 		str += "<div class=\"newstitle\"><a hre" + "f=\"" + window.mibewNews[i].link + "\">" + window.mibewNews[i].title + "</a>, <span class=\"small\">" + window.mibewNews[i].date + "</span></div>"; | ||||
| 		str += "<div class=\"newstext\">" + window.mibewNews[i].message+"</div>"; | ||||
| 	} | ||||
| 	$("#news").html(str + "</div>"); | ||||
| } | ||||
| 
 | ||||
| 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 <a href=\""+window.webimLatest.download+"\">"+window.webimLatest.title+"</a>"); | ||||
| 		$("#lver").html(window.mibewLatest.version+", Download <a href=\""+window.mibewLatest.download+"\">"+window.mibewLatest.title+"</a>"); | ||||
| 	} else { | ||||
| 		$("#cver").css("color","green"); | ||||
| 		$("#lver").html(window.webimLatest.version); | ||||
| 		$("#lver").html(window.mibewLatest.version); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -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});0<b.length&&(g=b[0].id==c.id,f=b[b.length-1].id==c.id);if(0<a.lastStyles.length){c=0;for(b=a.lastStyles.length;c<b;c++)a.$el.removeClass(a.lastStyles[c]);a.lastStyles=[]}c=(e!=this.QUEUE_BAN?"in":"")+this.queueCodeToString(e);a.lastStyles.push(c); | ||||
| g&&a.lastStyles.push(c+"-first");f&&a.lastStyles.push(c+"-last");c=0;for(b=a.lastStyles.length;c<b;c++)a.$el.addClass(a.lastStyles[c])}},updateTimers:function(){d.Utils.updateTimers(this.$el,".timesince")},createSortField:function(a,b){var c=this.getQueueCode(a)||"Z";b.field=c.toString()+"_"+a.get("waitingTime").toString()},threadAdded:function(){var a=d.Objects.Models.page.get("webimRoot");a&&d.Utils.playSound(a+"/sounds/new_user.wav");if(d.Objects.Models.page.get("showPopup"))this.once("render", | ||||
| g&&a.lastStyles.push(c+"-first");f&&a.lastStyles.push(c+"-last");c=0;for(b=a.lastStyles.length;c<b;c++)a.$el.addClass(a.lastStyles[c])}},updateTimers:function(){d.Utils.updateTimers(this.$el,".timesince")},createSortField:function(a,b){var c=this.getQueueCode(a)||"Z";b.field=c.toString()+"_"+a.get("waitingTime").toString()},threadAdded:function(){var a=d.Objects.Models.page.get("mibewRoot");a&&d.Utils.playSound(a+"/sounds/new_user.wav");if(d.Objects.Models.page.get("showPopup"))this.once("render", | ||||
| function(){alert(d.Localization.get("pending.popup_notification"))})},getQueueCode:function(a){var b=a.get("state");return!1!=a.get("ban")&&b!=a.STATE_CHATTING?this.QUEUE_BAN:b==a.STATE_QUEUE||b==a.STATE_LOADING?this.QUEUE_WAITING:b==a.STATE_CLOSED||b==a.STATE_LEFT?this.QUEUE_CLOSED:b==a.STATE_WAITING?this.QUEUE_PRIO:b==a.STATE_CHATTING?this.QUEUE_CHATTING:!1},queueCodeToString:function(a){return a==this.QUEUE_PRIO?"prio":a==this.QUEUE_WAITING?"wait":a==this.QUEUE_CHATTING?"chat":a==this.QUEUE_BAN? | ||||
| "ban":a==this.QUEUE_CLOSED?"closed":""},QUEUE_PRIO:1,QUEUE_WAITING:2,QUEUE_CHATTING:3,QUEUE_BAN:4,QUEUE_CLOSED:5})})(Mibew,Handlebars,_); | ||||
|  | ||||
| @ -161,7 +161,7 @@ showTrack:function(){var b=this.model.id,c=a.Objects.Models.page;a.Popup.open(c. | ||||
| */ | ||||
| (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});0<b.length&&(g=b[0].id==c.id,f=b[b.length-1].id==c.id);if(0<a.lastStyles.length){c=0;for(b=a.lastStyles.length;c<b;c++)a.$el.removeClass(a.lastStyles[c]);a.lastStyles=[]}c=(e!=this.QUEUE_BAN?"in":"")+this.queueCodeToString(e);a.lastStyles.push(c); | ||||
| g&&a.lastStyles.push(c+"-first");f&&a.lastStyles.push(c+"-last");c=0;for(b=a.lastStyles.length;c<b;c++)a.$el.addClass(a.lastStyles[c])}},updateTimers:function(){d.Utils.updateTimers(this.$el,".timesince")},createSortField:function(a,b){var c=this.getQueueCode(a)||"Z";b.field=c.toString()+"_"+a.get("waitingTime").toString()},threadAdded:function(){var a=d.Objects.Models.page.get("webimRoot");a&&d.Utils.playSound(a+"/sounds/new_user.wav");if(d.Objects.Models.page.get("showPopup"))this.once("render", | ||||
| g&&a.lastStyles.push(c+"-first");f&&a.lastStyles.push(c+"-last");c=0;for(b=a.lastStyles.length;c<b;c++)a.$el.addClass(a.lastStyles[c])}},updateTimers:function(){d.Utils.updateTimers(this.$el,".timesince")},createSortField:function(a,b){var c=this.getQueueCode(a)||"Z";b.field=c.toString()+"_"+a.get("waitingTime").toString()},threadAdded:function(){var a=d.Objects.Models.page.get("mibewRoot");a&&d.Utils.playSound(a+"/sounds/new_user.wav");if(d.Objects.Models.page.get("showPopup"))this.once("render", | ||||
| function(){alert(d.Localization.get("pending.popup_notification"))})},getQueueCode:function(a){var b=a.get("state");return!1!=a.get("ban")&&b!=a.STATE_CHATTING?this.QUEUE_BAN:b==a.STATE_QUEUE||b==a.STATE_LOADING?this.QUEUE_WAITING:b==a.STATE_CLOSED||b==a.STATE_LEFT?this.QUEUE_CLOSED:b==a.STATE_WAITING?this.QUEUE_PRIO:b==a.STATE_CHATTING?this.QUEUE_CHATTING:!1},queueCodeToString:function(a){return a==this.QUEUE_PRIO?"prio":a==this.QUEUE_WAITING?"wait":a==this.QUEUE_CHATTING?"chat":a==this.QUEUE_BAN? | ||||
| "ban":a==this.QUEUE_CLOSED?"closed":""},QUEUE_PRIO:1,QUEUE_WAITING:2,QUEUE_CHATTING:3,QUEUE_BAN:4,QUEUE_CLOSED:5})})(Mibew,Handlebars,_); | ||||
| /* | ||||
|  | ||||
| @ -60,7 +60,7 @@ | ||||
|             playNewMessageSound: function() { | ||||
|                 if (! this.get('skipNextMessageSound')) { | ||||
|                     // Build sound path
 | ||||
|                     var path = Mibew.Objects.Models.page.get('webimRoot'); | ||||
|                     var path = Mibew.Objects.Models.page.get('mibewRoot'); | ||||
|                     if (path) { | ||||
|                         path += '/sounds/new_message.wav'; | ||||
|                         // Play sound
 | ||||
|  | ||||
| @ -155,7 +155,7 @@ | ||||
|              */ | ||||
|             threadAdded: function() { | ||||
|                 // Build sound path
 | ||||
|                 var path = Mibew.Objects.Models.page.get('webimRoot'); | ||||
|                 var path = Mibew.Objects.Models.page.get('mibewRoot'); | ||||
|                 if (path) { | ||||
|                     path += '/sounds/new_user.wav'; | ||||
|                     // Play sound
 | ||||
|  | ||||
| @ -25,8 +25,8 @@ require_once(dirname(__FILE__).'/classes/request_processor.php'); | ||||
| require_once(dirname(__FILE__).'/classes/client_side_processor.php'); | ||||
| require_once(dirname(__FILE__).'/classes/thread_processor.php'); | ||||
| 
 | ||||
| $namecookie = "WEBIM_Data"; | ||||
| $usercookie = "WEBIM_UserID"; | ||||
| $namecookie = "MIBEW_Data"; | ||||
| $usercookie = "MIBEW_UserID"; | ||||
| 
 | ||||
| function get_user_id() | ||||
| { | ||||
| @ -149,7 +149,7 @@ function setup_logo($group = NULL) { | ||||
| 			: $toplevelgroup['vclogo']) | ||||
| 	); | ||||
| 
 | ||||
| 	$data['webimHost'] = topage(empty($toplevelgroup['vchosturl']) | ||||
| 	$data['mibewHost'] = topage(empty($toplevelgroup['vchosturl']) | ||||
| 		? Settings::get('hosturl') | ||||
| 		: $toplevelgroup['vchosturl']); | ||||
| 
 | ||||
| @ -435,13 +435,13 @@ function setup_chatview(Thread $thread) { | ||||
| /** | ||||
|  * Prepare some data for chat for user | ||||
|  * | ||||
|  * @global string $webimroot Root URL path for Mibew | ||||
|  * @global string $mibewroot Root URL path for Mibew | ||||
|  * @param Thread $thread thread object | ||||
|  * be used | ||||
|  * @return array Array of chat view data | ||||
|  */ | ||||
| function setup_chatview_for_user(Thread $thread) { | ||||
| 	global $webimroot; | ||||
| 	global $mibewroot; | ||||
| 
 | ||||
| 	$data = setup_chatview($thread); | ||||
| 
 | ||||
| @ -461,7 +461,7 @@ function setup_chatview_for_user(Thread $thread) { | ||||
| 	$params = "thread=" . $thread->id . "&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); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
|  | ||||
| @ -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'] | ||||
| 			); | ||||
|  | ||||
| @ -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); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -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']) | ||||
| 				), | ||||
|  | ||||
| @ -48,6 +48,6 @@ $default_cron_key = md5( | ||||
| /** | ||||
|  * Name for cookie to track visitor | ||||
|  */ | ||||
| $visitorcookie = "WEBIM_VisitorID"; | ||||
| $visitorcookie = "MIBEW_VisitorID"; | ||||
| 
 | ||||
| ?>
 | ||||
| @ -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); | ||||
|  | ||||
| @ -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; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -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); | ||||
| } | ||||
| 
 | ||||
| /** | ||||
|  | ||||
| @ -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"; | ||||
| 
 | ||||
| /* | ||||
|  | ||||
| @ -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') { | ||||
|  | ||||
| @ -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 = '<form action="" onsubmit="' . $form_on_submit . '" id="mibewOperatorCodeForm">' . | ||||
| 			'<input type="text" id="mibewOperatorCodeField" />' . | ||||
| @ -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(); | ||||
| 
 | ||||
|  | ||||
| @ -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(); | ||||
|  | ||||
| @ -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); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -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 .= "<li><a href=\"" . add_params($webimroot . "/operator/redirect.php", $params) . | ||||
| 		$agent_list .= "<li><a href=\"" . add_params($mibewroot . "/operator/redirect.php", $params) . | ||||
| 					   "\" title=\"" . topage(get_operator_name($agent)) . "\">" . | ||||
| 					   topage(get_operator_name($agent)) . | ||||
| 					   "</a> $status</li>"; | ||||
| @ -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 .= "<li><a href=\"" . add_params($webimroot . "/operator/redirect.php", $params) . | ||||
| 			$group_list .= "<li><a href=\"" . add_params($mibewroot . "/operator/redirect.php", $params) . | ||||
| 						   "\" title=\"" . topage(get_group_name($group)) . "\">" . | ||||
| 						   topage(get_group_name($group)) . | ||||
| 						   "</a> $status</li>"; | ||||
|  | ||||
| @ -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(); | ||||
|  | ||||
| @ -28,8 +28,8 @@ function generate_pagination_link($page, $title) | ||||
| 
 | ||||
| function generate_pagination_image($id, $alt) | ||||
| { | ||||
| 	global $webimroot; | ||||
| 	return "<img src=\"$webimroot/images/$id.gif\" border=\"0\" alt=\"" . htmlspecialchars($alt) . "\"/>"; | ||||
| 	global $mibewroot; | ||||
| 	return "<img src=\"$mibewroot/images/$id.gif\" border=\"0\" alt=\"" . htmlspecialchars($alt) . "\"/>"; | ||||
| } | ||||
| 
 | ||||
| function prepare_pagination($items_count, $default_items_per_page = 15) | ||||
|  | ||||
| @ -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" : ""); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -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') : ""); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  | ||||
| Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB | 
| Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB | 
| Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB | 
| Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB | 
| Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB | 
| Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB | 
| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB | 
| Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB | 
| Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB | 
| Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB | 
| Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB | 
| Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB | 
| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB | 
| Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB | 
| Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB | 
| Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB | 
| Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB | 
| Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB | 
| Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB | 
| Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB | 
| Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB | 
| Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB | 
| @ -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, | ||||
|  | ||||
| @ -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; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -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']); | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -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; | ||||
| 	} | ||||
| } | ||||
|  | ||||