mirror of
				https://github.com/Mibew/i18n.git
				synced 2025-10-31 17:31:05 +03:00 
			
		
		
		
	fix eol, add agentId into chatmessage and chatthread, minor changes in html, several utility functions
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@27 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
		
							parent
							
								
									77f19d14bc
								
							
						
					
					
						commit
						f168f1baaf
					
				| @ -1,31 +1,31 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/operator.php'); | ||||
| 
 | ||||
| $image = verifyparam("image","/^\w+$/", "webim"); | ||||
| $lang = verifyparam("lang", "/^\w\w$/", ""); | ||||
| if( !$lang || !in_array($lang,$available_locales) ) | ||||
| 	$lang = $current_locale; | ||||
| 
 | ||||
| $image_postfix = has_online_operators() ? "on" : "off"; | ||||
| $name = "images/webim/${image}_${lang}_${image_postfix}.gif"; | ||||
| 
 | ||||
| $fp = fopen($name, 'rb') or die("no image"); | ||||
| header("Content-Type: image/gif"); | ||||
| header("Content-Length: ".filesize($name)); | ||||
| fpassthru($fp); | ||||
| exit; | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/operator.php'); | ||||
| 
 | ||||
| $image = verifyparam("image","/^\w+$/", "webim"); | ||||
| $lang = verifyparam("lang", "/^\w\w$/", ""); | ||||
| if( !$lang || !in_array($lang,$available_locales) ) | ||||
| 	$lang = $current_locale; | ||||
| 
 | ||||
| $image_postfix = has_online_operators() ? "on" : "off"; | ||||
| $name = "images/webim/${image}_${lang}_${image_postfix}.gif"; | ||||
| 
 | ||||
| $fp = fopen($name, 'rb') or die("no image"); | ||||
| header("Content-Type: image/gif"); | ||||
| header("Content-Length: ".filesize($name)); | ||||
| fpassthru($fp); | ||||
| exit; | ||||
| ?>
 | ||||
| @ -1,68 +1,68 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/chat.php'); | ||||
| 
 | ||||
| if( !isset($_GET['token']) || !isset($_GET['thread']) ) { | ||||
| 
 | ||||
| 	$thread = NULL; | ||||
| 	if( isset($_SESSION['threadid']) ) { | ||||
| 		$thread = reopen_thread($_SESSION['threadid']); | ||||
| 	} | ||||
| 
 | ||||
| 	if( !$thread ) { | ||||
| 		$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; | ||||
| 		$remote = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR']; | ||||
| 		$visitor = $remote_visitor(); | ||||
| 		$thread = create_thread($visitor['name'], $remote, $referer,$current_locale); | ||||
| 		$_SESSION['threadid'] = $thread['threadid']; | ||||
| 		if( $referer ) { | ||||
| 			post_message($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referer))); | ||||
| 		} | ||||
| 		post_message($thread['threadid'],$kind_info,getstring('chat.wait')); | ||||
| 	} | ||||
| 	$threadid = $thread['threadid']; | ||||
| 	$token = $thread['ltoken']; | ||||
| 	$level = get_remote_level($_SERVER['HTTP_USER_AGENT']); | ||||
| 	header("Location: ".dirname($_SERVER['PHP_SELF'])."/client.php?thread=$threadid&token=$token&level=$level"); | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||
| $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| //$level = "simple";
 | ||||
| 
 | ||||
| setup_chatview_for_user($thread, $level); | ||||
| start_html_output(); | ||||
| 
 | ||||
| $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); | ||||
| if( $pparam == "mailthread" ) { | ||||
| 	require('view/chat_mailthread.php'); | ||||
| } else if( $level == "ajaxed" ) { | ||||
| 	require('view/chat_ajaxed.php'); | ||||
| } else if( $level == "simple" ) { | ||||
| 	require('view/chat_simple.php'); | ||||
| } else if( $level == "old" ) { | ||||
| 	require('view/chat_oldbrowser.php'); | ||||
| } | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/chat.php'); | ||||
| 
 | ||||
| if( !isset($_GET['token']) || !isset($_GET['thread']) ) { | ||||
| 
 | ||||
| 	$thread = NULL; | ||||
| 	if( isset($_SESSION['threadid']) ) { | ||||
| 		$thread = reopen_thread($_SESSION['threadid']); | ||||
| 	} | ||||
| 
 | ||||
| 	if( !$thread ) { | ||||
| 		$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; | ||||
| 		$remote = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR']; | ||||
| 		$visitor = $remote_visitor(); | ||||
| 		$thread = create_thread($visitor['name'], $remote, $referer,$current_locale); | ||||
| 		$_SESSION['threadid'] = $thread['threadid']; | ||||
| 		if( $referer ) { | ||||
| 			post_message($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referer))); | ||||
| 		} | ||||
| 		post_message($thread['threadid'],$kind_info,getstring('chat.wait')); | ||||
| 	} | ||||
| 	$threadid = $thread['threadid']; | ||||
| 	$token = $thread['ltoken']; | ||||
| 	$level = get_remote_level($_SERVER['HTTP_USER_AGENT']); | ||||
| 	header("Location: ".dirname($_SERVER['PHP_SELF'])."/client.php?thread=$threadid&token=$token&level=$level"); | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||
| $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| //$level = "simple";
 | ||||
| 
 | ||||
| setup_chatview_for_user($thread, $level); | ||||
| start_html_output(); | ||||
| 
 | ||||
| $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); | ||||
| if( $pparam == "mailthread" ) { | ||||
| 	require('view/chat_mailthread.php'); | ||||
| } else if( $level == "ajaxed" ) { | ||||
| 	require('view/chat_ajaxed.php'); | ||||
| } else if( $level == "simple" ) { | ||||
| 	require('view/chat_simple.php'); | ||||
| } else if( $level == "old" ) { | ||||
| 	require('view/chat_oldbrowser.php'); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,19 +1,19 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('view_index.php'); | ||||
| ?>
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('view_index.php'); | ||||
| ?>
 | ||||
|  | ||||
| @ -1,90 +1,98 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| function drop_tables() { | ||||
| 	$link = connect(); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatthread",$link); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatmessage",$link); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatrevision",$link); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatoperator",$link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function create_tables() { | ||||
| 	global $dbencoding; | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query =  | ||||
| 		"CREATE TABLE chatthread (\n". | ||||
| 		"	threadid int NOT NULL auto_increment PRIMARY KEY ,\n". | ||||
| 		"	userName varchar(64) NOT NULL,\n". | ||||
| 		"	agentName varchar(64),\n". | ||||
| 		"	dtmcreated datetime DEFAULT 0,\n". | ||||
| 		"	dtmmodified datetime DEFAULT 0,\n". | ||||
| 		"	lrevision int NOT NULL DEFAULT 0,\n". | ||||
| 		"	istate int NOT NULL DEFAULT 0,\n". | ||||
| 		"	ltoken int NOT NULL,\n". | ||||
| 		"	remote varchar(255),\n". | ||||
| 		"	referer text,\n". | ||||
| 		"	locale varchar(8),\n". | ||||
| 		"	lastpinguser datetime DEFAULT 0,\n". | ||||
| 		"	lastpingagent datetime DEFAULT 0\n". | ||||
| 		") charset $dbencoding\n"; | ||||
| 
 | ||||
| 	perform_query($query,$link);	 | ||||
| 
 | ||||
| 	$query =  | ||||
| 		"CREATE TABLE chatmessage\n". | ||||
| 		"(\n". | ||||
| 		"	messageid int NOT NULL auto_increment PRIMARY KEY,\n". | ||||
| 		"	threadid int NOT NULL references chatthread(threadid),\n". | ||||
| 		"	ikind int NOT NULL,\n". | ||||
| 		"	tmessage text NOT NULL,\n". | ||||
| 		"	dtmcreated datetime DEFAULT 0,\n". | ||||
| 		"	tname varchar(64)\n". | ||||
| 		") charset $dbencoding\n"; | ||||
| 
 | ||||
| 	perform_query($query,$link);	 | ||||
| 
 | ||||
| 	perform_query("CREATE TABLE chatrevision (id INT NOT NULL)",$link);	 | ||||
| 	perform_query("INSERT INTO chatrevision VALUES (1)",$link);	 | ||||
| 
 | ||||
| 	$query =  | ||||
| 		"CREATE TABLE chatoperator\n". | ||||
| 		"(\n". | ||||
| 		"	operatorid int NOT NULL auto_increment PRIMARY KEY,\n". | ||||
| 		"	vclogin varchar(64) NOT NULL,\n". | ||||
| 		"	vcpassword varchar(64) NOT NULL,\n". | ||||
| 		"	vclocalename varchar(64) NOT NULL,\n". | ||||
| 		"	vccommonname varchar(64) NOT NULL,\n". | ||||
| 		"	dtmlastvisited datetime DEFAULT 0\n". | ||||
| 		") charset $dbencoding\n"; | ||||
| 
 | ||||
| 	perform_query($query,$link);	 | ||||
| 
 | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	create_operator("admin", "", "Administrator", "Administrator"); | ||||
| } | ||||
| 
 | ||||
| drop_tables(); | ||||
| create_tables(); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('view_install.php'); | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| function drop_tables() { | ||||
| 	$link = connect(); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatthread",$link); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatmessage",$link); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatrevision",$link); | ||||
| 	perform_query("DROP TABLE IF EXISTS chatoperator",$link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function create_tables() { | ||||
| 	global $dbencoding; | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	// to update from v1
 | ||||
| 	// ALTER TABLE chatthread ADD agentId int NOT NULL DEFAULT 0 AFTER agentName
 | ||||
| 	// update chatthread,chatoperator set agentId = operatorid where agentId = 0 AND (vclocalename = agentName OR vccommonname = agentName) 
 | ||||
| 	// ALTER TABLE chatmessage ADD agentId int NOT NULL DEFAULT 0 AFTER ikind
 | ||||
| 	// update chatmessage,chatoperator set agentId = operatorid where agentId = 0 AND ikind = 2 AND (vclocalename = tname OR vccommonname = tname) 
 | ||||
| 	 | ||||
| 	$query =  | ||||
| 		"CREATE TABLE chatthread (\n". | ||||
| 		"	threadid int NOT NULL auto_increment PRIMARY KEY ,\n". | ||||
| 		"	userName varchar(64) NOT NULL,\n". | ||||
| 		"	agentName varchar(64),\n". | ||||
| 		"   agentId int NOT NULL DEFAULT 0,\n". | ||||
| 		"	dtmcreated datetime DEFAULT 0,\n". | ||||
| 		"	dtmmodified datetime DEFAULT 0,\n". | ||||
| 		"	lrevision int NOT NULL DEFAULT 0,\n". | ||||
| 		"	istate int NOT NULL DEFAULT 0,\n". | ||||
| 		"	ltoken int NOT NULL,\n". | ||||
| 		"	remote varchar(255),\n". | ||||
| 		"	referer text,\n". | ||||
| 		"	locale varchar(8),\n". | ||||
| 		"	lastpinguser datetime DEFAULT 0,\n". | ||||
| 		"	lastpingagent datetime DEFAULT 0\n". | ||||
| 		") charset $dbencoding\n"; | ||||
| 
 | ||||
| 	perform_query($query,$link);	 | ||||
| 
 | ||||
| 	$query =  | ||||
| 		"CREATE TABLE chatmessage\n". | ||||
| 		"(\n". | ||||
| 		"	messageid int NOT NULL auto_increment PRIMARY KEY,\n". | ||||
| 		"	threadid int NOT NULL references chatthread(threadid),\n". | ||||
| 		"	ikind int NOT NULL,\n". | ||||
| 		"   agentId int NOT NULL DEFAULT 0,\n". | ||||
| 		"	tmessage text NOT NULL,\n". | ||||
| 		"	dtmcreated datetime DEFAULT 0,\n". | ||||
| 		"	tname varchar(64)\n". | ||||
| 		") charset $dbencoding\n"; | ||||
| 
 | ||||
| 	perform_query($query,$link);	 | ||||
| 
 | ||||
| 	perform_query("CREATE TABLE chatrevision (id INT NOT NULL)",$link);	 | ||||
| 	perform_query("INSERT INTO chatrevision VALUES (1)",$link);	 | ||||
| 
 | ||||
| 	$query =  | ||||
| 		"CREATE TABLE chatoperator\n". | ||||
| 		"(\n". | ||||
| 		"	operatorid int NOT NULL auto_increment PRIMARY KEY,\n". | ||||
| 		"	vclogin varchar(64) NOT NULL,\n". | ||||
| 		"	vcpassword varchar(64) NOT NULL,\n". | ||||
| 		"	vclocalename varchar(64) NOT NULL,\n". | ||||
| 		"	vccommonname varchar(64) NOT NULL,\n". | ||||
| 		"	dtmlastvisited datetime DEFAULT 0\n". | ||||
| 		") charset $dbencoding\n"; | ||||
| 
 | ||||
| 	perform_query($query,$link);	 | ||||
| 
 | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	create_operator("admin", "", "Administrator", "Administrator"); | ||||
| } | ||||
| 
 | ||||
| drop_tables(); | ||||
| create_tables(); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('view_install.php'); | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,64 +1,57 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("install.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("install.title") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("install.message") ?>
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="install.php"><?php echo getstring("install.create_db_link") ?></a>
 | ||||
| 
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="/webim/epl-v10.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("install.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("install.title") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("install.message") ?>
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="install.php"><?php echo getstring("install.create_db_link") ?></a>
 | ||||
| 
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="/webim/epl-v10.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,64 +1,57 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("installed.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("installed.title") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("installed.message") ?>
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="/webim/operator/login.php"><?php echo getstring("installed.login_link") ?></a>
 | ||||
| 
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="/webim/LICENSE.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("installed.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("installed.title") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("installed.message") ?>
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="/webim/operator/login.php"><?php echo getstring("installed.login_link") ?></a>
 | ||||
| 
 | ||||
| <br/> | ||||
| <br/> | ||||
| 
 | ||||
| <a href="/webim/LICENSE.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,435 +1,438 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  *    Pavel Petroshenko - history search | ||||
|  */ | ||||
| 
 | ||||
| $connection_timeout = 30; # sec
 | ||||
| 
 | ||||
| $namecookie = "WEBIM_Name"; | ||||
| 
 | ||||
| $state_queue = 0; | ||||
| $state_waiting = 1; | ||||
| $state_chatting = 2; | ||||
| $state_closed = 3; | ||||
| 
 | ||||
| $kind_user = 1; | ||||
| $kind_agent = 2; | ||||
| $kind_for_agent = 3; | ||||
| $kind_info = 4; | ||||
| $kind_conn = 5; | ||||
| $kind_events = 6; | ||||
| 
 | ||||
| $kind_to_string = array( $kind_user => "user", $kind_agent => "agent", $kind_for_agent => "hidden", | ||||
| 	$kind_info => "inf", $kind_conn => "conn", $kind_events => "event" ); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| function next_token() { | ||||
| 	return rand(99999,99999999); | ||||
| } | ||||
| 
 | ||||
| function next_revision($link) { | ||||
| 	perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link); | ||||
| 	$val = mysql_insert_id($link); | ||||
| 	return $val; | ||||
| } | ||||
| 
 | ||||
| function post_message_($threadid,$kind,$message,$link,$from=null,$time=null) { | ||||
| 	$query = sprintf( | ||||
| 	    "insert into chatmessage (threadid,ikind,tmessage,tname,dtmcreated) values (%s, %s,'%s',%s,%s)", | ||||
| 			$threadid, | ||||
| 			$kind, | ||||
| 			quote_smart($message,$link), | ||||
| 			$from ? "'".quote_smart($from,$link)."'" : "null", | ||||
| 			$time ? "FROM_UNIXTIME($time)" : "CURRENT_TIMESTAMP" ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| } | ||||
| 
 | ||||
| function post_message($threadid,$kind,$message,$from=null) { | ||||
| 	$link = connect(); | ||||
| 	post_message_($threadid,$kind,$message,$link,$from); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function prepare_html_message($text) { | ||||
| 	$escaped_text = htmlspecialchars($text); | ||||
| 	$text_w_links = preg_replace('/(http|ftp):\/\/\S*/','<a href="$0" target="_blank">$0</a>',$escaped_text); | ||||
| 	$multiline = str_replace("\n","<br/>",$text_w_links); | ||||
| 	return $multiline; | ||||
| } | ||||
| 
 | ||||
| function message_to_html($msg) { | ||||
| 	global $kind_to_string; | ||||
| 	$message = "<span>".date("H:i:s",$msg['created'])."</span> "; | ||||
| 	$kind = $kind_to_string{$msg['ikind']}; | ||||
| 	if( $msg['tname'] ) | ||||
| 		$message.= "<span class='n$kind'>".htmlspecialchars($msg['tname'])."</span>: "; | ||||
| 	$message.= "<span class='m$kind'>".prepare_html_message($msg['tmessage'])."</span><br/>"; | ||||
| 	return $message; | ||||
| } | ||||
| 
 | ||||
| function message_to_text($msg) { | ||||
| 	global $kind_user, $kind_agent, $kind_info; | ||||
| 	$time = date("H:i:s ",$msg['created']); | ||||
| 	if($msg['ikind'] == $kind_user || $msg['ikind'] == $kind_agent) { | ||||
| 		if( $msg['tname'] ) | ||||
| 			return $time.$msg['tname'].": ".$msg['tmessage']."\n"; | ||||
| 		else | ||||
| 			return $time.$msg['tmessage']."\n"; | ||||
| 	} else if($msg['ikind'] == $kind_info ) { | ||||
| 		return $time.$msg['tmessage']."\n"; | ||||
| 	} else { | ||||
| 		return $time."[".$msg['tmessage']."]\n"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_messages($threadid,$meth,$isuser,&$lastid) { | ||||
| 	global $kind_for_agent; | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = sprintf( | ||||
| 	    "select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ". | ||||
| 	    "where threadid = %s and messageid > %s %s order by messageid", | ||||
| 	    $threadid, $lastid, $isuser ? "and ikind <> $kind_for_agent" : "" ); | ||||
| 
 | ||||
| 	$messages = array(); | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	while ($msg = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$message = ($meth == 'text') ? message_to_text($msg) : message_to_html($msg); | ||||
| 		$messages[] = $message; | ||||
| 		if( $msg['messageid'] > $lastid ) | ||||
| 			$lastid = $msg['messageid']; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 	return $messages; | ||||
| }  | ||||
| 
 | ||||
| function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) { | ||||
| 	global $webim_encoding, $webimroot; | ||||
| 	$output = get_messages($threadid,"html",$isuser,$lastid); | ||||
| 
 | ||||
| 	if( $format == "xml" ) { | ||||
| 		start_xml_output(); | ||||
| 		print("<thread lastID=\"$lastid\">");
 | ||||
| 		foreach( $output as $msg ) { | ||||
| 			print "<message>".myiconv($webim_encoding,"utf-8",escape_with_cdata($msg))."</message>\n"; | ||||
| 		} | ||||
| 		print("</thread>"); | ||||
| 	} else if( $format == "html" ) { | ||||
| 		start_html_output(); | ||||
| 		$url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false"); | ||||
| 
 | ||||
| 		print("<html><head>\n". | ||||
| 		    "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"$webimroot/chat.css\" />\n". | ||||
| 		    "<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||
| 		    "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n". | ||||
| 		    "</head>". | ||||
| 		    "<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">". | ||||
| 		    "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>" ); | ||||
| 
 | ||||
| 		foreach( $output as $msg ) { | ||||
| 			print $msg; | ||||
| 		} | ||||
| 
 | ||||
| 		print( | ||||
| 		    "</td></tr></table><a name='aend'>". | ||||
| 		    "</body></html>" ); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_user_name($name, $id="") { | ||||
| 	global $presentable_name_pattern; | ||||
|        	return str_replace("{id}", $id, str_replace("{name}", $name, $presentable_name_pattern)); | ||||
| } | ||||
| 
 | ||||
| function setup_chatview_for_user($thread,$level) { | ||||
| 	global $page, $webimroot, $user_can_change_name, $company_logo_link, $company_name; | ||||
| 	$page = array(); | ||||
| 	$page['agent'] = false; | ||||
| 	$page['user'] = true; | ||||
| 	$page['canpost'] = true; | ||||
| 	$nameisset = getstring("chat.default.username") != $thread['userName']; | ||||
| 	$page['displ1'] = $nameisset ? "none" : "inline"; | ||||
| 	$page['displ2'] = $nameisset ? "inline" : "none"; | ||||
| 	$page['level'] = $level; | ||||
| 	$page['ct.chatThreadId'] = $thread['threadid']; | ||||
| 	$page['ct.token'] = $thread['ltoken']; | ||||
| 	$page['ct.user.name'] = $thread['userName']; | ||||
| 	$page['canChangeName'] = $user_can_change_name; | ||||
| 
 | ||||
| 	$page['ct.company.name'] = $company_name; | ||||
| 	$page['ct.company.chatLogoURL'] = $company_logo_link; | ||||
| 
 | ||||
| 	$params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	$page['selfLink'] = "$webimroot/client.php?".$params."&level=".$level; | ||||
| } | ||||
| 
 | ||||
| function setup_chatview_for_operator($thread,$operator) { | ||||
| 	global $page, $webimroot, $company_logo_link, $company_name; | ||||
| 	$page = array(); | ||||
| 	$page['agent'] = true; | ||||
| 	$page['user'] = false; | ||||
| 	$page['canpost'] = true; | ||||
| 	$page['ct.chatThreadId'] = $thread['threadid']; | ||||
| 	$page['ct.token'] = $thread['ltoken']; | ||||
| 	$page['ct.user.name'] = get_user_name($thread['userName']); | ||||
| 
 | ||||
| 	$page['ct.company.name'] = $company_name; | ||||
| 	$page['ct.company.chatLogoURL'] = $company_logo_link; | ||||
| 
 | ||||
| 	// TODO
 | ||||
| 	$page['namePostfix'] = "";	 | ||||
| } | ||||
| 
 | ||||
| function is_ajax_browser($name,$ver,$useragent) { | ||||
| 	if( $name == "opera" ) | ||||
| 		return $ver >= 8.02; | ||||
| 	if( $name == "safari" ) | ||||
| 		return $ver >= 125; | ||||
| 	if( $name == "msie" ) | ||||
| 		return $ver >= 5.5 && !strstr($useragent, "powerpc"); | ||||
| 	if( $name == "netscape" ) | ||||
| 		return $ver >= 7.1; | ||||
| 	if( $name == "mozilla") | ||||
| 		return $ver >= 1.4; | ||||
| 	if( $name == "firefox") | ||||
| 		return $ver >= 1.0; | ||||
| 
 | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| function is_old_browser($name,$ver) { | ||||
| 	if( $name == "opera" ) | ||||
| 		return $ver < 7.0; | ||||
| 	if( $name == "msie" ) | ||||
| 		return $ver < 5.0; | ||||
| 	return false;  | ||||
| } | ||||
| 
 | ||||
| $knownAgents = array("opera","msie","safari","firefox","netscape","mozilla"); | ||||
| 
 | ||||
| function get_remote_level($useragent) { | ||||
| 	global $knownAgents; | ||||
| 	$useragent = strtolower($useragent); | ||||
| 	foreach( $knownAgents as $agent ) { | ||||
| 		if( strstr($useragent,$agent) ) { | ||||
| 			if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) { | ||||
| 				$ver = $matches[1]; | ||||
| 
 | ||||
| 				if( is_ajax_browser($agent,$ver,$useragent) ) | ||||
| 					return "ajaxed"; | ||||
| 				else if( is_old_browser($agent,$ver) ) | ||||
| 					return "old"; | ||||
| 
 | ||||
| 				return "simple"; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return "simple"; | ||||
| } | ||||
| 
 | ||||
| function update_thread_access($threadid, $params, $link) { | ||||
| 	$clause = ""; | ||||
| 	foreach( $params as $k => $v ) { | ||||
| 		if( strlen($clause) > 0 ) | ||||
| 			$clause .= ", "; | ||||
| 	    $clause .= $k."=".$v; | ||||
| 	} | ||||
| 	perform_query( | ||||
| 		 "update chatthread set $clause ". | ||||
| 		 "where threadid = ".$threadid,$link); | ||||
| } | ||||
| 
 | ||||
| function get_access_time($threadid, $isuser, $link) { | ||||
| 	return select_one_row(sprintf( | ||||
| 		 "select unix_timestamp(%s) as lastping, ". | ||||
| 		 "unix_timestamp(CURRENT_TIMESTAMP) as current ". | ||||
| 		 "from chatthread where threadid = %s", | ||||
| 		$isuser ? "lastpinguser" : "lastpingagent", | ||||
| 		$threadid), $link); | ||||
| } | ||||
| 
 | ||||
| function ping_thread($thread, $isuser) { | ||||
| 	global $kind_for_agent, $state_chatting, $state_waiting, $kind_conn, $connection_timeout; | ||||
| 	$link = connect(); | ||||
| 	$params = array(($isuser ? "lastpinguser" : "lastpingagent") => "CURRENT_TIMESTAMP" ); | ||||
| 
 | ||||
| 	$access = get_access_time($thread['threadid'], !$isuser, $link); | ||||
|  	if( $access['lastping'] > 0 && abs($access['current']-$access['lastping']) > $connection_timeout ) { | ||||
| 		$params[$isuser ? "lastpingagent" : "lastpinguser"] = "0"; | ||||
| 		if( !$isuser ) { | ||||
| 			$message_to_post = getstring_("chat.status.user.dead", $thread['locale']); | ||||
| 			post_message_($thread['threadid'],$kind_for_agent,$message_to_post,$link,null,$access['lastping']+$connection_timeout); | ||||
| 		} else if( $thread['istate'] == $state_chatting ) { | ||||
| 
 | ||||
| 			$message_to_post = getstring_("chat.status.operator.dead", $thread['locale']); | ||||
| 			post_message_($thread['threadid'],$kind_conn,$message_to_post,$link,null,$access['lastping']+$connection_timeout); | ||||
| 			$params['istate'] = $state_waiting; | ||||
| 			commit_thread($thread['threadid'], $params, $link); | ||||
| 			mysql_close($link); | ||||
| 			return; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	update_thread_access($thread['threadid'], $params, $link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function commit_thread($threadid,$params,$link) { | ||||
| 	$query = "update chatthread set lrevision = ".next_revision($link).", dtmmodified = CURRENT_TIMESTAMP"; | ||||
| 	foreach( $params as $k => $v ) { | ||||
| 	    $query .= ", ".$k."=".$v; | ||||
| 	} | ||||
| 	$query .= " where threadid = ".$threadid; | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| } | ||||
| 
 | ||||
| function rename_user($thread, $newname) { | ||||
| 	global $kind_events; | ||||
| 
 | ||||
| 	$link = connect(); | ||||
| 	commit_thread( $thread['threadid'], array('userName' => "'".mysql_real_escape_string($newname)."'"), $link); | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	if( $thread['userName'] != $newname ) { | ||||
| 		post_message($thread['threadid'],$kind_events, | ||||
| 			getstring2_("chat.status.user.changedname",array($thread['userName'], $newname), $thread['locale'])); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function close_thread($thread,$isuser) { | ||||
| 	global $state_closed, $kind_events; | ||||
| 	 | ||||
| 	if( $thread['istate'] != $state_closed ) { | ||||
| 		$link = connect(); | ||||
| 		commit_thread( $thread['threadid'], array('istate' => $state_closed), $link); | ||||
| 		mysql_close($link); | ||||
| 	} | ||||
| 
 | ||||
| 	$message =  $isuser ? getstring2_("chat.status.user.left", array($thread['userName']), $thread['locale']) | ||||
| 					: getstring2_("chat.status.operator.left", array($thread['agentName']), $thread['locale']); | ||||
| 	post_message($thread['threadid'], $kind_events, $message); | ||||
| } | ||||
| 
 | ||||
| function create_thread($username,$remote,$referer,$lang) { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = sprintf( | ||||
| 		 "insert into chatthread (userName,"."ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ". | ||||
| 								 "('%s',"."%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)", | ||||
| 			mysql_real_escape_string($username), | ||||
| 			next_token(), | ||||
| 			mysql_real_escape_string($remote), | ||||
| 			mysql_real_escape_string($referer), | ||||
| 			next_revision($link), | ||||
| 			mysql_real_escape_string($lang) ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| 	$id = mysql_insert_id($link); | ||||
| 
 | ||||
| 	$newthread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $newthread; | ||||
| } | ||||
| 
 | ||||
| function do_take_thread($threadid,$operatorName) { | ||||
| 	global $state_chatting; | ||||
| 	$link = connect(); | ||||
| 	commit_thread( $threadid,  | ||||
| 		array("istate" => $state_chatting, | ||||
| 			  "agentName" => "'".mysql_real_escape_string($operatorName)."'"), $link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function reopen_thread($threadid) { | ||||
| 	global $state_queue,$state_waiting,$state_chatting,$state_closed,$kind_events; | ||||
| 	$thread = thread_by_id($threadid); | ||||
| 
 | ||||
| 	if( !$thread ) | ||||
| 		return FALSE; | ||||
| 
 | ||||
| 	if( $thread['istate'] == $state_closed ) | ||||
| 		return FALSE; | ||||
| 
 | ||||
| 	if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) { | ||||
| 		$link = connect(); | ||||
| 		commit_thread( $threadid,  | ||||
| 			array("istate" => $state_waiting ), $link); | ||||
| 		mysql_close($link); | ||||
| 	} | ||||
| 
 | ||||
| 	post_message($thread['threadid'], $kind_events, getstring_("chat.status.user.reopenedthread", $thread['locale'])); | ||||
| 	return $thread; | ||||
| } | ||||
| 
 | ||||
| function take_thread($thread,$operator) { | ||||
| 	global $state_queue, $state_waiting, $state_chatting, $kind_events, $home_locale; | ||||
| 
 | ||||
| 	$state = $thread['istate']; | ||||
| 	$threadid = $thread['threadid']; | ||||
| 	$message_to_post = ""; | ||||
| 
 | ||||
| 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | ||||
| 
 | ||||
| 	if( $state == $state_queue || $state == $state_waiting) { | ||||
| 		do_take_thread($threadid, $operatorName); | ||||
| 
 | ||||
| 		if( $state == $state_waiting  ) { | ||||
| 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | ||||
| 		} else { | ||||
| 			$message_to_post = getstring2_("chat.status.operator.joined", array($operatorName), $thread['locale']); | ||||
| 		} | ||||
| 	} else if( $state == $state_chatting ) { | ||||
| 		if( $operatorName != $thread['agentName'] ) { | ||||
| 			do_take_thread($threadid, $operatorName);		 | ||||
| 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']); | ||||
| 		} | ||||
| 	} else { | ||||
| 		die("cannot take thread"); | ||||
| 	} | ||||
| 
 | ||||
| 	if( $message_to_post ) | ||||
| 		post_message($threadid,$kind_events,$message_to_post); | ||||
| } | ||||
| 
 | ||||
| function check_for_reassign($thread,$operator) { | ||||
| 	global $state_waiting, $home_locale, $kind_events; | ||||
| 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | ||||
| 	if( $thread['istate'] == $state_waiting &&  | ||||
| 			(  $thread['agentName'] == $operatorName )) { | ||||
| 		do_take_thread($thread['threadid'], $operatorName); | ||||
| 		$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | ||||
| 		post_message($thread['threadid'],$kind_events,$message_to_post); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function thread_by_id($id) { | ||||
| 	$link = connect(); | ||||
| 	$thread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $thread; | ||||
| } | ||||
| 
 | ||||
| function visitor_from_request() { | ||||
| 	global $namecookie; | ||||
| 	$userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username"); | ||||
| 
 | ||||
| 	return array( 'name' => $userName ); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  *    Pavel Petroshenko - history search | ||||
|  */ | ||||
| 
 | ||||
| $connection_timeout = 30; # sec
 | ||||
| 
 | ||||
| $namecookie = "WEBIM_Name"; | ||||
| 
 | ||||
| $state_queue = 0; | ||||
| $state_waiting = 1; | ||||
| $state_chatting = 2; | ||||
| $state_closed = 3; | ||||
| 
 | ||||
| $kind_user = 1; | ||||
| $kind_agent = 2; | ||||
| $kind_for_agent = 3; | ||||
| $kind_info = 4; | ||||
| $kind_conn = 5; | ||||
| $kind_events = 6; | ||||
| 
 | ||||
| $kind_to_string = array( $kind_user => "user", $kind_agent => "agent", $kind_for_agent => "hidden", | ||||
| 	$kind_info => "inf", $kind_conn => "conn", $kind_events => "event" ); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| function next_token() { | ||||
| 	return rand(99999,99999999); | ||||
| } | ||||
| 
 | ||||
| function next_revision($link) { | ||||
| 	perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link); | ||||
| 	$val = mysql_insert_id($link); | ||||
| 	return $val; | ||||
| } | ||||
| 
 | ||||
| function post_message_($threadid,$kind,$message,$link,$from=null,$time=null,$opid=null) { | ||||
| 	$query = sprintf( | ||||
| 	    "insert into chatmessage (threadid,ikind,tmessage,tname,agentId,dtmcreated) values (%s, %s,'%s',%s,%s,%s)", | ||||
| 			$threadid, | ||||
| 			$kind, | ||||
| 			quote_smart($message,$link), | ||||
| 			$from ? "'".quote_smart($from,$link)."'" : "null", | ||||
| 			$opid ? $opid : "0", | ||||
| 			$time ? "FROM_UNIXTIME($time)" : "CURRENT_TIMESTAMP" ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| } | ||||
| 
 | ||||
| function post_message($threadid,$kind,$message,$from=null,$agentid=null) { | ||||
| 	$link = connect(); | ||||
| 	post_message_($threadid,$kind,$message,$link,$from,null,$agentid); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function prepare_html_message($text) { | ||||
| 	$escaped_text = htmlspecialchars($text); | ||||
| 	$text_w_links = preg_replace('/(http|ftp):\/\/\S*/','<a href="$0" target="_blank">$0</a>',$escaped_text); | ||||
| 	$multiline = str_replace("\n","<br/>",$text_w_links); | ||||
| 	return $multiline; | ||||
| } | ||||
| 
 | ||||
| function message_to_html($msg) { | ||||
| 	global $kind_to_string; | ||||
| 	$message = "<span>".date("H:i:s",$msg['created'])."</span> "; | ||||
| 	$kind = $kind_to_string{$msg['ikind']}; | ||||
| 	if( $msg['tname'] ) | ||||
| 		$message.= "<span class='n$kind'>".htmlspecialchars($msg['tname'])."</span>: "; | ||||
| 	$message.= "<span class='m$kind'>".prepare_html_message($msg['tmessage'])."</span><br/>"; | ||||
| 	return $message; | ||||
| } | ||||
| 
 | ||||
| function message_to_text($msg) { | ||||
| 	global $kind_user, $kind_agent, $kind_info; | ||||
| 	$time = date("H:i:s ",$msg['created']); | ||||
| 	if($msg['ikind'] == $kind_user || $msg['ikind'] == $kind_agent) { | ||||
| 		if( $msg['tname'] ) | ||||
| 			return $time.$msg['tname'].": ".$msg['tmessage']."\n"; | ||||
| 		else | ||||
| 			return $time.$msg['tmessage']."\n"; | ||||
| 	} else if($msg['ikind'] == $kind_info ) { | ||||
| 		return $time.$msg['tmessage']."\n"; | ||||
| 	} else { | ||||
| 		return $time."[".$msg['tmessage']."]\n"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_messages($threadid,$meth,$isuser,&$lastid) { | ||||
| 	global $kind_for_agent; | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = sprintf( | ||||
| 	    "select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ". | ||||
| 	    "where threadid = %s and messageid > %s %s order by messageid", | ||||
| 	    $threadid, $lastid, $isuser ? "and ikind <> $kind_for_agent" : "" ); | ||||
| 
 | ||||
| 	$messages = array(); | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	while ($msg = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$message = ($meth == 'text') ? message_to_text($msg) : message_to_html($msg); | ||||
| 		$messages[] = $message; | ||||
| 		if( $msg['messageid'] > $lastid ) | ||||
| 			$lastid = $msg['messageid']; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 	return $messages; | ||||
| }  | ||||
| 
 | ||||
| function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) { | ||||
| 	global $webim_encoding, $webimroot; | ||||
| 	$output = get_messages($threadid,"html",$isuser,$lastid); | ||||
| 
 | ||||
| 	if( $format == "xml" ) { | ||||
| 		start_xml_output(); | ||||
| 		print("<thread lastID=\"$lastid\">");
 | ||||
| 		foreach( $output as $msg ) { | ||||
| 			print "<message>".myiconv($webim_encoding,"utf-8",escape_with_cdata($msg))."</message>\n"; | ||||
| 		} | ||||
| 		print("</thread>"); | ||||
| 	} else if( $format == "html" ) { | ||||
| 		start_html_output(); | ||||
| 		$url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false"); | ||||
| 
 | ||||
| 		print("<html><head>\n". | ||||
| 		    "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"$webimroot/chat.css\" />\n". | ||||
| 		    "<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||
| 		    "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n". | ||||
| 		    "</head>". | ||||
| 		    "<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">". | ||||
| 		    "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>" ); | ||||
| 
 | ||||
| 		foreach( $output as $msg ) { | ||||
| 			print $msg; | ||||
| 		} | ||||
| 
 | ||||
| 		print( | ||||
| 		    "</td></tr></table><a name='aend'>". | ||||
| 		    "</body></html>" ); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_user_name($name, $id="") { | ||||
| 	global $presentable_name_pattern; | ||||
|        	return str_replace("{id}", $id, str_replace("{name}", $name, $presentable_name_pattern)); | ||||
| } | ||||
| 
 | ||||
| function setup_chatview_for_user($thread,$level) { | ||||
| 	global $page, $webimroot, $user_can_change_name, $company_logo_link, $company_name; | ||||
| 	$page = array(); | ||||
| 	$page['agent'] = false; | ||||
| 	$page['user'] = true; | ||||
| 	$page['canpost'] = true; | ||||
| 	$nameisset = getstring("chat.default.username") != $thread['userName']; | ||||
| 	$page['displ1'] = $nameisset ? "none" : "inline"; | ||||
| 	$page['displ2'] = $nameisset ? "inline" : "none"; | ||||
| 	$page['level'] = $level; | ||||
| 	$page['ct.chatThreadId'] = $thread['threadid']; | ||||
| 	$page['ct.token'] = $thread['ltoken']; | ||||
| 	$page['ct.user.name'] = $thread['userName']; | ||||
| 	$page['canChangeName'] = $user_can_change_name; | ||||
| 
 | ||||
| 	$page['ct.company.name'] = $company_name; | ||||
| 	$page['ct.company.chatLogoURL'] = $company_logo_link; | ||||
| 
 | ||||
| 	$params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; | ||||
| 	$page['selfLink'] = "$webimroot/client.php?".$params."&level=".$level; | ||||
| } | ||||
| 
 | ||||
| function setup_chatview_for_operator($thread,$operator) { | ||||
| 	global $page, $webimroot, $company_logo_link, $company_name; | ||||
| 	$page = array(); | ||||
| 	$page['agent'] = true; | ||||
| 	$page['user'] = false; | ||||
| 	$page['canpost'] = true; | ||||
| 	$page['ct.chatThreadId'] = $thread['threadid']; | ||||
| 	$page['ct.token'] = $thread['ltoken']; | ||||
| 	$page['ct.user.name'] = get_user_name($thread['userName']); | ||||
| 
 | ||||
| 	$page['ct.company.name'] = $company_name; | ||||
| 	$page['ct.company.chatLogoURL'] = $company_logo_link; | ||||
| 
 | ||||
| 	// TODO
 | ||||
| 	$page['namePostfix'] = "";	 | ||||
| } | ||||
| 
 | ||||
| function is_ajax_browser($name,$ver,$useragent) { | ||||
| 	if( $name == "opera" ) | ||||
| 		return $ver >= 8.02; | ||||
| 	if( $name == "safari" ) | ||||
| 		return $ver >= 125; | ||||
| 	if( $name == "msie" ) | ||||
| 		return $ver >= 5.5 && !strstr($useragent, "powerpc"); | ||||
| 	if( $name == "netscape" ) | ||||
| 		return $ver >= 7.1; | ||||
| 	if( $name == "mozilla") | ||||
| 		return $ver >= 1.4; | ||||
| 	if( $name == "firefox") | ||||
| 		return $ver >= 1.0; | ||||
| 
 | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| function is_old_browser($name,$ver) { | ||||
| 	if( $name == "opera" ) | ||||
| 		return $ver < 7.0; | ||||
| 	if( $name == "msie" ) | ||||
| 		return $ver < 5.0; | ||||
| 	return false;  | ||||
| } | ||||
| 
 | ||||
| $knownAgents = array("opera","msie","safari","firefox","netscape","mozilla"); | ||||
| 
 | ||||
| function get_remote_level($useragent) { | ||||
| 	global $knownAgents; | ||||
| 	$useragent = strtolower($useragent); | ||||
| 	foreach( $knownAgents as $agent ) { | ||||
| 		if( strstr($useragent,$agent) ) { | ||||
| 			if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) { | ||||
| 				$ver = $matches[1]; | ||||
| 
 | ||||
| 				if( is_ajax_browser($agent,$ver,$useragent) ) | ||||
| 					return "ajaxed"; | ||||
| 				else if( is_old_browser($agent,$ver) ) | ||||
| 					return "old"; | ||||
| 
 | ||||
| 				return "simple"; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return "simple"; | ||||
| } | ||||
| 
 | ||||
| function update_thread_access($threadid, $params, $link) { | ||||
| 	$clause = ""; | ||||
| 	foreach( $params as $k => $v ) { | ||||
| 		if( strlen($clause) > 0 ) | ||||
| 			$clause .= ", "; | ||||
| 	    $clause .= $k."=".$v; | ||||
| 	} | ||||
| 	perform_query( | ||||
| 		 "update chatthread set $clause ". | ||||
| 		 "where threadid = ".$threadid,$link); | ||||
| } | ||||
| 
 | ||||
| function get_access_time($threadid, $isuser, $link) { | ||||
| 	return select_one_row(sprintf( | ||||
| 		 "select unix_timestamp(%s) as lastping, ". | ||||
| 		 "unix_timestamp(CURRENT_TIMESTAMP) as current ". | ||||
| 		 "from chatthread where threadid = %s", | ||||
| 		$isuser ? "lastpinguser" : "lastpingagent", | ||||
| 		$threadid), $link); | ||||
| } | ||||
| 
 | ||||
| function ping_thread($thread, $isuser) { | ||||
| 	global $kind_for_agent, $state_chatting, $state_waiting, $kind_conn, $connection_timeout; | ||||
| 	$link = connect(); | ||||
| 	$params = array(($isuser ? "lastpinguser" : "lastpingagent") => "CURRENT_TIMESTAMP" ); | ||||
| 
 | ||||
| 	$access = get_access_time($thread['threadid'], !$isuser, $link); | ||||
|  	if( $access['lastping'] > 0 && abs($access['current']-$access['lastping']) > $connection_timeout ) { | ||||
| 		$params[$isuser ? "lastpingagent" : "lastpinguser"] = "0"; | ||||
| 		if( !$isuser ) { | ||||
| 			$message_to_post = getstring_("chat.status.user.dead", $thread['locale']); | ||||
| 			post_message_($thread['threadid'],$kind_for_agent,$message_to_post,$link,null,$access['lastping']+$connection_timeout); | ||||
| 		} else if( $thread['istate'] == $state_chatting ) { | ||||
| 
 | ||||
| 			$message_to_post = getstring_("chat.status.operator.dead", $thread['locale']); | ||||
| 			post_message_($thread['threadid'],$kind_conn,$message_to_post,$link,null,$access['lastping']+$connection_timeout); | ||||
| 			$params['istate'] = $state_waiting; | ||||
| 			commit_thread($thread['threadid'], $params, $link); | ||||
| 			mysql_close($link); | ||||
| 			return; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	update_thread_access($thread['threadid'], $params, $link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function commit_thread($threadid,$params,$link) { | ||||
| 	$query = "update chatthread set lrevision = ".next_revision($link).", dtmmodified = CURRENT_TIMESTAMP"; | ||||
| 	foreach( $params as $k => $v ) { | ||||
| 	    $query .= ", ".$k."=".$v; | ||||
| 	} | ||||
| 	$query .= " where threadid = ".$threadid; | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| } | ||||
| 
 | ||||
| function rename_user($thread, $newname) { | ||||
| 	global $kind_events; | ||||
| 
 | ||||
| 	$link = connect(); | ||||
| 	commit_thread( $thread['threadid'], array('userName' => "'".mysql_real_escape_string($newname)."'"), $link); | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	if( $thread['userName'] != $newname ) { | ||||
| 		post_message($thread['threadid'],$kind_events, | ||||
| 			getstring2_("chat.status.user.changedname",array($thread['userName'], $newname), $thread['locale'])); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function close_thread($thread,$isuser) { | ||||
| 	global $state_closed, $kind_events; | ||||
| 	 | ||||
| 	if( $thread['istate'] != $state_closed ) { | ||||
| 		$link = connect(); | ||||
| 		commit_thread( $thread['threadid'], array('istate' => $state_closed), $link); | ||||
| 		mysql_close($link); | ||||
| 	} | ||||
| 
 | ||||
| 	$message =  $isuser ? getstring2_("chat.status.user.left", array($thread['userName']), $thread['locale']) | ||||
| 					: getstring2_("chat.status.operator.left", array($thread['agentName']), $thread['locale']); | ||||
| 	post_message($thread['threadid'], $kind_events, $message); | ||||
| } | ||||
| 
 | ||||
| function create_thread($username,$remote,$referer,$lang) { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = sprintf( | ||||
| 		 "insert into chatthread (userName,"."ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ". | ||||
| 								 "('%s',"."%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)", | ||||
| 			mysql_real_escape_string($username), | ||||
| 			next_token(), | ||||
| 			mysql_real_escape_string($remote), | ||||
| 			mysql_real_escape_string($referer), | ||||
| 			next_revision($link), | ||||
| 			mysql_real_escape_string($lang) ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| 	$id = mysql_insert_id($link); | ||||
| 
 | ||||
| 	$newthread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $newthread; | ||||
| } | ||||
| 
 | ||||
| function do_take_thread($threadid,$operatorId,$operatorName) { | ||||
| 	global $state_chatting; | ||||
| 	$link = connect(); | ||||
| 	commit_thread( $threadid,  | ||||
| 		array("istate" => $state_chatting, | ||||
| 			  "agentId" => $operatorId, | ||||
| 			  "agentName" => "'".mysql_real_escape_string($operatorName)."'"), $link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function reopen_thread($threadid) { | ||||
| 	global $state_queue,$state_waiting,$state_chatting,$state_closed,$kind_events; | ||||
| 	$thread = thread_by_id($threadid); | ||||
| 
 | ||||
| 	if( !$thread ) | ||||
| 		return FALSE; | ||||
| 
 | ||||
| 	if( $thread['istate'] == $state_closed ) | ||||
| 		return FALSE; | ||||
| 
 | ||||
| 	if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) { | ||||
| 		$link = connect(); | ||||
| 		commit_thread( $threadid,  | ||||
| 			array("istate" => $state_waiting ), $link); | ||||
| 		mysql_close($link); | ||||
| 	} | ||||
| 
 | ||||
| 	post_message($thread['threadid'], $kind_events, getstring_("chat.status.user.reopenedthread", $thread['locale'])); | ||||
| 	return $thread; | ||||
| } | ||||
| 
 | ||||
| function take_thread($thread,$operator) { | ||||
| 	global $state_queue, $state_waiting, $state_chatting, $kind_events, $home_locale; | ||||
| 
 | ||||
| 	$state = $thread['istate']; | ||||
| 	$threadid = $thread['threadid']; | ||||
| 	$message_to_post = ""; | ||||
| 
 | ||||
| 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | ||||
| 
 | ||||
| 	if( $state == $state_queue || $state == $state_waiting) { | ||||
| 		do_take_thread($threadid, $operator['operatorid'], $operatorName); | ||||
| 
 | ||||
| 		if( $state == $state_waiting  ) { | ||||
| 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | ||||
| 		} else { | ||||
| 			$message_to_post = getstring2_("chat.status.operator.joined", array($operatorName), $thread['locale']); | ||||
| 		} | ||||
| 	} else if( $state == $state_chatting ) { | ||||
| 		if( $operator['operatorid'] != $thread['agentId'] ) { | ||||
| 			do_take_thread($threadid, $operator['operatorid'], $operatorName);		 | ||||
| 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']); | ||||
| 		} | ||||
| 	} else { | ||||
| 		die("cannot take thread"); | ||||
| 	} | ||||
| 
 | ||||
| 	if( $message_to_post ) { | ||||
| 		post_message($threadid,$kind_events,$message_to_post); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function check_for_reassign($thread,$operator) { | ||||
| 	global $state_waiting, $home_locale, $kind_events; | ||||
| 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | ||||
| 	if( $thread['istate'] == $state_waiting &&  | ||||
| 			(  $thread['agentId'] == $operator['operatorid'] )) { | ||||
| 		do_take_thread($thread['threadid'], $operator['operatorid'], $operatorName); | ||||
| 		$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | ||||
| 		post_message($thread['threadid'],$kind_events,$message_to_post); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function thread_by_id($id) { | ||||
| 	$link = connect(); | ||||
| 	$thread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $thread; | ||||
| } | ||||
| 
 | ||||
| function visitor_from_request() { | ||||
| 	global $namecookie; | ||||
| 	$userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username"); | ||||
| 
 | ||||
| 	return array( 'name' => $userName ); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
|  | ||||
| @ -1,293 +1,335 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| session_start(); | ||||
| 
 | ||||
| require(dirname(__FILE__).'/converter.php'); | ||||
| require(dirname(__FILE__).'/config.php'); | ||||
| 
 | ||||
| $webimroot = "/webim";                      # absolute path on server
 | ||||
| 
 | ||||
| function myiconv($in_enc, $out_enc, $string) { | ||||
| 	global $_utf8win1251, $_win1251utf8; | ||||
| 	if( function_exists('iconv') ) { | ||||
| 	    $converted = iconv($in_enc, $out_enc, $string); | ||||
| 	    if( $converted !== FALSE ) | ||||
| 			return $converted; | ||||
| 	} | ||||
| 	if( $in_enc == "cp1251" && $out_enc == "utf-8" ) | ||||
| 		return strtr($string, $_win1251utf8); | ||||
| 	if( $in_enc == "utf-8" && $out_enc == "cp1251" ) | ||||
| 		return strtr($string, $_utf8win1251); | ||||
| 
 | ||||
| 	return $string; // do not know how to convert
 | ||||
| } | ||||
| 
 | ||||
| function getrawparam( $name ) { | ||||
| 	global $webim_encoding, $request_encoding; | ||||
| 	if( isset($_POST[$name]) ) | ||||
| 		return myiconv($request_encoding,$webim_encoding,$_POST[$name]); | ||||
| 	die("no ".$name." parameter"); | ||||
| } | ||||
| 
 | ||||
| function getparam( $name ) { | ||||
| 	if( isset($_POST[$name]) ) | ||||
| 		return $_POST[$name]; | ||||
| 	die("no ".$name." parameter"); | ||||
| } | ||||
| 
 | ||||
| function verifyparam( $name, $regexp, $default = null ) { | ||||
| 
 | ||||
| 	if( isset( $_GET[$name] ) ) { | ||||
| 		$val = $_GET[$name]; | ||||
| 		if( preg_match( $regexp, $val ) ) | ||||
| 			return $val; | ||||
| 
 | ||||
| 	} else if( isset( $_POST[$name] ) ) { | ||||
| 		$val = $_POST[$name]; | ||||
| 		if( preg_match( $regexp, $val ) ) | ||||
| 			return $val; | ||||
| 
 | ||||
| 	} else { | ||||
| 		if( isset( $default ) ) | ||||
| 			return $default; | ||||
| 	} | ||||
| 
 | ||||
| 	echo "<html><head></head><body>Wrong parameter used or absent: ".$name."</body></html>"; | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| function debugexit_print( $var ) { | ||||
| 	echo "<html><body><pre>"; | ||||
| 	print_r( $var ); | ||||
| 	echo "</pre></body></html>"; | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| function get_user_locale() { | ||||
| 	global $available_locales, $default_locale; | ||||
| 
 | ||||
| 	if( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) { | ||||
| 		$requested_langs = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); | ||||
| 		foreach( $requested_langs as $requested_lang) { | ||||
| 			if( strlen($requested_lang) > 2 ) | ||||
| 				$requested_lang = substr($requested_lang,0,2); | ||||
| 
 | ||||
| 			if( in_array($requested_lang,$available_locales) ) | ||||
| 				return $requested_lang; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if( in_array($default_locale,$available_locales) ) | ||||
| 		return $default_locale; | ||||
| 
 | ||||
| 	return 'en'; | ||||
| } | ||||
| 
 | ||||
| function get_locale() { | ||||
| 	global $available_locales; | ||||
| 
 | ||||
| 	$locale = verifyparam("locale", "/^\w\w$/", ""); | ||||
| 
 | ||||
| 	if( $locale && in_array($locale,$available_locales) ) { | ||||
| 		$_SESSION['locale'] = $locale; | ||||
| 	} else if( isset($_SESSION['locale']) ){ | ||||
| 	    $locale = $_SESSION['locale']; | ||||
| 	} | ||||
| 
 | ||||
| 	if( !$locale || !in_array($locale,$available_locales) ) | ||||
| 		$locale = get_user_locale(); | ||||
| 	return $locale; | ||||
| } | ||||
| 
 | ||||
| function set_locale($locale) { | ||||
| 	global $current_locale, $available_locales; | ||||
| 	if( in_array($locale,$available_locales) ) | ||||
| 		$current_locale = $locale; | ||||
| } | ||||
| 
 | ||||
| $current_locale = get_locale(); | ||||
| $messages = array(); | ||||
| 
 | ||||
| function load_messages($locale) { | ||||
| 	global $messages; | ||||
| 	$hash = array(); | ||||
| 	$fp = fopen(dirname(__FILE__)."/../view/properties_$locale","r"); | ||||
| 	while (!feof($fp)) { | ||||
|     	$line = fgets($fp, 4096); | ||||
| 		$list = split("=", $line, 2 ); | ||||
| 		if( isset($list[1]) ) { | ||||
| 			$hash[$list[0]] = str_replace("\\n", "\n",trim($list[1])); | ||||
| 		} | ||||
| 	} | ||||
| 	fclose($fp); | ||||
| 	$messages[$locale] = $hash; | ||||
| } | ||||
| 
 | ||||
| function getstring_($text,$locale) { | ||||
| 	global $messages; | ||||
| 	if(!isset($messages[$locale])) | ||||
| 		load_messages($locale); | ||||
| 
 | ||||
| 	$localized = $messages[$locale]; | ||||
| 	if( isset($localized[$text]) ) | ||||
| 		return $localized[$text]; | ||||
| 
 | ||||
| 	return "!".$text; | ||||
| } | ||||
| 
 | ||||
| function getstring($text) { | ||||
| 	global $current_locale; | ||||
| 	return getstring_($text,$current_locale); | ||||
| } | ||||
| 
 | ||||
| function getstring2_($text,$params,$locale) { | ||||
| 	$string = getstring_($text,$locale); | ||||
| 	for( $i = 0; $i < count($params); $i++ ) { | ||||
| 		$string = str_replace("{".$i."}", $params[$i], $string); | ||||
| 	} | ||||
| 	return $string; | ||||
| } | ||||
| 
 | ||||
| function getstring2($text,$params) { | ||||
| 	global $current_locale; | ||||
| 	return getstring2_($text,$params,$current_locale); | ||||
| } | ||||
| 
 | ||||
| function connect() { | ||||
| 	global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding, $force_charset_in_connection; | ||||
| 	$link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) | ||||
| 		or die('Could not connect: ' . mysql_error()); | ||||
| 	mysql_select_db($mysqldb) or die('Could not select database'); | ||||
| 	if( $force_charset_in_connection ) | ||||
| 		mysql_query("SET character set $dbencoding", $link); | ||||
| 	return $link; | ||||
| } | ||||
| 
 | ||||
| function perform_query($query,$link) { | ||||
| 	mysql_query($query,$link) or die(' Query failed: ' .  | ||||
| 		mysql_error().": ".$query); | ||||
| } | ||||
| 
 | ||||
| function select_one_row($query,$link) { | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .  | ||||
| 		mysql_error().": ".$query); | ||||
| 	$line = mysql_fetch_array($result, MYSQL_ASSOC); | ||||
| 	mysql_free_result($result); | ||||
| 	return $line; | ||||
| } | ||||
| 
 | ||||
| function start_xml_output() { | ||||
| 	header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||
| 	header("Content-type: text/xml"); | ||||
| 	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; | ||||
| } | ||||
| 
 | ||||
| function start_html_output() { | ||||
| 	global $output_charset; | ||||
| 	header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||
| 	header("Content-type: text/html".(isset($output_charset)?"; charset=".$output_charset:"")); | ||||
| } | ||||
| 
 | ||||
| function escape_with_cdata($text) { | ||||
| 	return "<![CDATA[" . str_replace("]]>", "]]>]]><![CDATA[",$text) . "]]>"; | ||||
| } | ||||
| 
 | ||||
| function form_value($key) { | ||||
| 	global $page; | ||||
| 	if( isset($page) && isset($page["form$key"]) ) | ||||
| 		return $page["form$key"]; | ||||
| 	return ""; | ||||
| } | ||||
| 
 | ||||
| function form_value_cb($key) { | ||||
| 	global $page; | ||||
| 	if( isset($page) && isset($page["form$key"]) ) | ||||
| 		return $page["form$key"] === true; | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| function no_field($key) { | ||||
| 	return getstring2("errors.required",array(getstring($key))); | ||||
| } | ||||
| 
 | ||||
| function get_popup($href,$message,$title,$wndName,$options) { | ||||
| 	return "<a href=\"$href\" target=\"_blank\" ".($title?"title=\"$title\" ":"")."onclick=\"this.newWindow = window.open('$href', '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>"; | ||||
| } | ||||
| 
 | ||||
| function get_image($href,$width,$height) { | ||||
| 	if( $width != 0 && $height != 0 )                    | ||||
| 		return "<img src=\"$href\" border=\"0\" width=\"$width\" height=\"$height\"/>";
 | ||||
| 	return "<img src=\"$href\" border=\"0\"/>"; | ||||
| } | ||||
| 
 | ||||
| function get_gifimage_size($file) { | ||||
| 	if( function_exists('gd_info')) { | ||||
| 		$info = gd_info(); | ||||
| 		if( isset($info['GIF Read Support']) && $info['GIF Read Support'] ) { | ||||
| 			$img = @imagecreatefromgif($file); | ||||
| 			if($img) { | ||||
| 				$height = imagesy($img); | ||||
| 				$width = imagesx($img); | ||||
| 				imagedestroy($img); | ||||
| 				return array($width,$height); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return array(0,0); | ||||
| } | ||||
| 
 | ||||
| function add_params($servlet, $params) { | ||||
| 	$infix = '?'; | ||||
| 	if( strstr($servlet,$infix) !== FALSE ) | ||||
| 		$infix = '&'; | ||||
| 	foreach($params as $k => $v) { | ||||
| 		$servlet .= $infix.$k."=".$v; | ||||
| 		$infix = '&'; | ||||
| 	} | ||||
| 	return $servlet; | ||||
| } | ||||
| 
 | ||||
| function div($a,$b) { | ||||
|     return ($a-($a % $b)) / $b; | ||||
| } | ||||
| 
 | ||||
| function date_diff($seconds) { | ||||
|     $minutes = div($seconds,60); | ||||
| 	$seconds = $seconds % 60; | ||||
| 	if( $minutes < 60 ) { | ||||
| 		return sprintf("%02d:%02d",$minutes, $seconds); | ||||
| 	} else { | ||||
| 		$hours = div($minutes,60); | ||||
| 		$minutes = $minutes % 60; | ||||
| 		return sprintf("%02d:%02d:%02d",$hours, $minutes, $seconds); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function quote_smart($value,$link) { | ||||
| 	if (get_magic_quotes_gpc()) { | ||||
| 		$value = stripslashes($value); | ||||
| 	} | ||||
| 	return mysql_real_escape_string($value,$link); | ||||
| } | ||||
| 
 | ||||
| function get_app_location($showhost,$issecure) { | ||||
| 	if( $showhost ) { | ||||
| 		return ($issecure?"https://":"http://").$_SERVER['HTTP_HOST']."/webim"; | ||||
| 	} else { | ||||
| 		return "/webim"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| session_start(); | ||||
| 
 | ||||
| require(dirname(__FILE__).'/converter.php'); | ||||
| require(dirname(__FILE__).'/config.php'); | ||||
| 
 | ||||
| $webimroot = "/webim";                      # absolute path on server
 | ||||
| 
 | ||||
| function myiconv($in_enc, $out_enc, $string) { | ||||
| 	global $_utf8win1251, $_win1251utf8; | ||||
| 	if( function_exists('iconv') ) { | ||||
| 	    $converted = iconv($in_enc, $out_enc, $string); | ||||
| 	    if( $converted !== FALSE ) | ||||
| 			return $converted; | ||||
| 	} | ||||
| 	if( $in_enc == "cp1251" && $out_enc == "utf-8" ) | ||||
| 		return strtr($string, $_win1251utf8); | ||||
| 	if( $in_enc == "utf-8" && $out_enc == "cp1251" ) | ||||
| 		return strtr($string, $_utf8win1251); | ||||
| 
 | ||||
| 	return $string; // do not know how to convert
 | ||||
| } | ||||
| 
 | ||||
| function getrawparam( $name ) { | ||||
| 	global $webim_encoding, $request_encoding; | ||||
| 	if( isset($_POST[$name]) ) | ||||
| 		return myiconv($request_encoding,$webim_encoding,$_POST[$name]); | ||||
| 	die("no ".$name." parameter"); | ||||
| } | ||||
| 
 | ||||
| function getparam( $name ) { | ||||
| 	if( isset($_POST[$name]) ) | ||||
| 		return $_POST[$name]; | ||||
| 	die("no ".$name." parameter"); | ||||
| } | ||||
| 
 | ||||
| function verifyparam( $name, $regexp, $default = null ) { | ||||
| 
 | ||||
| 	if( isset( $_GET[$name] ) ) { | ||||
| 		$val = $_GET[$name]; | ||||
| 		if( preg_match( $regexp, $val ) ) | ||||
| 			return $val; | ||||
| 
 | ||||
| 	} else if( isset( $_POST[$name] ) ) { | ||||
| 		$val = $_POST[$name]; | ||||
| 		if( preg_match( $regexp, $val ) ) | ||||
| 			return $val; | ||||
| 
 | ||||
| 	} else { | ||||
| 		if( isset( $default ) ) | ||||
| 			return $default; | ||||
| 	} | ||||
| 
 | ||||
| 	echo "<html><head></head><body>Wrong parameter used or absent: ".$name."</body></html>"; | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| function debugexit_print( $var ) { | ||||
| 	echo "<html><body><pre>"; | ||||
| 	print_r( $var ); | ||||
| 	echo "</pre></body></html>"; | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| function get_user_locale() { | ||||
| 	global $available_locales, $default_locale; | ||||
| 
 | ||||
| 	if( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) { | ||||
| 		$requested_langs = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); | ||||
| 		foreach( $requested_langs as $requested_lang) { | ||||
| 			if( strlen($requested_lang) > 2 ) | ||||
| 				$requested_lang = substr($requested_lang,0,2); | ||||
| 
 | ||||
| 			if( in_array($requested_lang,$available_locales) ) | ||||
| 				return $requested_lang; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if( in_array($default_locale,$available_locales) ) | ||||
| 		return $default_locale; | ||||
| 
 | ||||
| 	return 'en'; | ||||
| } | ||||
| 
 | ||||
| function get_locale() { | ||||
| 	global $available_locales; | ||||
| 
 | ||||
| 	$locale = verifyparam("locale", "/^\w\w$/", ""); | ||||
| 
 | ||||
| 	if( $locale && in_array($locale,$available_locales) ) { | ||||
| 		$_SESSION['locale'] = $locale; | ||||
| 	} else if( isset($_SESSION['locale']) ){ | ||||
| 	    $locale = $_SESSION['locale']; | ||||
| 	} | ||||
| 
 | ||||
| 	if( !$locale || !in_array($locale,$available_locales) ) | ||||
| 		$locale = get_user_locale(); | ||||
| 	return $locale; | ||||
| } | ||||
| 
 | ||||
| function set_locale($locale) { | ||||
| 	global $current_locale, $available_locales; | ||||
| 	if( in_array($locale,$available_locales) ) | ||||
| 		$current_locale = $locale; | ||||
| } | ||||
| 
 | ||||
| $current_locale = get_locale(); | ||||
| $messages = array(); | ||||
| 
 | ||||
| function load_messages($locale) { | ||||
| 	global $messages; | ||||
| 	$hash = array(); | ||||
| 	$fp = fopen(dirname(__FILE__)."/../view/properties_$locale","r"); | ||||
| 	while (!feof($fp)) { | ||||
|     	$line = fgets($fp, 4096); | ||||
| 		$list = split("=", $line, 2 ); | ||||
| 		if( isset($list[1]) ) { | ||||
| 			$hash[$list[0]] = str_replace("\\n", "\n",trim($list[1])); | ||||
| 		} | ||||
| 	} | ||||
| 	fclose($fp); | ||||
| 	$messages[$locale] = $hash; | ||||
| } | ||||
| 
 | ||||
| function getstring_($text,$locale) { | ||||
| 	global $messages; | ||||
| 	if(!isset($messages[$locale])) | ||||
| 		load_messages($locale); | ||||
| 
 | ||||
| 	$localized = $messages[$locale]; | ||||
| 	if( isset($localized[$text]) ) | ||||
| 		return $localized[$text]; | ||||
| 
 | ||||
| 	return "!".$text; | ||||
| } | ||||
| 
 | ||||
| function getstring($text) { | ||||
| 	global $current_locale; | ||||
| 	return getstring_($text,$current_locale); | ||||
| } | ||||
| 
 | ||||
| function getstring2_($text,$params,$locale) { | ||||
| 	$string = getstring_($text,$locale); | ||||
| 	for( $i = 0; $i < count($params); $i++ ) { | ||||
| 		$string = str_replace("{".$i."}", $params[$i], $string); | ||||
| 	} | ||||
| 	return $string; | ||||
| } | ||||
| 
 | ||||
| function getstring2($text,$params) { | ||||
| 	global $current_locale; | ||||
| 	return getstring2_($text,$params,$current_locale); | ||||
| } | ||||
| 
 | ||||
| function connect() { | ||||
| 	global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding, $force_charset_in_connection; | ||||
| 	$link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) | ||||
| 		or die('Could not connect: ' . mysql_error()); | ||||
| 	mysql_select_db($mysqldb) or die('Could not select database'); | ||||
| 	if( $force_charset_in_connection ) | ||||
| 		mysql_query("SET character set $dbencoding", $link); | ||||
| 	return $link; | ||||
| } | ||||
| 
 | ||||
| function perform_query($query,$link) { | ||||
| 	mysql_query($query,$link) or die(' Query failed: ' .  | ||||
| 		mysql_error().": ".$query); | ||||
| } | ||||
| 
 | ||||
| function select_one_row($query,$link) { | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .  | ||||
| 		mysql_error().": ".$query); | ||||
| 	$line = mysql_fetch_array($result, MYSQL_ASSOC); | ||||
| 	mysql_free_result($result); | ||||
| 	return $line; | ||||
| } | ||||
| 
 | ||||
| function select_multi_assoc($query,$link) { | ||||
| 	$sqlresult = mysql_query($query,$link) or die(' Query failed: ' .  | ||||
| 		mysql_error().": ".$query); | ||||
| 
 | ||||
| 	$result = array(); | ||||
| 	while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) { | ||||
| 		$result[] = $row; | ||||
| 	} | ||||
| 	mysql_free_result($sqlresult); | ||||
| 	return $result; | ||||
| } | ||||
| 
 | ||||
| function start_xml_output() { | ||||
| 	header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||
| 	header("Content-type: text/xml"); | ||||
| 	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; | ||||
| } | ||||
| 
 | ||||
| function start_html_output() { | ||||
| 	global $output_charset; | ||||
| 	header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||
| 	header("Content-type: text/html".(isset($output_charset)?"; charset=".$output_charset:"")); | ||||
| } | ||||
| 
 | ||||
| function escape_with_cdata($text) { | ||||
| 	return "<![CDATA[" . str_replace("]]>", "]]>]]><![CDATA[",$text) . "]]>"; | ||||
| } | ||||
| 
 | ||||
| function form_value($key) { | ||||
| 	global $page; | ||||
| 	if( isset($page) && isset($page["form$key"]) ) | ||||
| 		return $page["form$key"]; | ||||
| 	return ""; | ||||
| } | ||||
| 
 | ||||
| function form_value_cb($key) { | ||||
| 	global $page; | ||||
| 	if( isset($page) && isset($page["form$key"]) ) | ||||
| 		return $page["form$key"] === true; | ||||
| 	return false; | ||||
| } | ||||
| 
 | ||||
| function no_field($key) { | ||||
| 	return getstring2("errors.required",array(getstring($key))); | ||||
| } | ||||
| 
 | ||||
| function get_popup($href,$message,$title,$wndName,$options) { | ||||
| 	return "<a href=\"$href\" target=\"_blank\" ".($title?"title=\"$title\" ":"")."onclick=\"this.newWindow = window.open('$href', '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>"; | ||||
| } | ||||
| 
 | ||||
| function get_image($href,$width,$height) { | ||||
| 	if( $width != 0 && $height != 0 )                    | ||||
| 		return "<img src=\"$href\" border=\"0\" width=\"$width\" height=\"$height\"/>";
 | ||||
| 	return "<img src=\"$href\" border=\"0\"/>"; | ||||
| } | ||||
| 
 | ||||
| function get_gifimage_size($file) { | ||||
| 	if( function_exists('gd_info')) { | ||||
| 		$info = gd_info(); | ||||
| 		if( isset($info['GIF Read Support']) && $info['GIF Read Support'] ) { | ||||
| 			$img = @imagecreatefromgif($file); | ||||
| 			if($img) { | ||||
| 				$height = imagesy($img); | ||||
| 				$width = imagesx($img); | ||||
| 				imagedestroy($img); | ||||
| 				return array($width,$height); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	return array(0,0); | ||||
| } | ||||
| 
 | ||||
| function add_params($servlet, $params) { | ||||
| 	$infix = '?'; | ||||
| 	if( strstr($servlet,$infix) !== FALSE ) | ||||
| 		$infix = '&'; | ||||
| 	foreach($params as $k => $v) { | ||||
| 		$servlet .= $infix.$k."=".$v; | ||||
| 		$infix = '&'; | ||||
| 	} | ||||
| 	return $servlet; | ||||
| } | ||||
| 
 | ||||
| function div($a,$b) { | ||||
|     return ($a-($a % $b)) / $b; | ||||
| } | ||||
| 
 | ||||
| function date_diff($seconds) { | ||||
|     $minutes = div($seconds,60); | ||||
| 	$seconds = $seconds % 60; | ||||
| 	if( $minutes < 60 ) { | ||||
| 		return sprintf("%02d:%02d",$minutes, $seconds); | ||||
| 	} else { | ||||
| 		$hours = div($minutes,60); | ||||
| 		$minutes = $minutes % 60; | ||||
| 		return sprintf("%02d:%02d:%02d",$hours, $minutes, $seconds); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function quote_smart($value,$link) { | ||||
| 	if (get_magic_quotes_gpc()) { | ||||
| 		$value = stripslashes($value); | ||||
| 	} | ||||
| 	return mysql_real_escape_string($value,$link); | ||||
| } | ||||
| 
 | ||||
| function get_app_location($showhost,$issecure) { | ||||
| 	if( $showhost ) { | ||||
| 		return ($issecure?"https://":"http://").$_SERVER['HTTP_HOST']."/webim"; | ||||
| 	} else { | ||||
| 		return "/webim"; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function get_month_selection($fromtime,$totime) { | ||||
| 	$start = getdate($fromtime); | ||||
| 	$month = $start['mon']; | ||||
| 	$year = $start['year']; | ||||
| 	$result = array(); | ||||
| 	do { | ||||
| 		$current = mktime(0,0,0,$month,1,$year); | ||||
| 		$result[date("m.y",$current)] = date("M, Y",$current); | ||||
| 		$month++; | ||||
| 		if( $month > 12 ) { | ||||
| 			$month = 1; | ||||
| 			$year++;  | ||||
| 		} | ||||
| 	} while( $current < $totime ); | ||||
| 	return $result; | ||||
| } | ||||
| 
 | ||||
| function get_form_date($day,$month) { | ||||
| 	if( preg_match('/^(\d{2}).(\d{2})$/', $month, $matches)) { | ||||
| 		return mktime(0,0,0,$matches[1],$day,$matches[2]); | ||||
| 	} | ||||
| 	return 0; | ||||
| } | ||||
| 
 | ||||
| function set_form_date($time,$prefix) { | ||||
| 	global $page; | ||||
| 	$page["form${prefix}day"] = date("d", $time); | ||||
| 	$page["form${prefix}month"] = date("m.y", $time); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,89 +1,89 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| /* | ||||
|  *  MySQL Database parameters | ||||
|  */ | ||||
| $mysqlhost = "localhost"; | ||||
| $mysqldb = "webim_db"; | ||||
| $mysqllogin = "webim_lite"; | ||||
| $mysqlpass = "123"; | ||||
| 
 | ||||
| /* | ||||
|  *  Localization parameters | ||||
|  */ | ||||
| 
 | ||||
| // Use CP-1251 database
 | ||||
| $dbencoding = "cp1251"; | ||||
| $webim_encoding = "cp1251"; | ||||
| $request_encoding = "utf-8"; | ||||
| $output_charset = "Windows-1251"; | ||||
| $force_charset_in_connection = true; | ||||
| 
 | ||||
| 
 | ||||
| // Use UTF-8 database
 | ||||
| /* | ||||
| $dbencoding = "utf8"; | ||||
| $webim_encoding = "cp1251"; | ||||
| $request_encoding = "utf-8"; | ||||
| $output_charset = "Windows-1251"; | ||||
| $force_charset_in_connection = true; | ||||
| */ | ||||
| 
 | ||||
| /* | ||||
|  *   From field in outgoing mail. | ||||
|  */ | ||||
| $webim_from_email = "webim@yourdomain.com"; // email from field
 | ||||
| 
 | ||||
| /* | ||||
|  *   Company international name. | ||||
|  */ | ||||
| $company_name = "My Company Ltd."; | ||||
| 
 | ||||
| /* | ||||
|  *   Company logo.  | ||||
|  */ | ||||
| $company_logo_link = ""; | ||||
| 
 | ||||
| /* | ||||
|  *   Locales  | ||||
|  */ | ||||
| $available_locales = array("en", "ru"); | ||||
| $home_locale = "ru";                        // native name will be used in this locale
 | ||||
| $default_locale = "en";                     // if user does not provide known lang
 | ||||
| 
 | ||||
| /* | ||||
|  *   Allows users to change their names | ||||
|  */ | ||||
| $user_can_change_name = true; | ||||
| 
 | ||||
| /* | ||||
|  *   How to build presentable visitor name from {name}. Default: {name} | ||||
|  */  | ||||
| $presentable_name_pattern = "{name}"; | ||||
| 
 | ||||
| /* | ||||
|  *   Method of getting information about remote user. For example, you could | ||||
|  *   have user name or id in session. Default value: visitor_from_request | ||||
|  */ | ||||
| $remote_visitor = 'visitor_from_request'; | ||||
| 
 | ||||
| /* | ||||
|  *   Timeout (in seconds) when online operator becomes offline. | ||||
|  */ | ||||
| $online_timeout = 30; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ?>
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| /* | ||||
|  *  MySQL Database parameters | ||||
|  */ | ||||
| $mysqlhost = "localhost"; | ||||
| $mysqldb = "webim_db"; | ||||
| $mysqllogin = "webim_lite"; | ||||
| $mysqlpass = "123"; | ||||
| 
 | ||||
| /* | ||||
|  *  Localization parameters | ||||
|  */ | ||||
| 
 | ||||
| // Use CP-1251 database
 | ||||
| $dbencoding = "cp1251"; | ||||
| $webim_encoding = "cp1251"; | ||||
| $request_encoding = "utf-8"; | ||||
| $output_charset = "Windows-1251"; | ||||
| $force_charset_in_connection = true; | ||||
| 
 | ||||
| 
 | ||||
| // Use UTF-8 database
 | ||||
| /* | ||||
| $dbencoding = "utf8"; | ||||
| $webim_encoding = "cp1251"; | ||||
| $request_encoding = "utf-8"; | ||||
| $output_charset = "Windows-1251"; | ||||
| $force_charset_in_connection = true; | ||||
| */ | ||||
| 
 | ||||
| /* | ||||
|  *   From field in outgoing mail. | ||||
|  */ | ||||
| $webim_from_email = "webim@yourdomain.com"; // email from field
 | ||||
| 
 | ||||
| /* | ||||
|  *   Company international name. | ||||
|  */ | ||||
| $company_name = "My Company Ltd."; | ||||
| 
 | ||||
| /* | ||||
|  *   Company logo.  | ||||
|  */ | ||||
| $company_logo_link = ""; | ||||
| 
 | ||||
| /* | ||||
|  *   Locales  | ||||
|  */ | ||||
| $available_locales = array("en", "ru"); | ||||
| $home_locale = "ru";                        // native name will be used in this locale
 | ||||
| $default_locale = "en";                     // if user does not provide known lang
 | ||||
| 
 | ||||
| /* | ||||
|  *   Allows users to change their names | ||||
|  */ | ||||
| $user_can_change_name = true; | ||||
| 
 | ||||
| /* | ||||
|  *   How to build presentable visitor name from {name}. Default: {name} | ||||
|  */  | ||||
| $presentable_name_pattern = "{name}"; | ||||
| 
 | ||||
| /* | ||||
|  *   Method of getting information about remote user. For example, you could | ||||
|  *   have user name or id in session. Default value: visitor_from_request | ||||
|  */ | ||||
| $remote_visitor = 'visitor_from_request'; | ||||
| 
 | ||||
| /* | ||||
|  *   Timeout (in seconds) when online operator becomes offline. | ||||
|  */ | ||||
| $online_timeout = 30; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ?>
 | ||||
|  | ||||
| @ -1,48 +1,48 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| $_utf8win1251 = array( | ||||
| "\xD0\x90"=>"\xC0","\xD0\x91"=>"\xC1","\xD0\x92"=>"\xC2","\xD0\x93"=>"\xC3","\xD0\x94"=>"\xC4", | ||||
| "\xD0\x95"=>"\xC5","\xD0\x81"=>"\xA8","\xD0\x96"=>"\xC6","\xD0\x97"=>"\xC7","\xD0\x98"=>"\xC8", | ||||
| "\xD0\x99"=>"\xC9","\xD0\x9A"=>"\xCA","\xD0\x9B"=>"\xCB","\xD0\x9C"=>"\xCC","\xD0\x9D"=>"\xCD", | ||||
| "\xD0\x9E"=>"\xCE","\xD0\x9F"=>"\xCF","\xD0\xA0"=>"\xD0","\xD0\xA1"=>"\xD1","\xD0\xA2"=>"\xD2", | ||||
| "\xD0\xA3"=>"\xD3","\xD0\xA4"=>"\xD4","\xD0\xA5"=>"\xD5","\xD0\xA6"=>"\xD6","\xD0\xA7"=>"\xD7", | ||||
| "\xD0\xA8"=>"\xD8","\xD0\xA9"=>"\xD9","\xD0\xAA"=>"\xDA","\xD0\xAB"=>"\xDB","\xD0\xAC"=>"\xDC", | ||||
| "\xD0\xAD"=>"\xDD","\xD0\xAE"=>"\xDE","\xD0\xAF"=>"\xDF","\xD0\x87"=>"\xAF","\xD0\x86"=>"\xB2", | ||||
| "\xD0\x84"=>"\xAA","\xD0\x8E"=>"\xA1","\xD0\xB0"=>"\xE0","\xD0\xB1"=>"\xE1","\xD0\xB2"=>"\xE2", | ||||
| "\xD0\xB3"=>"\xE3","\xD0\xB4"=>"\xE4","\xD0\xB5"=>"\xE5","\xD1\x91"=>"\xB8","\xD0\xB6"=>"\xE6", | ||||
| "\xD0\xB7"=>"\xE7","\xD0\xB8"=>"\xE8","\xD0\xB9"=>"\xE9","\xD0\xBA"=>"\xEA","\xD0\xBB"=>"\xEB", | ||||
| "\xD0\xBC"=>"\xEC","\xD0\xBD"=>"\xED","\xD0\xBE"=>"\xEE","\xD0\xBF"=>"\xEF","\xD1\x80"=>"\xF0", | ||||
| "\xD1\x81"=>"\xF1","\xD1\x82"=>"\xF2","\xD1\x83"=>"\xF3","\xD1\x84"=>"\xF4","\xD1\x85"=>"\xF5", | ||||
| "\xD1\x86"=>"\xF6","\xD1\x87"=>"\xF7","\xD1\x88"=>"\xF8","\xD1\x89"=>"\xF9","\xD1\x8A"=>"\xFA", | ||||
| "\xD1\x8B"=>"\xFB","\xD1\x8C"=>"\xFC","\xD1\x8D"=>"\xFD","\xD1\x8E"=>"\xFE","\xD1\x8F"=>"\xFF", | ||||
| "\xD1\x96"=>"\xB3","\xD1\x97"=>"\xBF","\xD1\x94"=>"\xBA","\xD1\x9E"=>"\xA2"); | ||||
| $_win1251utf8 = array( | ||||
| "\xC0"=>"\xD0\x90","\xC1"=>"\xD0\x91","\xC2"=>"\xD0\x92","\xC3"=>"\xD0\x93","\xC4"=>"\xD0\x94", | ||||
| "\xC5"=>"\xD0\x95","\xA8"=>"\xD0\x81","\xC6"=>"\xD0\x96","\xC7"=>"\xD0\x97","\xC8"=>"\xD0\x98", | ||||
| "\xC9"=>"\xD0\x99","\xCA"=>"\xD0\x9A","\xCB"=>"\xD0\x9B","\xCC"=>"\xD0\x9C","\xCD"=>"\xD0\x9D", | ||||
| "\xCE"=>"\xD0\x9E","\xCF"=>"\xD0\x9F","\xD0"=>"\xD0\xA0","\xD1"=>"\xD0\xA1","\xD2"=>"\xD0\xA2", | ||||
| "\xD3"=>"\xD0\xA3","\xD4"=>"\xD0\xA4","\xD5"=>"\xD0\xA5","\xD6"=>"\xD0\xA6","\xD7"=>"\xD0\xA7", | ||||
| "\xD8"=>"\xD0\xA8","\xD9"=>"\xD0\xA9","\xDA"=>"\xD0\xAA","\xDB"=>"\xD0\xAB","\xDC"=>"\xD0\xAC", | ||||
| "\xDD"=>"\xD0\xAD","\xDE"=>"\xD0\xAE","\xDF"=>"\xD0\xAF","\xAF"=>"\xD0\x87","\xB2"=>"\xD0\x86", | ||||
| "\xAA"=>"\xD0\x84","\xA1"=>"\xD0\x8E","\xE0"=>"\xD0\xB0","\xE1"=>"\xD0\xB1","\xE2"=>"\xD0\xB2", | ||||
| "\xE3"=>"\xD0\xB3","\xE4"=>"\xD0\xB4","\xE5"=>"\xD0\xB5","\xB8"=>"\xD1\x91","\xE6"=>"\xD0\xB6", | ||||
| "\xE7"=>"\xD0\xB7","\xE8"=>"\xD0\xB8","\xE9"=>"\xD0\xB9","\xEA"=>"\xD0\xBA","\xEB"=>"\xD0\xBB", | ||||
| "\xEC"=>"\xD0\xBC","\xED"=>"\xD0\xBD","\xEE"=>"\xD0\xBE","\xEF"=>"\xD0\xBF","\xF0"=>"\xD1\x80", | ||||
| "\xF1"=>"\xD1\x81","\xF2"=>"\xD1\x82","\xF3"=>"\xD1\x83","\xF4"=>"\xD1\x84","\xF5"=>"\xD1\x85", | ||||
| "\xF6"=>"\xD1\x86","\xF7"=>"\xD1\x87","\xF8"=>"\xD1\x88","\xF9"=>"\xD1\x89","\xFA"=>"\xD1\x8A", | ||||
| "\xFB"=>"\xD1\x8B","\xFC"=>"\xD1\x8C","\xFD"=>"\xD1\x8D","\xFE"=>"\xD1\x8E","\xFF"=>"\xD1\x8F", | ||||
| "\xB3"=>"\xD1\x96","\xBF"=>"\xD1\x97","\xBA"=>"\xD1\x94","\xA2"=>"\xD1\x9E"); | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| $_utf8win1251 = array( | ||||
| "\xD0\x90"=>"\xC0","\xD0\x91"=>"\xC1","\xD0\x92"=>"\xC2","\xD0\x93"=>"\xC3","\xD0\x94"=>"\xC4", | ||||
| "\xD0\x95"=>"\xC5","\xD0\x81"=>"\xA8","\xD0\x96"=>"\xC6","\xD0\x97"=>"\xC7","\xD0\x98"=>"\xC8", | ||||
| "\xD0\x99"=>"\xC9","\xD0\x9A"=>"\xCA","\xD0\x9B"=>"\xCB","\xD0\x9C"=>"\xCC","\xD0\x9D"=>"\xCD", | ||||
| "\xD0\x9E"=>"\xCE","\xD0\x9F"=>"\xCF","\xD0\xA0"=>"\xD0","\xD0\xA1"=>"\xD1","\xD0\xA2"=>"\xD2", | ||||
| "\xD0\xA3"=>"\xD3","\xD0\xA4"=>"\xD4","\xD0\xA5"=>"\xD5","\xD0\xA6"=>"\xD6","\xD0\xA7"=>"\xD7", | ||||
| "\xD0\xA8"=>"\xD8","\xD0\xA9"=>"\xD9","\xD0\xAA"=>"\xDA","\xD0\xAB"=>"\xDB","\xD0\xAC"=>"\xDC", | ||||
| "\xD0\xAD"=>"\xDD","\xD0\xAE"=>"\xDE","\xD0\xAF"=>"\xDF","\xD0\x87"=>"\xAF","\xD0\x86"=>"\xB2", | ||||
| "\xD0\x84"=>"\xAA","\xD0\x8E"=>"\xA1","\xD0\xB0"=>"\xE0","\xD0\xB1"=>"\xE1","\xD0\xB2"=>"\xE2", | ||||
| "\xD0\xB3"=>"\xE3","\xD0\xB4"=>"\xE4","\xD0\xB5"=>"\xE5","\xD1\x91"=>"\xB8","\xD0\xB6"=>"\xE6", | ||||
| "\xD0\xB7"=>"\xE7","\xD0\xB8"=>"\xE8","\xD0\xB9"=>"\xE9","\xD0\xBA"=>"\xEA","\xD0\xBB"=>"\xEB", | ||||
| "\xD0\xBC"=>"\xEC","\xD0\xBD"=>"\xED","\xD0\xBE"=>"\xEE","\xD0\xBF"=>"\xEF","\xD1\x80"=>"\xF0", | ||||
| "\xD1\x81"=>"\xF1","\xD1\x82"=>"\xF2","\xD1\x83"=>"\xF3","\xD1\x84"=>"\xF4","\xD1\x85"=>"\xF5", | ||||
| "\xD1\x86"=>"\xF6","\xD1\x87"=>"\xF7","\xD1\x88"=>"\xF8","\xD1\x89"=>"\xF9","\xD1\x8A"=>"\xFA", | ||||
| "\xD1\x8B"=>"\xFB","\xD1\x8C"=>"\xFC","\xD1\x8D"=>"\xFD","\xD1\x8E"=>"\xFE","\xD1\x8F"=>"\xFF", | ||||
| "\xD1\x96"=>"\xB3","\xD1\x97"=>"\xBF","\xD1\x94"=>"\xBA","\xD1\x9E"=>"\xA2"); | ||||
| $_win1251utf8 = array( | ||||
| "\xC0"=>"\xD0\x90","\xC1"=>"\xD0\x91","\xC2"=>"\xD0\x92","\xC3"=>"\xD0\x93","\xC4"=>"\xD0\x94", | ||||
| "\xC5"=>"\xD0\x95","\xA8"=>"\xD0\x81","\xC6"=>"\xD0\x96","\xC7"=>"\xD0\x97","\xC8"=>"\xD0\x98", | ||||
| "\xC9"=>"\xD0\x99","\xCA"=>"\xD0\x9A","\xCB"=>"\xD0\x9B","\xCC"=>"\xD0\x9C","\xCD"=>"\xD0\x9D", | ||||
| "\xCE"=>"\xD0\x9E","\xCF"=>"\xD0\x9F","\xD0"=>"\xD0\xA0","\xD1"=>"\xD0\xA1","\xD2"=>"\xD0\xA2", | ||||
| "\xD3"=>"\xD0\xA3","\xD4"=>"\xD0\xA4","\xD5"=>"\xD0\xA5","\xD6"=>"\xD0\xA6","\xD7"=>"\xD0\xA7", | ||||
| "\xD8"=>"\xD0\xA8","\xD9"=>"\xD0\xA9","\xDA"=>"\xD0\xAA","\xDB"=>"\xD0\xAB","\xDC"=>"\xD0\xAC", | ||||
| "\xDD"=>"\xD0\xAD","\xDE"=>"\xD0\xAE","\xDF"=>"\xD0\xAF","\xAF"=>"\xD0\x87","\xB2"=>"\xD0\x86", | ||||
| "\xAA"=>"\xD0\x84","\xA1"=>"\xD0\x8E","\xE0"=>"\xD0\xB0","\xE1"=>"\xD0\xB1","\xE2"=>"\xD0\xB2", | ||||
| "\xE3"=>"\xD0\xB3","\xE4"=>"\xD0\xB4","\xE5"=>"\xD0\xB5","\xB8"=>"\xD1\x91","\xE6"=>"\xD0\xB6", | ||||
| "\xE7"=>"\xD0\xB7","\xE8"=>"\xD0\xB8","\xE9"=>"\xD0\xB9","\xEA"=>"\xD0\xBA","\xEB"=>"\xD0\xBB", | ||||
| "\xEC"=>"\xD0\xBC","\xED"=>"\xD0\xBD","\xEE"=>"\xD0\xBE","\xEF"=>"\xD0\xBF","\xF0"=>"\xD1\x80", | ||||
| "\xF1"=>"\xD1\x81","\xF2"=>"\xD1\x82","\xF3"=>"\xD1\x83","\xF4"=>"\xD1\x84","\xF5"=>"\xD1\x85", | ||||
| "\xF6"=>"\xD1\x86","\xF7"=>"\xD1\x87","\xF8"=>"\xD1\x88","\xF9"=>"\xD1\x89","\xFA"=>"\xD1\x8A", | ||||
| "\xFB"=>"\xD1\x8B","\xFC"=>"\xD1\x8C","\xFD"=>"\xD1\x8D","\xFE"=>"\xD1\x8E","\xFF"=>"\xD1\x8F", | ||||
| "\xB3"=>"\xD1\x96","\xBF"=>"\xD1\x97","\xBA"=>"\xD1\x94","\xA2"=>"\xD1\x9E"); | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,150 +1,150 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| function operator_by_login($login) { | ||||
| 	$link = connect(); | ||||
| 	$operator = select_one_row( | ||||
| 		 "select * from chatoperator where vclogin = '".mysql_real_escape_string($login)."'", $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $operator; | ||||
| } | ||||
| 
 | ||||
| function operator_by_id_($id,$link) { | ||||
| 	return select_one_row( | ||||
| 		 "select * from chatoperator where operatorid = $id", $link ); | ||||
| } | ||||
| 
 | ||||
| function operator_by_id($id) { | ||||
| 	$link = connect(); | ||||
| 	$operator = operator_by_id_($id,$link); | ||||
| 	mysql_close($link); | ||||
| 	return $operator; | ||||
| } | ||||
| 
 | ||||
| function get_operators() { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = "select * from chatoperator order by vclogin"; | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	$operators = array(); | ||||
| 	while ($op = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$operators[] = $op; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 	return $operators; | ||||
| }  | ||||
| 
 | ||||
| function update_operator($operatorid,$login,$password,$localename,$commonname) { | ||||
| 	$link = connect(); | ||||
| 	$query = sprintf( | ||||
| 		"update chatoperator set vclogin = '%s',%s vclocalename = '%s',vccommonname = '%s' where operatorid = %s", | ||||
| 		mysql_real_escape_string($login), | ||||
| 		($password ? " vcpassword='".md5($password)."'," : ""), | ||||
| 		mysql_real_escape_string($localename), | ||||
| 		mysql_real_escape_string($commonname), | ||||
| 		$operatorid ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function create_operator($login,$password,$localename,$commonname) { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = sprintf( | ||||
| 		"insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname) values ('%s','%s','%s','%s')", | ||||
| 			mysql_real_escape_string($login), | ||||
| 			md5($password), | ||||
| 			mysql_real_escape_string($localename), | ||||
| 			mysql_real_escape_string($commonname) ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| 	$id = mysql_insert_id($link); | ||||
| 
 | ||||
| 	$newop = select_one_row("select * from chatoperator where operatorid = $id", $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $newop; | ||||
| } | ||||
| 
 | ||||
| function notify_operator_alive($operatorid) { | ||||
| 	$link = connect(); | ||||
| 	perform_query("update chatoperator set dtmlastvisited = CURRENT_TIMESTAMP where operatorid = $operatorid",$link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function has_online_operators() { | ||||
| 	global $online_timeout; | ||||
| 	$link = connect(); | ||||
| 	$row = select_one_row("select min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time from chatoperator",$link); | ||||
| 	mysql_close($link); | ||||
| 	return $row['time'] < $online_timeout; | ||||
| } | ||||
| 
 | ||||
| function get_operator_name($operator) { | ||||
| 	global $home_locale, $current_locale; | ||||
| 	if( $home_locale == $current_locale ) | ||||
| 		return $operator['vclocalename']; | ||||
| 	else | ||||
| 		return $operator['vccommonname']; | ||||
| } | ||||
| 
 | ||||
| function generate_button($title,$locale,$inner,$showhost,$forcesecure) { | ||||
| 	$link = get_app_location($showhost,$forcesecure)."/client.php". ($locale?"?locale=".$locale : ""); | ||||
| 	return "<!-- webim button -->".get_popup($link, $inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=600,height=420,resizable=1" )."<!-- /webim button -->"; | ||||
| } | ||||
| 
 | ||||
| function check_login() { | ||||
| 	if( !isset( $_SESSION['operator'] ) ) { | ||||
| 		if( isset($_COOKIE['webim_lite']) ) { | ||||
| 			list($login,$pwd) = split(",", $_COOKIE['webim_lite'], 2); | ||||
| 			$op = operator_by_login($login); | ||||
| 			if( $op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd ) { | ||||
| 				$_SESSION['operator'] = $op; | ||||
| 				return $op; | ||||
| 			} | ||||
| 		} | ||||
| 		$_SESSION['backpath'] = $_SERVER['PHP_SELF']; | ||||
| 		header("Location: /webim/operator/login.php"); | ||||
| 		exit; | ||||
| 	} | ||||
| 	return $_SESSION['operator']; | ||||
| } | ||||
| 
 | ||||
| function get_logged_in() { | ||||
| 	return isset( $_SESSION['operator'] ) ? $_SESSION['operator'] : FALSE; | ||||
| } | ||||
| 
 | ||||
| function login_operator($operator,$remember) { | ||||
| 	$_SESSION['operator'] = $operator; | ||||
| 	if( $remember ) { | ||||
| 		$value = $operator['vclogin'].",".md5($operator['vcpassword']); | ||||
| 		setcookie('webim_lite', $value, time()+60*60*24*1000, "/webim/"); | ||||
| 
 | ||||
| 	} else if( isset($_COOKIE['webim_lite']) ) { | ||||
| 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function logout_operator() { | ||||
| 	$_SESSION['operator'] = NULL; | ||||
| 	$_SESSION['backpath'] = NULL; | ||||
| 	if( isset($_COOKIE['webim_lite']) ) { | ||||
| 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| function operator_by_login($login) { | ||||
| 	$link = connect(); | ||||
| 	$operator = select_one_row( | ||||
| 		 "select * from chatoperator where vclogin = '".mysql_real_escape_string($login)."'", $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $operator; | ||||
| } | ||||
| 
 | ||||
| function operator_by_id_($id,$link) { | ||||
| 	return select_one_row( | ||||
| 		 "select * from chatoperator where operatorid = $id", $link ); | ||||
| } | ||||
| 
 | ||||
| function operator_by_id($id) { | ||||
| 	$link = connect(); | ||||
| 	$operator = operator_by_id_($id,$link); | ||||
| 	mysql_close($link); | ||||
| 	return $operator; | ||||
| } | ||||
| 
 | ||||
| function get_operators() { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = "select * from chatoperator order by vclogin"; | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	$operators = array(); | ||||
| 	while ($op = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$operators[] = $op; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 	return $operators; | ||||
| }  | ||||
| 
 | ||||
| function update_operator($operatorid,$login,$password,$localename,$commonname) { | ||||
| 	$link = connect(); | ||||
| 	$query = sprintf( | ||||
| 		"update chatoperator set vclogin = '%s',%s vclocalename = '%s',vccommonname = '%s' where operatorid = %s", | ||||
| 		mysql_real_escape_string($login), | ||||
| 		($password ? " vcpassword='".md5($password)."'," : ""), | ||||
| 		mysql_real_escape_string($localename), | ||||
| 		mysql_real_escape_string($commonname), | ||||
| 		$operatorid ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function create_operator($login,$password,$localename,$commonname) { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$query = sprintf( | ||||
| 		"insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname) values ('%s','%s','%s','%s')", | ||||
| 			mysql_real_escape_string($login), | ||||
| 			md5($password), | ||||
| 			mysql_real_escape_string($localename), | ||||
| 			mysql_real_escape_string($commonname) ); | ||||
| 
 | ||||
| 	perform_query($query,$link); | ||||
| 	$id = mysql_insert_id($link); | ||||
| 
 | ||||
| 	$newop = select_one_row("select * from chatoperator where operatorid = $id", $link ); | ||||
| 	mysql_close($link); | ||||
| 	return $newop; | ||||
| } | ||||
| 
 | ||||
| function notify_operator_alive($operatorid) { | ||||
| 	$link = connect(); | ||||
| 	perform_query("update chatoperator set dtmlastvisited = CURRENT_TIMESTAMP where operatorid = $operatorid",$link); | ||||
| 	mysql_close($link); | ||||
| } | ||||
| 
 | ||||
| function has_online_operators() { | ||||
| 	global $online_timeout; | ||||
| 	$link = connect(); | ||||
| 	$row = select_one_row("select min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time from chatoperator",$link); | ||||
| 	mysql_close($link); | ||||
| 	return $row['time'] < $online_timeout; | ||||
| } | ||||
| 
 | ||||
| function get_operator_name($operator) { | ||||
| 	global $home_locale, $current_locale; | ||||
| 	if( $home_locale == $current_locale ) | ||||
| 		return $operator['vclocalename']; | ||||
| 	else | ||||
| 		return $operator['vccommonname']; | ||||
| } | ||||
| 
 | ||||
| function generate_button($title,$locale,$inner,$showhost,$forcesecure) { | ||||
| 	$link = get_app_location($showhost,$forcesecure)."/client.php". ($locale?"?locale=".$locale : ""); | ||||
| 	return "<!-- webim button -->".get_popup($link, $inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=600,height=420,resizable=1" )."<!-- /webim button -->"; | ||||
| } | ||||
| 
 | ||||
| function check_login() { | ||||
| 	if( !isset( $_SESSION['operator'] ) ) { | ||||
| 		if( isset($_COOKIE['webim_lite']) ) { | ||||
| 			list($login,$pwd) = split(",", $_COOKIE['webim_lite'], 2); | ||||
| 			$op = operator_by_login($login); | ||||
| 			if( $op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd ) { | ||||
| 				$_SESSION['operator'] = $op; | ||||
| 				return $op; | ||||
| 			} | ||||
| 		} | ||||
| 		$_SESSION['backpath'] = $_SERVER['PHP_SELF']; | ||||
| 		header("Location: /webim/operator/login.php"); | ||||
| 		exit; | ||||
| 	} | ||||
| 	return $_SESSION['operator']; | ||||
| } | ||||
| 
 | ||||
| function get_logged_in() { | ||||
| 	return isset( $_SESSION['operator'] ) ? $_SESSION['operator'] : FALSE; | ||||
| } | ||||
| 
 | ||||
| function login_operator($operator,$remember) { | ||||
| 	$_SESSION['operator'] = $operator; | ||||
| 	if( $remember ) { | ||||
| 		$value = $operator['vclogin'].",".md5($operator['vcpassword']); | ||||
| 		setcookie('webim_lite', $value, time()+60*60*24*1000, "/webim/"); | ||||
| 
 | ||||
| 	} else if( isset($_COOKIE['webim_lite']) ) { | ||||
| 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function logout_operator() { | ||||
| 	$_SESSION['operator'] = NULL; | ||||
| 	$_SESSION['backpath'] = NULL; | ||||
| 	if( isset($_COOKIE['webim_lite']) ) { | ||||
| 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,99 +1,99 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| $pagination_spacing = "   "; | ||||
| $links_on_page = 5; | ||||
| 
 | ||||
| function generate_pagination_link($page,$title) { | ||||
| 	$lnk = $_SERVER['REQUEST_URI']; | ||||
| 	$href = preg_replace("/\?page=\d+\&/", "?", preg_replace("/\&page=\d+/", "", $lnk)); | ||||
| 	$href .= strstr($href,"?") ? "&page=$page" : "?page=$page"; | ||||
| 	return "<a href=\"$href\" class=\"pagelink\">$title</a>"; | ||||
| } | ||||
| 
 | ||||
| function generate_pagination_image($id) { | ||||
| 	global $webimroot; | ||||
| 	return "<img src=\"$webimroot/images/$id.gif\" border=\"0\"/>"; | ||||
| } | ||||
| 
 | ||||
| function setup_pagination($items,$default_items_per_page=15) { | ||||
| 	global $page; | ||||
| 
 | ||||
| 	if( $items ) { | ||||
| 		$items_per_page = verifyparam("items", "/^\d{1,3}$/", $default_items_per_page); | ||||
| 		if( $items_per_page < 2 ) | ||||
| 			$items_per_page = 2; | ||||
| 	 | ||||
| 		$total_pages = div(count($items) + $items_per_page - 1, $items_per_page); | ||||
| 		$curr_page = verifyparam("page", "/^\d{1,6}$/", 1); | ||||
| 	 | ||||
| 		if( $curr_page < 1 ) | ||||
| 			$curr_page = 1; | ||||
| 		if( $curr_page > $total_pages ) | ||||
| 			$curr_page = $total_pages; | ||||
| 	 | ||||
| 		$start_index = ($curr_page-1)*$items_per_page; | ||||
| 		$end_index = min($start_index+$items_per_page, count($items)); | ||||
| 	    $page['pagination.items'] = array_slice($items, $start_index, $end_index-$start_index); | ||||
| 	    $page['pagination'] =  | ||||
| 	    	array(  "page" => $curr_page, "items" => $items_per_page, "total" => $total_pages,  | ||||
| 	    			"count" => count($items), "start" => $start_index, "end" => $end_index ); | ||||
| 	} else { | ||||
|     	$page['pagination.items'] = false; | ||||
|     	$page['pagination'] = true; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function setup_empty_pagination() { | ||||
| 	global $page; | ||||
|     $page['pagination.items'] = false; | ||||
|     $page['pagination'] = false; | ||||
| } | ||||
| 
 | ||||
| function generate_pagination($pagination) { | ||||
| 	global $pagination_spacing, $links_on_page; | ||||
| 	$result = getstring2("tag.pagination.info", | ||||
| 		array($pagination['page'],$pagination['total'],$pagination['start']+1,$pagination['end'],$pagination['count']))."<br/>"; | ||||
| 
 | ||||
| 	if( $pagination['total'] > 1 ) { | ||||
| 		$result.="<br/><div class='pagination'>"; | ||||
| 		$curr_page = $pagination['page']; | ||||
| 
 | ||||
| 		$minPage = max( $curr_page - $links_on_page, 1 ); | ||||
| 		$maxPage = min( $curr_page + $links_on_page, $pagination['total'] ); | ||||
| 		 | ||||
| 		if( $curr_page > 1 ) { | ||||
| 			$result .= generate_pagination_link($curr_page-1, generate_pagination_image("prevpage")).$pagination_spacing; | ||||
| 		} | ||||
| 
 | ||||
| 		for($i = $minPage; $i <= $maxPage; $i++ ) { | ||||
| 			$title = abs($curr_page-$i) >= $links_on_page && $i != 1 ? "..." : $i; | ||||
| 			if( $i != $curr_page) | ||||
| 				$result .= generate_pagination_link($i, $title); | ||||
| 			else | ||||
| 				$result .= "<span class=\"pagecurrent\">$title</span>"; | ||||
| 			if( $i < $maxPage ) | ||||
| 				$result .= $pagination_spacing; | ||||
| 		} | ||||
| 
 | ||||
| 
 | ||||
| 		if( $curr_page < $pagination['total'] ) { | ||||
| 			$result .= $pagination_spacing.generate_pagination_link($curr_page+1, generate_pagination_image("nextpage")); | ||||
| 		} | ||||
| 		$result.="</div>"; | ||||
| 	} | ||||
| 	return $result; | ||||
| } | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| $pagination_spacing = "   "; | ||||
| $links_on_page = 5; | ||||
| 
 | ||||
| function generate_pagination_link($page,$title) { | ||||
| 	$lnk = $_SERVER['REQUEST_URI']; | ||||
| 	$href = preg_replace("/\?page=\d+\&/", "?", preg_replace("/\&page=\d+/", "", $lnk)); | ||||
| 	$href .= strstr($href,"?") ? "&page=$page" : "?page=$page"; | ||||
| 	return "<a href=\"$href\" class=\"pagelink\">$title</a>"; | ||||
| } | ||||
| 
 | ||||
| function generate_pagination_image($id) { | ||||
| 	global $webimroot; | ||||
| 	return "<img src=\"$webimroot/images/$id.gif\" border=\"0\"/>"; | ||||
| } | ||||
| 
 | ||||
| function setup_pagination($items,$default_items_per_page=15) { | ||||
| 	global $page; | ||||
| 
 | ||||
| 	if( $items ) { | ||||
| 		$items_per_page = verifyparam("items", "/^\d{1,3}$/", $default_items_per_page); | ||||
| 		if( $items_per_page < 2 ) | ||||
| 			$items_per_page = 2; | ||||
| 	 | ||||
| 		$total_pages = div(count($items) + $items_per_page - 1, $items_per_page); | ||||
| 		$curr_page = verifyparam("page", "/^\d{1,6}$/", 1); | ||||
| 	 | ||||
| 		if( $curr_page < 1 ) | ||||
| 			$curr_page = 1; | ||||
| 		if( $curr_page > $total_pages ) | ||||
| 			$curr_page = $total_pages; | ||||
| 	 | ||||
| 		$start_index = ($curr_page-1)*$items_per_page; | ||||
| 		$end_index = min($start_index+$items_per_page, count($items)); | ||||
| 	    $page['pagination.items'] = array_slice($items, $start_index, $end_index-$start_index); | ||||
| 	    $page['pagination'] =  | ||||
| 	    	array(  "page" => $curr_page, "items" => $items_per_page, "total" => $total_pages,  | ||||
| 	    			"count" => count($items), "start" => $start_index, "end" => $end_index ); | ||||
| 	} else { | ||||
|     	$page['pagination.items'] = false; | ||||
|     	$page['pagination'] = true; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| function setup_empty_pagination() { | ||||
| 	global $page; | ||||
|     $page['pagination.items'] = false; | ||||
|     $page['pagination'] = false; | ||||
| } | ||||
| 
 | ||||
| function generate_pagination($pagination) { | ||||
| 	global $pagination_spacing, $links_on_page; | ||||
| 	$result = getstring2("tag.pagination.info", | ||||
| 		array($pagination['page'],$pagination['total'],$pagination['start']+1,$pagination['end'],$pagination['count']))."<br/>"; | ||||
| 
 | ||||
| 	if( $pagination['total'] > 1 ) { | ||||
| 		$result.="<br/><div class='pagination'>"; | ||||
| 		$curr_page = $pagination['page']; | ||||
| 
 | ||||
| 		$minPage = max( $curr_page - $links_on_page, 1 ); | ||||
| 		$maxPage = min( $curr_page + $links_on_page, $pagination['total'] ); | ||||
| 		 | ||||
| 		if( $curr_page > 1 ) { | ||||
| 			$result .= generate_pagination_link($curr_page-1, generate_pagination_image("prevpage")).$pagination_spacing; | ||||
| 		} | ||||
| 
 | ||||
| 		for($i = $minPage; $i <= $maxPage; $i++ ) { | ||||
| 			$title = abs($curr_page-$i) >= $links_on_page && $i != 1 ? "..." : $i; | ||||
| 			if( $i != $curr_page) | ||||
| 				$result .= generate_pagination_link($i, $title); | ||||
| 			else | ||||
| 				$result .= "<span class=\"pagecurrent\">$title</span>"; | ||||
| 			if( $i < $maxPage ) | ||||
| 				$result .= $pagination_spacing; | ||||
| 		} | ||||
| 
 | ||||
| 
 | ||||
| 		if( $curr_page < $pagination['total'] ) { | ||||
| 			$result .= $pagination_spacing.generate_pagination_link($curr_page+1, generate_pagination_image("nextpage")); | ||||
| 		} | ||||
| 		$result.="</div>"; | ||||
| 	} | ||||
| 	return $result; | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,50 +1,50 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/chat.php'); | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| $mail = getparam('email'); | ||||
| $page['email'] = $mail; | ||||
| 
 | ||||
| // TODO check email
 | ||||
| 
 | ||||
| $history = ""; | ||||
| $lastid = -1; | ||||
| $output = get_messages( $threadid,"text",true,$lastid ); | ||||
| foreach( $output as $msg ) { | ||||
| 	$history .= $msg; | ||||
| } | ||||
| 
 | ||||
| $subject = getstring("mail.user.history.subject"); | ||||
| $body = getstring2("mail.user.history.body", array($thread['userName'],$history) );  | ||||
| 
 | ||||
| $headers = 'From: '.$webim_from_email."\r\n" . | ||||
|    'Reply-To: '.$webim_from_email."\r\n" . | ||||
|    'X-Mailer: PHP/'.phpversion(); | ||||
| 
 | ||||
| mail($mail,$subject,wordwrap($body,70),$headers); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('view/chat_mailsent.php'); | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/chat.php'); | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| $mail = getparam('email'); | ||||
| $page['email'] = $mail; | ||||
| 
 | ||||
| // TODO check email
 | ||||
| 
 | ||||
| $history = ""; | ||||
| $lastid = -1; | ||||
| $output = get_messages( $threadid,"text",true,$lastid ); | ||||
| foreach( $output as $msg ) { | ||||
| 	$history .= $msg; | ||||
| } | ||||
| 
 | ||||
| $subject = getstring("mail.user.history.subject"); | ||||
| $body = getstring2("mail.user.history.body", array($thread['userName'],$history) );  | ||||
| 
 | ||||
| $headers = 'From: '.$webim_from_email."\r\n" . | ||||
|    'Reply-To: '.$webim_from_email."\r\n" . | ||||
|    'X-Mailer: PHP/'.phpversion(); | ||||
| 
 | ||||
| mail($mail,$subject,wordwrap($body,70),$headers); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('view/chat_mailsent.php'); | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,56 +1,56 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/chat.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||
| 
 | ||||
| if( !isset($_GET['token']) ) { | ||||
| 
 | ||||
| 	if( get_remote_level($_SERVER['HTTP_USER_AGENT']) != "ajaxed" ) { | ||||
| 		die("old browser is used, please update it"); | ||||
| 	} | ||||
| 
 | ||||
| 	$thread = thread_by_id($threadid); | ||||
| 	if( !$thread || !isset($thread['ltoken']) ) { | ||||
| 		die("wrong thread"); | ||||
| 	} | ||||
| 
 | ||||
| 	 | ||||
| 	take_thread($thread,$operator); | ||||
| 
 | ||||
| 	$token = $thread['ltoken']; | ||||
| 	header("Location: ".$_SERVER['PHP_SELF']."?thread=$threadid&token=$token"); | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| setup_chatview_for_operator($thread, $operator); | ||||
| 
 | ||||
| start_html_output(); | ||||
| 
 | ||||
| 
 | ||||
| 	require('../view/chat_ajaxed.php'); | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/chat.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||
| 
 | ||||
| if( !isset($_GET['token']) ) { | ||||
| 
 | ||||
| 	if( get_remote_level($_SERVER['HTTP_USER_AGENT']) != "ajaxed" ) { | ||||
| 		die("old browser is used, please update it"); | ||||
| 	} | ||||
| 
 | ||||
| 	$thread = thread_by_id($threadid); | ||||
| 	if( !$thread || !isset($thread['ltoken']) ) { | ||||
| 		die("wrong thread"); | ||||
| 	} | ||||
| 
 | ||||
| 	 | ||||
| 	take_thread($thread,$operator); | ||||
| 
 | ||||
| 	$token = $thread['ltoken']; | ||||
| 	header("Location: ".$_SERVER['PHP_SELF']."?thread=$threadid&token=$token"); | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| setup_chatview_for_operator($thread, $operator); | ||||
| 
 | ||||
| start_html_output(); | ||||
| 
 | ||||
| 
 | ||||
| 	require('../view/chat_ajaxed.php'); | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,65 +1,65 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| // collect available images and locales
 | ||||
| $imageLocales = array(); | ||||
| $imagesDir = '../images/webim'; | ||||
| if($handle = opendir($imagesDir)) { | ||||
| 	while (false !== ($file = readdir($handle))) { | ||||
| 		if (preg_match("/^(\w+)_([\w-]+)_on.gif$/", $file, $matches)  | ||||
| 				&& is_file("$imagesDir/".$matches[1]."_".$matches[2]."_off.gif")) { | ||||
| 			$image = $matches[1]; | ||||
| 			if( !isset($imageLocales[$image]) ) { | ||||
| 				$imageLocales[$image] = array(); | ||||
| 			} | ||||
| 			$imageLocales[$image][] = $matches[2]; | ||||
| 		} | ||||
| 	} | ||||
| 	closedir($handle); | ||||
| } | ||||
| 
 | ||||
| $image = verifyparam("image","/^\w+$/", "webim"); | ||||
| $image_locales = $imageLocales[$image]; | ||||
| 
 | ||||
| $showhost = verifyparam("hostname","/^on$/", "") == "on"; | ||||
| $forcesecure = verifyparam("secure","/^on$/", "") == "on"; | ||||
| 
 | ||||
| $lang = verifyparam("lang", "/^\w\w$/", ""); | ||||
| if( !$lang || !in_array($lang,$image_locales) ) | ||||
| 	$lang = in_array($current_locale,$image_locales) ? $current_locale : $image_locales[0]; | ||||
| 
 | ||||
| $file = "../images/webim/${image}_${lang}_on.gif"; | ||||
| $size = get_gifimage_size($file); | ||||
| 
 | ||||
| $message = get_image(get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang",$size[0],$size[1]); | ||||
| 
 | ||||
| $page = array(); | ||||
| $page['operator'] = get_operator_name($operator); | ||||
| $page['buttonCode'] = generate_button("",$lang,$message,$showhost,$forcesecure); | ||||
| $page['availableImages'] = array_keys($imageLocales); | ||||
| $page['availableLocales'] = $image_locales; | ||||
| 
 | ||||
| $page['formimage'] = $image; | ||||
| $page['formlang'] = $lang; | ||||
| $page['formhostname'] = $showhost; | ||||
| $page['formsecure'] = $forcesecure; | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/gen_button.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| // collect available images and locales
 | ||||
| $imageLocales = array(); | ||||
| $imagesDir = '../images/webim'; | ||||
| if($handle = opendir($imagesDir)) { | ||||
| 	while (false !== ($file = readdir($handle))) { | ||||
| 		if (preg_match("/^(\w+)_([\w-]+)_on.gif$/", $file, $matches)  | ||||
| 				&& is_file("$imagesDir/".$matches[1]."_".$matches[2]."_off.gif")) { | ||||
| 			$image = $matches[1]; | ||||
| 			if( !isset($imageLocales[$image]) ) { | ||||
| 				$imageLocales[$image] = array(); | ||||
| 			} | ||||
| 			$imageLocales[$image][] = $matches[2]; | ||||
| 		} | ||||
| 	} | ||||
| 	closedir($handle); | ||||
| } | ||||
| 
 | ||||
| $image = verifyparam("image","/^\w+$/", "webim"); | ||||
| $image_locales = $imageLocales[$image]; | ||||
| 
 | ||||
| $showhost = verifyparam("hostname","/^on$/", "") == "on"; | ||||
| $forcesecure = verifyparam("secure","/^on$/", "") == "on"; | ||||
| 
 | ||||
| $lang = verifyparam("lang", "/^\w\w$/", ""); | ||||
| if( !$lang || !in_array($lang,$image_locales) ) | ||||
| 	$lang = in_array($current_locale,$image_locales) ? $current_locale : $image_locales[0]; | ||||
| 
 | ||||
| $file = "../images/webim/${image}_${lang}_on.gif"; | ||||
| $size = get_gifimage_size($file); | ||||
| 
 | ||||
| $message = get_image(get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang",$size[0],$size[1]); | ||||
| 
 | ||||
| $page = array(); | ||||
| $page['operator'] = get_operator_name($operator); | ||||
| $page['buttonCode'] = generate_button("",$lang,$message,$showhost,$forcesecure); | ||||
| $page['availableImages'] = array_keys($imageLocales); | ||||
| $page['availableLocales'] = $image_locales; | ||||
| 
 | ||||
| $page['formimage'] = $image; | ||||
| $page['formlang'] = $lang; | ||||
| $page['formhostname'] = $showhost; | ||||
| $page['formsecure'] = $forcesecure; | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/gen_button.php'); | ||||
| ?>
 | ||||
| @ -1,55 +1,55 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Pavel Petroshenko - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| require('../libs/chat.php'); | ||||
| require('../libs/pagination.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array( 'operator' => get_operator_name($operator) ); | ||||
| $query = isset($_GET['q']) ? $_GET['q'] : false; | ||||
| 
 | ||||
| if($query !== false) { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$result = mysql_query( | ||||
| 		 "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".  | ||||
|     	 "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". | ||||
| 		 "chatthread.remote, chatthread.agentName, chatthread.userName ". | ||||
| 		 "from chatthread, chatmessage ". | ||||
| 		 "where chatmessage.threadid = chatthread.threadid and ". | ||||
| 			"((chatthread.userName LIKE '%%$query%%') or ". | ||||
| 			" (chatmessage.tmessage LIKE '%%$query%%'))". | ||||
| 		 "order by created DESC", $link)  | ||||
| 							or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	$foundThreads = array(); | ||||
| 	while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$foundThreads[] = $thread; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	$page['formq'] = $query; | ||||
| 	setup_pagination($foundThreads); | ||||
| } else { | ||||
| 	setup_empty_pagination(); | ||||
| } | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/thread_search.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Pavel Petroshenko - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| require('../libs/chat.php'); | ||||
| require('../libs/pagination.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array( 'operator' => get_operator_name($operator) ); | ||||
| $query = isset($_GET['q']) ? $_GET['q'] : false; | ||||
| 
 | ||||
| if($query !== false) { | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$result = mysql_query( | ||||
| 		 "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".  | ||||
|     	 "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". | ||||
| 		 "chatthread.remote, chatthread.agentName, chatthread.userName ". | ||||
| 		 "from chatthread, chatmessage ". | ||||
| 		 "where chatmessage.threadid = chatthread.threadid and ". | ||||
| 			"((chatthread.userName LIKE '%%$query%%') or ". | ||||
| 			" (chatmessage.tmessage LIKE '%%$query%%'))". | ||||
| 		 "order by created DESC", $link)  | ||||
| 							or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	$foundThreads = array(); | ||||
| 	while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$foundThreads[] = $thread; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	$page['formq'] = $query; | ||||
| 	setup_pagination($foundThreads); | ||||
| } else { | ||||
| 	setup_empty_pagination(); | ||||
| } | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/thread_search.php'); | ||||
| ?>
 | ||||
| @ -1,39 +1,39 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array(  | ||||
| 	'operator' => get_operator_name($operator), | ||||
| 	'version' => 'v1.0.7' | ||||
| ); | ||||
| 
 | ||||
| $localeLinks = ""; | ||||
| foreach($available_locales as $k) { | ||||
| 	if( strlen($localeLinks) > 0 ) | ||||
| 		$localeLinks .= " • "; | ||||
| 	if( $k == $current_locale ) | ||||
| 		$localeLinks .= $k; | ||||
| 	else | ||||
| 		$localeLinks .= "<a href=\"/webim/operator/index.php?locale=$k\">$k</a>";
 | ||||
| } | ||||
| 
 | ||||
| $page['localeLinks'] = $localeLinks; | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/menu.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array(  | ||||
| 	'operator' => get_operator_name($operator), | ||||
| 	'version' => 'v1.0.7' | ||||
| ); | ||||
| 
 | ||||
| $localeLinks = ""; | ||||
| foreach($available_locales as $k) { | ||||
| 	if( strlen($localeLinks) > 0 ) | ||||
| 		$localeLinks .= " • "; | ||||
| 	if( $k == $current_locale ) | ||||
| 		$localeLinks .= $k; | ||||
| 	else | ||||
| 		$localeLinks .= "<a href=\"/webim/operator/index.php?locale=$k\">$k</a>";
 | ||||
| } | ||||
| 
 | ||||
| $page['localeLinks'] = $localeLinks; | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/menu.php'); | ||||
| ?>
 | ||||
| @ -1,42 +1,42 @@ | ||||
| <?php          | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $errors = array(); | ||||
| if( isset($_POST['login']) && isset($_POST['password']) ) { | ||||
| 	$login = getparam('login'); | ||||
| 	$password = getparam('password'); | ||||
| 	$remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on"; | ||||
| 
 | ||||
| 	$operator = operator_by_login( $login ); | ||||
| 	if( $operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) ) { | ||||
| 
 | ||||
| 		$target = isset($_SESSION['backpath'])  | ||||
| 				? $_SESSION['backpath']  | ||||
| 				: dirname($_SERVER['PHP_SELF'])."/index.php"; | ||||
| 		 | ||||
|         login_operator($operator,$remember); | ||||
| 		header("Location: $target"); | ||||
| 		exit; | ||||
| 	} else { | ||||
| 		$errors[] = getstring("page_login.error"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| $page = array( 'backPath' => '', 'formisRemember' => true ); | ||||
| start_html_output(); | ||||
| require('../view/login.php'); | ||||
| <?php          | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $errors = array(); | ||||
| if( isset($_POST['login']) && isset($_POST['password']) ) { | ||||
| 	$login = getparam('login'); | ||||
| 	$password = getparam('password'); | ||||
| 	$remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on"; | ||||
| 
 | ||||
| 	$operator = operator_by_login( $login ); | ||||
| 	if( $operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) ) { | ||||
| 
 | ||||
| 		$target = isset($_SESSION['backpath'])  | ||||
| 				? $_SESSION['backpath']  | ||||
| 				: dirname($_SERVER['PHP_SELF'])."/index.php"; | ||||
| 		 | ||||
|         login_operator($operator,$remember); | ||||
| 		header("Location: $target"); | ||||
| 		exit; | ||||
| 	} else { | ||||
| 		$errors[] = getstring("page_login.error"); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| $page = array( 'backPath' => '', 'formisRemember' => true ); | ||||
| start_html_output(); | ||||
| require('../view/login.php'); | ||||
| ?>
 | ||||
| @ -1,24 +1,24 @@ | ||||
| <?php          | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| logout_operator(); | ||||
| 
 | ||||
| $target = dirname($_SERVER['PHP_SELF'])."/login.php"; | ||||
| header("Location: $target"); | ||||
| exit; | ||||
| 
 | ||||
| <?php          | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| logout_operator(); | ||||
| 
 | ||||
| $target = dirname($_SERVER['PHP_SELF'])."/login.php"; | ||||
| header("Location: $target"); | ||||
| exit; | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,85 +1,85 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array('agentId' => ''); | ||||
| $errors = array(); | ||||
| 
 | ||||
| if( isset($_POST['login']) && isset($_POST['password']) ) { | ||||
| 	$agentId = verifyparam( "agentId", "/^(\d{1,9})?$/", ""); | ||||
| 	$login = getparam('login'); | ||||
| 	$password = getparam('password'); | ||||
| 	$passwordConfirm = getparam('passwordConfirm'); | ||||
| 	$name = getparam('name'); | ||||
| 	$commonname = getparam('commonname'); | ||||
| 
 | ||||
| 	if( !$name ) | ||||
| 		$errors[] = no_field("form.field.agent_name"); | ||||
| 
 | ||||
| 	if( !$commonname ) | ||||
| 		$errors[] = no_field("form.field.agent_commonname"); | ||||
| 
 | ||||
| 	if( !$login ) | ||||
| 		$errors[] = no_field("form.field.login"); | ||||
| 
 | ||||
| 	if( !$agentId && !$password ) | ||||
| 		$errors[] = no_field("form.field.password"); | ||||
| 
 | ||||
| 	if( $password != $passwordConfirm ) | ||||
| 		$errors[] = getstring("my_settings.error.password_match"); | ||||
| 
 | ||||
| 	$login_operator = operator_by_login($login); | ||||
| 	if( (!$agentId && $login_operator) ||  | ||||
| 		( $agentId && $login_operator && $agentId != $login_operator['operatorid']) ) | ||||
| 		$errors[] = getstring("page_agent.error.duplicate_login"); | ||||
| 
 | ||||
| 	if( count($errors) == 0 ) { | ||||
| 		if( $agentId ) { | ||||
| 			update_operator($agentId,$login,$password,$name,$commonname); | ||||
| 		} else { | ||||
| 			create_operator($login,$password,$name,$commonname); | ||||
| 		} | ||||
| 		header("Location: ".dirname($_SERVER['PHP_SELF'])."/operators.php"); | ||||
| 		exit; | ||||
| 	} else { | ||||
| 		$page['formlogin'] = $login; | ||||
| 		$page['formname'] = $name; | ||||
| 		$page['formcommonname'] = $commonname; | ||||
| 		$page['agentId'] = $agentId; | ||||
| 	} | ||||
| 
 | ||||
| } else if( isset($_GET['op']) ) { | ||||
| 	$login = verifyparam( 'op', "/^[\w_]+$/"); | ||||
| 	$op = operator_by_login( $login ); | ||||
| 
 | ||||
| 	if( !$op ) { | ||||
| 		$errors[] = getstring("no_such_operator"); | ||||
| 		$page['formlogin'] = $login; | ||||
| 	} else { | ||||
| 		$page['formlogin'] = $op['vclogin']; | ||||
| 		$page['formname'] = $op['vclocalename']; | ||||
| 		$page['formcommonname'] = $op['vccommonname']; | ||||
| 		$page['agentId'] = $op['operatorid']; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| $page['operator'] = get_operator_name($operator); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/agent.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array('agentId' => ''); | ||||
| $errors = array(); | ||||
| 
 | ||||
| if( isset($_POST['login']) && isset($_POST['password']) ) { | ||||
| 	$agentId = verifyparam( "agentId", "/^(\d{1,9})?$/", ""); | ||||
| 	$login = getparam('login'); | ||||
| 	$password = getparam('password'); | ||||
| 	$passwordConfirm = getparam('passwordConfirm'); | ||||
| 	$name = getparam('name'); | ||||
| 	$commonname = getparam('commonname'); | ||||
| 
 | ||||
| 	if( !$name ) | ||||
| 		$errors[] = no_field("form.field.agent_name"); | ||||
| 
 | ||||
| 	if( !$commonname ) | ||||
| 		$errors[] = no_field("form.field.agent_commonname"); | ||||
| 
 | ||||
| 	if( !$login ) | ||||
| 		$errors[] = no_field("form.field.login"); | ||||
| 
 | ||||
| 	if( !$agentId && !$password ) | ||||
| 		$errors[] = no_field("form.field.password"); | ||||
| 
 | ||||
| 	if( $password != $passwordConfirm ) | ||||
| 		$errors[] = getstring("my_settings.error.password_match"); | ||||
| 
 | ||||
| 	$login_operator = operator_by_login($login); | ||||
| 	if( (!$agentId && $login_operator) ||  | ||||
| 		( $agentId && $login_operator && $agentId != $login_operator['operatorid']) ) | ||||
| 		$errors[] = getstring("page_agent.error.duplicate_login"); | ||||
| 
 | ||||
| 	if( count($errors) == 0 ) { | ||||
| 		if( $agentId ) { | ||||
| 			update_operator($agentId,$login,$password,$name,$commonname); | ||||
| 		} else { | ||||
| 			create_operator($login,$password,$name,$commonname); | ||||
| 		} | ||||
| 		header("Location: ".dirname($_SERVER['PHP_SELF'])."/operators.php"); | ||||
| 		exit; | ||||
| 	} else { | ||||
| 		$page['formlogin'] = $login; | ||||
| 		$page['formname'] = $name; | ||||
| 		$page['formcommonname'] = $commonname; | ||||
| 		$page['agentId'] = $agentId; | ||||
| 	} | ||||
| 
 | ||||
| } else if( isset($_GET['op']) ) { | ||||
| 	$login = verifyparam( 'op', "/^[\w_]+$/"); | ||||
| 	$op = operator_by_login( $login ); | ||||
| 
 | ||||
| 	if( !$op ) { | ||||
| 		$errors[] = getstring("no_such_operator"); | ||||
| 		$page['formlogin'] = $login; | ||||
| 	} else { | ||||
| 		$page['formlogin'] = $op['vclogin']; | ||||
| 		$page['formname'] = $op['vclocalename']; | ||||
| 		$page['formcommonname'] = $op['vccommonname']; | ||||
| 		$page['agentId'] = $op['operatorid']; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| $page['operator'] = get_operator_name($operator); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/agent.php'); | ||||
| ?>
 | ||||
| @ -1,26 +1,26 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array(); | ||||
| $page['allowedAgents'] = get_operators(); | ||||
| $page['operator'] = get_operator_name($operator); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/agents.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array(); | ||||
| $page['allowedAgents'] = get_operators(); | ||||
| $page['operator'] = get_operator_name($operator); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/agents.php'); | ||||
| ?>
 | ||||
| @ -1,32 +1,32 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| require('../libs/chat.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array( 'operator' => get_operator_name($operator) ); | ||||
| 
 | ||||
| 
 | ||||
| if( isset($_GET['threadid'])) { | ||||
|         $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); | ||||
| 	$lastid = -1; | ||||
| 	$page['threadMessages'] = get_messages($threadid,"html",false,$lastid); | ||||
| } | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/thread_log.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| require('../libs/chat.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| $page = array( 'operator' => get_operator_name($operator) ); | ||||
| 
 | ||||
| 
 | ||||
| if( isset($_GET['threadid'])) { | ||||
|         $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); | ||||
| 	$lastid = -1; | ||||
| 	$page['threadMessages'] = get_messages($threadid,"html",false,$lastid); | ||||
| } | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/thread_log.php'); | ||||
| ?>
 | ||||
| @ -1,98 +1,98 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/chat.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = get_logged_in(); | ||||
| if( !$operator ) { | ||||
| 	start_xml_output(); | ||||
| 	echo "<error><descr>".myiconv($webim_encoding,"utf-8",escape_with_cdata(getstring("agent.not_logged_in")))."</descr></error>"; | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $threadstate_to_string = array( | ||||
| 	$state_queue => "wait", | ||||
| 	$state_waiting => "prio", | ||||
| 	$state_chatting => "chat", | ||||
| 	$state_closed => "closed" | ||||
| ); | ||||
| 
 | ||||
| $threadstate_key = array( | ||||
| 	$state_queue => "chat.thread.state_wait", | ||||
| 	$state_waiting => "chat.thread.state_wait_for_another_agent", | ||||
| 	$state_chatting => "chat.thread.state_chatting_with_agent", | ||||
| 	$state_closed => "chat.thread.state_closed" | ||||
| ); | ||||
| 
 | ||||
| function thread_to_xml($thread) { | ||||
| 	global $threadstate_to_string, $threadstate_key; | ||||
| 	$state = $threadstate_to_string[$thread['istate']]; | ||||
| 	$result = "<thread id=\"".$thread['threadid']."\" stateid=\"$state\"";
 | ||||
| 	if( $state == "closed" ) | ||||
| 		return $result."/>"; | ||||
| 
 | ||||
| 	$state = getstring($threadstate_key[$thread['istate']]); | ||||
| 	$threadoperator = ($thread['agentName'] ? $thread['agentName'] : "-"); | ||||
| 
 | ||||
| 	$result .= " canopen=\"true\""; | ||||
| 	$result .= " state=\"$state\">";
 | ||||
| 	$result .= "<name>".htmlspecialchars(htmlspecialchars(get_user_name($thread['userName'])))."</name>"; | ||||
| 	$result .= "<addr>".htmlspecialchars(htmlspecialchars($thread['remote']))."</addr>"; | ||||
| 	$result .= "<agent>".htmlspecialchars(htmlspecialchars($threadoperator))."</agent>"; | ||||
| 	$result .= "<time>".$thread['unix_timestamp(dtmcreated)']."000</time>"; | ||||
| 	$result .= "<modified>".$thread['unix_timestamp(dtmmodified)']."000</modified>"; | ||||
| 	$result .= "</thread>"; | ||||
| 	return $result; | ||||
| } | ||||
| 
 | ||||
| function print_pending_threads($since) { | ||||
| 	global $webim_encoding; | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$revision = $since; | ||||
| 	$output = array(); | ||||
| 	$query = "select threadid, userName, agentName, unix_timestamp(dtmcreated), ". | ||||
| 			 "unix_timestamp(dtmmodified), lrevision, istate, remote ". | ||||
| 			 "from chatthread where lrevision > $since ORDER BY threadid"; | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$thread = thread_to_xml($row); | ||||
| 		$output[] = $thread; | ||||
| 		if( $row['lrevision'] > $revision ) | ||||
| 			$revision = $row['lrevision']; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	start_xml_output(); | ||||
| 	echo "<threads revision=\"$revision\" time=\"".time()."000\">"; | ||||
| 	foreach( $output as $thr ) { | ||||
| 		print myiconv($webim_encoding,"utf-8",$thr); | ||||
| 	} | ||||
| 	echo "</threads>"; | ||||
| } | ||||
| 
 | ||||
| ////////
 | ||||
| 
 | ||||
| $since = verifyparam( "since", "/^\d{1,9}$/", 0); | ||||
| 
 | ||||
| print_pending_threads($since); | ||||
| notify_operator_alive($operator['operatorid']); | ||||
| exit; | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/chat.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = get_logged_in(); | ||||
| if( !$operator ) { | ||||
| 	start_xml_output(); | ||||
| 	echo "<error><descr>".myiconv($webim_encoding,"utf-8",escape_with_cdata(getstring("agent.not_logged_in")))."</descr></error>"; | ||||
| 	exit; | ||||
| } | ||||
| 
 | ||||
| $threadstate_to_string = array( | ||||
| 	$state_queue => "wait", | ||||
| 	$state_waiting => "prio", | ||||
| 	$state_chatting => "chat", | ||||
| 	$state_closed => "closed" | ||||
| ); | ||||
| 
 | ||||
| $threadstate_key = array( | ||||
| 	$state_queue => "chat.thread.state_wait", | ||||
| 	$state_waiting => "chat.thread.state_wait_for_another_agent", | ||||
| 	$state_chatting => "chat.thread.state_chatting_with_agent", | ||||
| 	$state_closed => "chat.thread.state_closed" | ||||
| ); | ||||
| 
 | ||||
| function thread_to_xml($thread) { | ||||
| 	global $threadstate_to_string, $threadstate_key; | ||||
| 	$state = $threadstate_to_string[$thread['istate']]; | ||||
| 	$result = "<thread id=\"".$thread['threadid']."\" stateid=\"$state\"";
 | ||||
| 	if( $state == "closed" ) | ||||
| 		return $result."/>"; | ||||
| 
 | ||||
| 	$state = getstring($threadstate_key[$thread['istate']]); | ||||
| 	$threadoperator = ($thread['agentName'] ? $thread['agentName'] : "-"); | ||||
| 
 | ||||
| 	$result .= " canopen=\"true\""; | ||||
| 	$result .= " state=\"$state\">";
 | ||||
| 	$result .= "<name>".htmlspecialchars(htmlspecialchars(get_user_name($thread['userName'])))."</name>"; | ||||
| 	$result .= "<addr>".htmlspecialchars(htmlspecialchars($thread['remote']))."</addr>"; | ||||
| 	$result .= "<agent>".htmlspecialchars(htmlspecialchars($threadoperator))."</agent>"; | ||||
| 	$result .= "<time>".$thread['unix_timestamp(dtmcreated)']."000</time>"; | ||||
| 	$result .= "<modified>".$thread['unix_timestamp(dtmmodified)']."000</modified>"; | ||||
| 	$result .= "</thread>"; | ||||
| 	return $result; | ||||
| } | ||||
| 
 | ||||
| function print_pending_threads($since) { | ||||
| 	global $webim_encoding; | ||||
| 	$link = connect(); | ||||
| 
 | ||||
| 	$revision = $since; | ||||
| 	$output = array(); | ||||
| 	$query = "select threadid, userName, agentName, unix_timestamp(dtmcreated), ". | ||||
| 			 "unix_timestamp(dtmmodified), lrevision, istate, remote ". | ||||
| 			 "from chatthread where lrevision > $since ORDER BY threadid"; | ||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||
| 
 | ||||
| 	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||
| 		$thread = thread_to_xml($row); | ||||
| 		$output[] = $thread; | ||||
| 		if( $row['lrevision'] > $revision ) | ||||
| 			$revision = $row['lrevision']; | ||||
| 	} | ||||
| 
 | ||||
| 	mysql_free_result($result); | ||||
| 	mysql_close($link); | ||||
| 
 | ||||
| 	start_xml_output(); | ||||
| 	echo "<threads revision=\"$revision\" time=\"".time()."000\">"; | ||||
| 	foreach( $output as $thr ) { | ||||
| 		print myiconv($webim_encoding,"utf-8",$thr); | ||||
| 	} | ||||
| 	echo "</threads>"; | ||||
| } | ||||
| 
 | ||||
| ////////
 | ||||
| 
 | ||||
| $since = verifyparam( "since", "/^\d{1,9}$/", 0); | ||||
| 
 | ||||
| print_pending_threads($since); | ||||
| notify_operator_alive($operator['operatorid']); | ||||
| exit; | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,26 +1,26 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| notify_operator_alive($operator['operatorid']); | ||||
| 
 | ||||
| $page = array( 'operator' => get_operator_name($operator) ); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/pending_users.php'); | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('../libs/common.php'); | ||||
| require('../libs/operator.php'); | ||||
| 
 | ||||
| $operator = check_login(); | ||||
| 
 | ||||
| notify_operator_alive($operator['operatorid']); | ||||
| 
 | ||||
| $page = array( 'operator' => get_operator_name($operator) ); | ||||
| 
 | ||||
| start_html_output(); | ||||
| require('../view/pending_users.php'); | ||||
| ?>
 | ||||
| @ -1,87 +1,87 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/chat.php'); | ||||
| require('libs/operator.php'); | ||||
| 
 | ||||
| $act = verifyparam( "act", "/^(refresh|post|rename|close|ping)$/"); | ||||
| $token = verifyparam( "token", "/^\d{1,9}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,9}$/"); | ||||
| $isuser = verifyparam( "user", "/^true$/", "false") == 'true'; | ||||
| $outformat = (verifyparam( "html", "/^on$/", "off") == 'on') ? "html" : "xml"; | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| # This code helps in simulation of operator connection problems
 | ||||
| # if( !$isuser )     die("error");
 | ||||
| 
 | ||||
| ping_thread($thread, $isuser); | ||||
| 
 | ||||
| if( !$isuser && $act != "rename" ) { | ||||
| 	$operator = check_login(); | ||||
| 	check_for_reassign($thread,$operator); | ||||
| } | ||||
| 
 | ||||
| if( $act == "refresh" ) { | ||||
| 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | ||||
| 	print_thread_mesages($threadid, $token, $lastid, $isuser,$outformat); | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "post" ) { | ||||
| 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | ||||
| 	$message = getrawparam('message'); | ||||
| 
 | ||||
| 	$kind = $isuser ? $kind_user : $kind_agent; | ||||
| 	$from = $isuser ? $thread['userName'] : $thread['agentName']; | ||||
| 
 | ||||
| 	post_message($threadid,$kind,$message,$from); | ||||
| 	print_thread_mesages($threadid, $token, $lastid, $isuser, $outformat); | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "rename" ) { | ||||
| 
 | ||||
| 	if( !$user_can_change_name ) { | ||||
| 		start_xml_output(); | ||||
| 		echo "<error></error>"; | ||||
| 		exit; | ||||
| 	} | ||||
| 
 | ||||
| 	$newname = getrawparam('name'); | ||||
| 
 | ||||
| 	rename_user($thread, $newname); | ||||
| 	setcookie($namecookie, $newname, time()+60*60*24*365);  | ||||
| 	start_xml_output(); | ||||
| 	echo "<changedname></changedname>"; | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "ping" ) { | ||||
| 
 | ||||
| 	start_xml_output(); | ||||
| 	echo "<ping></ping>"; | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "close" ) { | ||||
| 
 | ||||
| 	close_thread($thread, $isuser); | ||||
| 	start_xml_output(); | ||||
| 	echo "<closed></closed>"; | ||||
| 	exit; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| 
 | ||||
| require('libs/common.php'); | ||||
| require('libs/chat.php'); | ||||
| require('libs/operator.php'); | ||||
| 
 | ||||
| $act = verifyparam( "act", "/^(refresh|post|rename|close|ping)$/"); | ||||
| $token = verifyparam( "token", "/^\d{1,9}$/"); | ||||
| $threadid = verifyparam( "thread", "/^\d{1,9}$/"); | ||||
| $isuser = verifyparam( "user", "/^true$/", "false") == 'true'; | ||||
| $outformat = (verifyparam( "html", "/^on$/", "off") == 'on') ? "html" : "xml"; | ||||
| 
 | ||||
| $thread = thread_by_id($threadid); | ||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||
| 	die("wrong thread"); | ||||
| } | ||||
| 
 | ||||
| # This code helps in simulation of operator connection problems
 | ||||
| # if( !$isuser )     die("error");
 | ||||
| 
 | ||||
| ping_thread($thread, $isuser); | ||||
| 
 | ||||
| if( !$isuser && $act != "rename" ) { | ||||
| 	$operator = check_login(); | ||||
| 	check_for_reassign($thread,$operator); | ||||
| } | ||||
| 
 | ||||
| if( $act == "refresh" ) { | ||||
| 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | ||||
| 	print_thread_mesages($threadid, $token, $lastid, $isuser,$outformat); | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "post" ) { | ||||
| 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | ||||
| 	$message = getrawparam('message'); | ||||
| 
 | ||||
| 	$kind = $isuser ? $kind_user : $kind_agent; | ||||
| 	$from = $isuser ? $thread['userName'] : $thread['agentName']; | ||||
| 
 | ||||
| 	post_message($threadid,$kind,$message,$from, $isuser ? null : $operator['operatorid'] ); | ||||
| 	print_thread_mesages($threadid, $token, $lastid, $isuser, $outformat); | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "rename" ) { | ||||
| 
 | ||||
| 	if( !$user_can_change_name ) { | ||||
| 		start_xml_output(); | ||||
| 		echo "<error></error>"; | ||||
| 		exit; | ||||
| 	} | ||||
| 
 | ||||
| 	$newname = getrawparam('name'); | ||||
| 
 | ||||
| 	rename_user($thread, $newname); | ||||
| 	setcookie($namecookie, $newname, time()+60*60*24*365);  | ||||
| 	start_xml_output(); | ||||
| 	echo "<changedname></changedname>"; | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "ping" ) { | ||||
| 
 | ||||
| 	start_xml_output(); | ||||
| 	echo "<ping></ping>"; | ||||
| 	exit; | ||||
| 
 | ||||
| } else if( $act == "close" ) { | ||||
| 
 | ||||
| 	close_thread($thread, $isuser); | ||||
| 	start_xml_output(); | ||||
| 	echo "<closed></closed>"; | ||||
| 	exit; | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| @ -1,144 +1,129 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_agent.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page_agent.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/operators.php" title="<?php echo getstring("menu.agents") ?>"><?php echo getstring("menu.agents") ?></a></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php if( $page['agentId'] ) { ?>
 | ||||
| <?php echo getstring("page_agent.intro") ?>
 | ||||
| <?php } ?>
 | ||||
| <?php if( !$page['agentId'] ) { ?>
 | ||||
| <?php echo getstring("page_agent.create_new") ?>
 | ||||
| <?php } ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | ||||
| 	    <td width="10"></td> | ||||
| 	    <td class="text"> | ||||
| 		    <?php	if( isset($errors) && count($errors) > 0 ) { | ||||
| 		print getstring("errors.header"); | ||||
| 		foreach( $errors as $e ) { | ||||
| 			print getstring("errors.prefix"); | ||||
| 			print $e; | ||||
| 			print getstring("errors.suffix"); | ||||
| 		} | ||||
| 		print getstring("errors.footer"); | ||||
| 	} ?>
 | ||||
| 
 | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	<?php } ?>
 | ||||
| 
 | ||||
| <form name="agentForm" method="post" action="/webim/operator/operator.php"> | ||||
| 	<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.login') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="text" name="login" size="40" value="<?php echo form_value('login') ?>" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.login.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.password') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="password" name="password" size="40" value="" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.password.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.password_confirm') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="password" name="passwordConfirm" size="40" value="" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.password_confirm.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.agent_name') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="text" name="name" size="40" value="<?php echo form_value('name') ?>" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.agent_name.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.agent_commonname') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="text" name="commonname" size="40" value="<?php echo form_value('commonname') ?>" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.agent_commonname.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td colspan='3' height='20'></td></tr><tr><td colspan='3' background='/webim/images/formline.gif'><img src='/webim/images/formline.gif' width='1' height='2' border='0' alt=''></td></tr><tr><td colspan='3' height='10'></td></tr> | ||||
| 		<tr> | ||||
| 			<td class="formauth"><input type="hidden" name="agentId" value="<?php echo $page['agentId'] ?>"/>  | ||||
| 			        <input type="image" name="" src='<?php echo getstring("image.button.save") ?>' border="0" alt='<?php echo getstring("button.save") ?>'/> | ||||
| 			</td> | ||||
| 			<td></td> | ||||
| 			<td></td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 	</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <table cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
| 		<td colspan="2" height="10"></td> | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td width="30"></td> | ||||
| 		<td class="formauth"><span class="formdescr"><?php echo getstring("common.asterisk_explanation") ?></span></td>
 | ||||
| 	</tr> | ||||
| </table> | ||||
| 
 | ||||
| 
 | ||||
| </form> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_agent.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page_agent.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/operators.php" title="<?php echo getstring("menu.agents") ?>"><?php echo getstring("menu.agents") ?></a></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php if( $page['agentId'] ) { ?>
 | ||||
| <?php echo getstring("page_agent.intro") ?>
 | ||||
| <?php } ?>
 | ||||
| <?php if( !$page['agentId'] ) { ?>
 | ||||
| <?php echo getstring("page_agent.create_new") ?>
 | ||||
| <?php } ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | ||||
| 	    <td width="10"></td> | ||||
| 	    <td class="text"> | ||||
| 		    <?php	if( isset($errors) && count($errors) > 0 ) { | ||||
| 		print getstring("errors.header"); | ||||
| 		foreach( $errors as $e ) { | ||||
| 			print getstring("errors.prefix"); | ||||
| 			print $e; | ||||
| 			print getstring("errors.suffix"); | ||||
| 		} | ||||
| 		print getstring("errors.footer"); | ||||
| 	} ?>
 | ||||
| 
 | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	<?php } ?>
 | ||||
| 
 | ||||
| <form name="agentForm" method="post" action="/webim/operator/operator.php"> | ||||
| 	<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.login') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="text" name="login" size="40" value="<?php echo form_value('login') ?>" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.login.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.password') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="password" name="password" size="40" value="" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.password.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.password_confirm') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="password" name="passwordConfirm" size="40" value="" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.password_confirm.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.agent_name') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="text" name="name" size="40" value="<?php echo form_value('name') ?>" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.agent_name.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td class='formauth'><?php echo getstring('form.field.agent_commonname') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
 | ||||
| 			<input type="text" name="commonname" size="40" value="<?php echo form_value('commonname') ?>" class="formauth"/> | ||||
| 		</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.agent_commonname.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
 | ||||
| 
 | ||||
| 		<tr><td colspan='3' height='20'></td></tr><tr><td colspan='3' background='/webim/images/formline.gif'><img src='/webim/images/formline.gif' width='1' height='2' border='0' alt=''></td></tr><tr><td colspan='3' height='10'></td></tr> | ||||
| 		<tr> | ||||
| 			<td class="formauth"><input type="hidden" name="agentId" value="<?php echo $page['agentId'] ?>"/>  | ||||
| 			        <input type="image" name="" src='<?php echo getstring("image.button.save") ?>' border="0" alt='<?php echo getstring("button.save") ?>'/> | ||||
| 			</td> | ||||
| 			<td></td> | ||||
| 			<td></td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 	</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <table cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
| 		<td colspan="2" height="10"></td> | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td width="30"></td> | ||||
| 		<td class="formauth"><span class="formdescr"><?php echo getstring("common.asterisk_explanation") ?></span></td>
 | ||||
| 	</tr> | ||||
| </table> | ||||
| 
 | ||||
| 
 | ||||
| </form> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,122 +1,115 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_agents.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page_agents.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("page_agents.intro") ?>
 | ||||
| 
 | ||||
| <br><br> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
|    <td class="text"><b><?php echo getstring("page_agents.agents") ?></b></td>
 | ||||
|    <td align="right"> | ||||
| 	<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td><img src='/webim/images/buttons/createagent.gif' border="0" altKey="page_agents.new_agent" /></td> | ||||
|    	<td width="10"></td> | ||||
|     <td class="text"> | ||||
| 		<a href='/webim/operator/operator.php' title="<?php echo getstring("page_agents.new_agent") ?>"> | ||||
| 			<?php echo getstring("page_agents.new_agent") ?>
 | ||||
| 		</a> | ||||
|     </td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| </td> | ||||
| </tr> | ||||
| <tr> | ||||
|    <td colspan="2" height="15"></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.login") ?></span></td><td width='3'></td>
 | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_name") ?></span></td><td width='3'></td>
 | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_commonname") ?></span></td>
 | ||||
| </tr> | ||||
| <?php foreach( $page['allowedAgents'] as $a ) { ?>
 | ||||
| <tr> | ||||
| 	<td height='45' class='table'> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tbliclogin.gif' width="10" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"> | ||||
|     		<a href='/webim/operator/operator.php?op=<?php echo $a['vclogin'] ?>'> | ||||
|     			<?php echo htmlspecialchars($a['vclogin']) ?>
 | ||||
|     		</a> | ||||
|     	</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 	<td height='45' class='table'> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | ||||
|     	<td class="table"><?php echo htmlspecialchars($a['vclocalename']) ?></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 	<td height='45' class='table'> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | ||||
|     	<td class="table"><?php echo htmlspecialchars($a['vccommonname']) ?></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| <tr><td height='2' colspan='7'></td></tr><tr><td bgcolor='#e1e1e1' colspan='7'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='7'></td></tr> | ||||
| <?php } ?>
 | ||||
| </table> | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_agents.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page_agents.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("page_agents.intro") ?>
 | ||||
| 
 | ||||
| <br><br> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
|    <td class="text"><b><?php echo getstring("page_agents.agents") ?></b></td>
 | ||||
|    <td align="right"> | ||||
| 	<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td><img src='/webim/images/buttons/createagent.gif' border="0" altKey="page_agents.new_agent" /></td> | ||||
|    	<td width="10"></td> | ||||
|     <td class="text"> | ||||
| 		<a href='/webim/operator/operator.php' title="<?php echo getstring("page_agents.new_agent") ?>"> | ||||
| 			<?php echo getstring("page_agents.new_agent") ?>
 | ||||
| 		</a> | ||||
|     </td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| </td> | ||||
| </tr> | ||||
| <tr> | ||||
|    <td colspan="2" height="15"></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.login") ?></span></td><td width='3'></td>
 | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_name") ?></span></td><td width='3'></td>
 | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_commonname") ?></span></td>
 | ||||
| </tr> | ||||
| <?php foreach( $page['allowedAgents'] as $a ) { ?>
 | ||||
| <tr> | ||||
| 	<td height='45' class='table'> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tbliclogin.gif' width="10" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"> | ||||
|     		<a href='/webim/operator/operator.php?op=<?php echo $a['vclogin'] ?>'> | ||||
|     			<?php echo htmlspecialchars($a['vclogin']) ?>
 | ||||
|     		</a> | ||||
|     	</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 	<td height='45' class='table'> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | ||||
|     	<td class="table"><?php echo htmlspecialchars($a['vclocalename']) ?></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 	<td height='45' class='table'> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | ||||
|     	<td class="table"><?php echo htmlspecialchars($a['vccommonname']) ?></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| <tr><td height='2' colspan='7'></td></tr><tr><td bgcolor='#e1e1e1' colspan='7'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='7'></td></tr> | ||||
| <?php } ?>
 | ||||
| </table> | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,252 +1,252 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.agent") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/common.js"></script> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | ||||
| <script language="javascript"><!-- | ||||
| var threadParams = { servl:"/webim/thread.php",frequency:2,<?php if( $page['user'] ) { ?>user:"true",<?php } ?>threadid:<?php echo $page['ct.chatThreadId'] ?>,token:<?php echo $page['ct.token'] ?> };
 | ||||
| //--></script>
 | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/page_chat.js"></script> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> | ||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="50%" valign="top"> | ||||
| 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center"><?php if( $page['ct.company.chatLogoURL'] ) { ?><img src="<?php echo $page['ct.company.chatLogoURL'] ?>" width="85" height="45" border="0" alt=""><?php } ?></td>
 | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td height="5"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
|     	<td width="50%" align="right" valign="top"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25" align="right"> | ||||
| 
 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | ||||
| 			    <td width="5"></td> | ||||
| 			    <td> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 					<tr> | ||||
| 				    <td width="95" height="13" bgcolor="#D09221" align="center" class="www"><a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("site.title") ?></a></td>
 | ||||
| 					</tr> | ||||
| 					</table> | ||||
| 				</td> | ||||
| 			    <td width="5"></td> | ||||
| 			    <td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"><img src='/webim/images/buttons/closewin.gif' width="15" height="15" border="0" altKey="chat.window.close_link_text"/></a></td> | ||||
| 			    <td width="5"></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td height="60" align="right"> | ||||
| 				 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| <?php if( $page['agent'] ) { ?>
 | ||||
| 				<td class="text" nowrap> | ||||
| 					<?php echo getstring("chat.window.chatting_with") ?> <b><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.chatting_with") ?> <?php echo htmlspecialchars($page['ct.user.name']) ?><?php echo $page['namePostfix'] ?>"><?php echo htmlspecialchars($page['ct.user.name']) ?></a></b><br>
 | ||||
| 				</td> | ||||
| <?php } ?><?php if( $page['user'] && $page['canChangeName'] ) { ?>
 | ||||
| 				<td class="text" nowrap> | ||||
| 				<div id="changename1" style="display:<?php echo $page['displ1'] ?>;"> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||
| 					<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td> 
 | ||||
| 					<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 					<td><input id="uname" type="text" size="12" value="<?php echo $page['ct.user.name'] ?>" class="username"></td> | ||||
| 					<td width="5" valign="top"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 					<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/exec.gif' width="25" height="25" border="0" alt=">>" /></a></td> | ||||
| 					</tr></table> | ||||
| 				</div> | ||||
| 				<div id="changename2" style="display:<?php echo $page['displ2'] ?>;"> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||
| 					<td class="text" nowrap><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><?php echo getstring("chat.client.changename") ?></a></td>
 | ||||
| 					<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 					<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 					</tr></table> | ||||
| 				</div> | ||||
| 				</td> | ||||
| <?php } ?>
 | ||||
| <?php if( $page['agent'] ) { ?>
 | ||||
| 				<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 				<td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"> | ||||
| 				<img src='/webim/images/buttons/close.gif' width="25" height="25" border="0" altKey="chat.window.close_link_text"/></a></td> | ||||
| <?php } ?>
 | ||||
| <!-- | ||||
| 				<td><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="Change User" /></td> | ||||
|  --> | ||||
| 
 | ||||
| 			    <td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td> | ||||
| <?php if( $page['user'] ) { ?>
 | ||||
| 				<td><a href="<?php echo $page['selfLink'] ?>&act=mailthread" target="_blank" title="<?php echo getstring("chat.window.toolbar.mail_history") ?>" onclick="this.newWindow = window.open('<?php echo $page['selfLink'] ?>&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src='/webim/images/buttons/email.gif' width="25" height="25" border="0" alt="Mail "/></a></td> | ||||
| <?php } ?>
 | ||||
| 
 | ||||
| 				<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>"> | ||||
| 				<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh " /></a></td> | ||||
| 
 | ||||
| 				<td width="20" valign="top"><img src='/webim/images/free.gif' width="20" height="1" border="0" alt="" /></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td valign="top"> | ||||
| 
 | ||||
| 		<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="" /></td> | ||||
|     	<td colspan="2" width="100%" height="100%" valign="top" id="chatwndtd"> | ||||
| 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="100%" height="100%" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<iframe id="chatwnd" width="100%" height="100%" src='/webim/images/free.gif' frameborder="0" style="overflow:auto;"> | ||||
| 				Sorry, your browser does not support iframes; try a browser that supports W3 standards. | ||||
| 				</iframe> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| <?php if( $page['canpost'] ) { ?>
 | ||||
| 		<tr> | ||||
| 	    <td colspan="3" height="5" style="cursor:n-resize;" id="spl1"></td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.message") ?>' width="20" height="85" border="0" alt="" /></td> | ||||
|     	<td width="100%" height="100" valign="top" id="msgwndtd"> | ||||
| 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="100%" height="100%" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<textarea id="msgwnd" class="message" tabindex="0"></textarea> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 	    <td valign="center" id="avatarwnd"></td> | ||||
| 		</tr> | ||||
| <?php } ?>	
 | ||||
| 		</table> | ||||
| 
 | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="45"></td> | ||||
|     <td> | ||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="33%"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td width="20"></td> | ||||
| 
 | ||||
| 
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		<td width="33%" align="center" class="copyr"><?php echo getstring("chat.window.poweredby") ?> <a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("chat.window.poweredreftext") ?></a></td>
 | ||||
| 		<td width="33%" align="right"> | ||||
| 		 | ||||
| <?php if( $page['canpost'] ) { ?>
 | ||||
| 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> | ||||
| 		    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||
| 				<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||
| 				<a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><?php echo getstring("chat.window.send_message_short") ?></a><br>
 | ||||
| 			</td> | ||||
| 			<td width="10"><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| <?php } ?>
 | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
|     <td width="100%"><img src='/webim/images/free.gif' width="585" height="1" border="0" alt="" /></td> | ||||
|     <td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.agent") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/common.js"></script> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | ||||
| <script language="javascript"><!-- | ||||
| var threadParams = { servl:"/webim/thread.php",frequency:2,<?php if( $page['user'] ) { ?>user:"true",<?php } ?>threadid:<?php echo $page['ct.chatThreadId'] ?>,token:<?php echo $page['ct.token'] ?> };
 | ||||
| //--></script>
 | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/page_chat.js"></script> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> | ||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="50%" valign="top"> | ||||
| 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center"><?php if( $page['ct.company.chatLogoURL'] ) { ?><img src="<?php echo $page['ct.company.chatLogoURL'] ?>" width="85" height="45" border="0" alt=""><?php } ?></td>
 | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td height="5"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
|     	<td width="50%" align="right" valign="top"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25" align="right"> | ||||
| 
 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | ||||
| 			    <td width="5"></td> | ||||
| 			    <td> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 					<tr> | ||||
| 				    <td width="95" height="13" bgcolor="#D09221" align="center" class="www"><a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("site.title") ?></a></td>
 | ||||
| 					</tr> | ||||
| 					</table> | ||||
| 				</td> | ||||
| 			    <td width="5"></td> | ||||
| 			    <td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"><img src='/webim/images/buttons/closewin.gif' width="15" height="15" border="0" altKey="chat.window.close_link_text"/></a></td> | ||||
| 			    <td width="5"></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td height="60" align="right"> | ||||
| 				 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| <?php if( $page['agent'] ) { ?>
 | ||||
| 				<td class="text" nowrap> | ||||
| 					<?php echo getstring("chat.window.chatting_with") ?> <b><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.chatting_with") ?> <?php echo htmlspecialchars($page['ct.user.name']) ?><?php echo $page['namePostfix'] ?>"><?php echo htmlspecialchars($page['ct.user.name']) ?></a></b><br>
 | ||||
| 				</td> | ||||
| <?php } ?><?php if( $page['user'] && $page['canChangeName'] ) { ?>
 | ||||
| 				<td class="text" nowrap> | ||||
| 				<div id="changename1" style="display:<?php echo $page['displ1'] ?>;"> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||
| 					<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td> 
 | ||||
| 					<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 					<td><input id="uname" type="text" size="12" value="<?php echo $page['ct.user.name'] ?>" class="username"></td> | ||||
| 					<td width="5" valign="top"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 					<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/exec.gif' width="25" height="25" border="0" alt=">>" /></a></td> | ||||
| 					</tr></table> | ||||
| 				</div> | ||||
| 				<div id="changename2" style="display:<?php echo $page['displ2'] ?>;"> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||
| 					<td class="text" nowrap><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><?php echo getstring("chat.client.changename") ?></a></td>
 | ||||
| 					<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 					<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 					</tr></table> | ||||
| 				</div> | ||||
| 				</td> | ||||
| <?php } ?>
 | ||||
| <?php if( $page['agent'] ) { ?>
 | ||||
| 				<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 				<td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"> | ||||
| 				<img src='/webim/images/buttons/close.gif' width="25" height="25" border="0" altKey="chat.window.close_link_text"/></a></td> | ||||
| <?php } ?>
 | ||||
| <!-- | ||||
| 				<td><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="Change User" /></td> | ||||
|  --> | ||||
| 
 | ||||
| 			    <td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td> | ||||
| <?php if( $page['user'] ) { ?>
 | ||||
| 				<td><a href="<?php echo $page['selfLink'] ?>&act=mailthread" target="_blank" title="<?php echo getstring("chat.window.toolbar.mail_history") ?>" onclick="this.newWindow = window.open('<?php echo $page['selfLink'] ?>&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src='/webim/images/buttons/email.gif' width="25" height="25" border="0" alt="Mail "/></a></td> | ||||
| <?php } ?>
 | ||||
| 
 | ||||
| 				<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>"> | ||||
| 				<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh " /></a></td> | ||||
| 
 | ||||
| 				<td width="20" valign="top"><img src='/webim/images/free.gif' width="20" height="1" border="0" alt="" /></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td valign="top"> | ||||
| 
 | ||||
| 		<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="" /></td> | ||||
|     	<td colspan="2" width="100%" height="100%" valign="top" id="chatwndtd"> | ||||
| 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="100%" height="100%" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<iframe id="chatwnd" width="100%" height="100%" src='/webim/images/free.gif' frameborder="0" style="overflow:auto;"> | ||||
| 				Sorry, your browser does not support iframes; try a browser that supports W3 standards. | ||||
| 				</iframe> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| <?php if( $page['canpost'] ) { ?>
 | ||||
| 		<tr> | ||||
| 	    <td colspan="3" height="5" style="cursor:n-resize;" id="spl1"></td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.message") ?>' width="20" height="85" border="0" alt="" /></td> | ||||
|     	<td width="100%" height="100" valign="top" id="msgwndtd"> | ||||
| 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="100%" height="100%" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<textarea id="msgwnd" class="message" tabindex="0"></textarea> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 	    <td valign="center" id="avatarwnd"></td> | ||||
| 		</tr> | ||||
| <?php } ?>	
 | ||||
| 		</table> | ||||
| 
 | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="45"></td> | ||||
|     <td> | ||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="33%"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td width="20"></td> | ||||
| 
 | ||||
| 
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		<td width="33%" align="center" class="copyr"><?php echo getstring("chat.window.poweredby") ?> <a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("chat.window.poweredreftext") ?></a></td>
 | ||||
| 		<td width="33%" align="right"> | ||||
| 		 | ||||
| <?php if( $page['canpost'] ) { ?>
 | ||||
| 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> | ||||
| 		    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||
| 				<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||
| 				<a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><?php echo getstring("chat.window.send_message_short") ?></a><br>
 | ||||
| 			</td> | ||||
| 			<td width="10"><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| <?php } ?>
 | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
|     <td width="100%"><img src='/webim/images/free.gif' width="585" height="1" border="0" alt="" /></td> | ||||
|     <td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,108 +1,104 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.error_page.title") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="75"></td> | ||||
| <td class="window"> | ||||
| 	<h1><?php echo getstring("chat.error_page.head") ?></h1>
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="100%"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 
 | ||||
| 		<?php	if( isset($errors) && count($errors) > 0 ) { | ||||
| 		print getstring("errors.header"); | ||||
| 		foreach( $errors as $e ) { | ||||
| 			print getstring("errors.prefix"); | ||||
| 			print $e; | ||||
| 			print getstring("errors.suffix"); | ||||
| 		} | ||||
| 		print getstring("errors.footer"); | ||||
| 	} ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 	</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="100%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("chat.error_page.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("chat.error_page.close") ?>"><?php echo getstring("chat.error_page.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.error_page.title") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="75"></td> | ||||
| <td class="window"> | ||||
| 	<h1><?php echo getstring("chat.error_page.head") ?></h1>
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="100%"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 
 | ||||
| 		<?php	if( isset($errors) && count($errors) > 0 ) { | ||||
| 		print getstring("errors.header"); | ||||
| 		foreach( $errors as $e ) { | ||||
| 			print getstring("errors.prefix"); | ||||
| 			print $e; | ||||
| 			print getstring("errors.suffix"); | ||||
| 		} | ||||
| 		print getstring("errors.footer"); | ||||
| 	} ?>
 | ||||
| 
 | ||||
| 
 | ||||
| 	</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="100%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("chat.error_page.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("chat.error_page.close") ?>"><?php echo getstring("chat.error_page.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,108 +1,104 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="75"></td> | ||||
| <td class="window"> | ||||
| 	<h1><?php echo getstring("chat.mailthread.sent.title") ?></h1>
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="100%"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 
 | ||||
| 		<?php echo getstring2("chat.mailthread.sent.content",array($page['email'])) ?><br/>
 | ||||
| 		<a href="javascript:window.close();"><?php echo getstring("chat.mailthread.sent.closewindow") ?></a>
 | ||||
| 
 | ||||
| 	</td> | ||||
|     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="100%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("chat.mailthread.sent.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("chat.mailthread.sent.close") ?>"><?php echo getstring("chat.mailthread.sent.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="75"></td> | ||||
| <td class="window"> | ||||
| 	<h1><?php echo getstring("chat.mailthread.sent.title") ?></h1>
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="100%"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 
 | ||||
| 		<?php echo getstring2("chat.mailthread.sent.content",array($page['email'])) ?><br/>
 | ||||
| 		<a href="javascript:window.close();"><?php echo getstring("chat.mailthread.sent.closewindow") ?></a>
 | ||||
| 
 | ||||
| 	</td> | ||||
|     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="100%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("chat.mailthread.sent.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("chat.mailthread.sent.close") ?>"><?php echo getstring("chat.mailthread.sent.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,132 +1,128 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <form name="mailThreadForm" method="post" action="/webim/mail.php"> | ||||
| <input type="hidden" name="thread" value="<?php echo $page['ct.chatThreadId'] ?>"/><input type="hidden" name="token" value="<?php echo $page['ct.token'] ?>"/><input type="hidden" name="level" value="<?php echo $page['level'] ?>"/> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="75"></td> | ||||
| <td class="window"> | ||||
| 	<h1><?php echo getstring("mailthread.title") ?></h1>
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="60"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 		 | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td class="text"><?php echo getstring("mailthread.enter_email") ?></td>
 | ||||
| 	    <td width="10"></td> | ||||
| 	    <td><input type="text" name="email" size="20" value="<?php echo form_value('email') ?>" class="username"/></td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 
 | ||||
| 	</td> | ||||
|     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="50%"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> | ||||
| 	    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||
| 			<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||
| 			<a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><?php echo getstring("mailthread.perform") ?></a><br>
 | ||||
| 		</td> | ||||
| 	    <td width="10"><a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
|     <td width="50%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><?php echo getstring("mailthread.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </form> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| <form name="mailThreadForm" method="post" action="/webim/mail.php"> | ||||
| <input type="hidden" name="thread" value="<?php echo $page['ct.chatThreadId'] ?>"/><input type="hidden" name="token" value="<?php echo $page['ct.token'] ?>"/><input type="hidden" name="level" value="<?php echo $page['level'] ?>"/> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="75"></td> | ||||
| <td class="window"> | ||||
| 	<h1><?php echo getstring("mailthread.title") ?></h1>
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="60"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 		 | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td class="text"><?php echo getstring("mailthread.enter_email") ?></td>
 | ||||
| 	    <td width="10"></td> | ||||
| 	    <td><input type="text" name="email" size="20" value="<?php echo form_value('email') ?>" class="username"/></td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 
 | ||||
| 	</td> | ||||
|     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="50%"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td> | ||||
| 	    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||
| 			<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||
| 			<a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><?php echo getstring("mailthread.perform") ?></a><br>
 | ||||
| 		</td> | ||||
| 	    <td width="10"><a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
|     <td width="50%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><?php echo getstring("mailthread.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </form> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,99 +1,95 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("page.chat.old_browser.title") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="20"></td> | ||||
| <td class="window"> | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="100%"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 
 | ||||
| 		<?php echo getstring("page.chat.old_browser.content") ?>
 | ||||
| 
 | ||||
| 	</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="100%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("page.chat.old_browser.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("page.chat.old_browser.close") ?>"><?php echo getstring("page.chat.old_browser.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("page.chat.old_browser.title") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| </head> | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td height="20"></td> | ||||
| <td class="window"> | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="100%"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | ||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||
| 
 | ||||
| 		<?php echo getstring("page.chat.old_browser.content") ?>
 | ||||
| 
 | ||||
| 	</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 	</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|     <td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td height="70"></td> | ||||
| <td> | ||||
| 
 | ||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td width="100%" align="right"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><a href="javascript:window.close();" title="<?php echo getstring("page.chat.old_browser.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td> | ||||
| 	    <td width="5"></td> | ||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("page.chat.old_browser.close") ?>"><?php echo getstring("page.chat.old_browser.close") ?></a></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 	 | ||||
| </td> | ||||
| <td></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| <td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td> | ||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,239 +1,239 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| 
 | ||||
| <table width="600" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 	<table width="600" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> | ||||
| 		<table width="590" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="135" valign="top"> | ||||
| 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center"><?php if( $page['ct.company.chatLogoURL'] ) { ?><img src="<?php echo $page['ct.company.chatLogoURL'] ?>" width="85" height="45" border="0" alt="<?php echo $page['ct.company.name'] ?>"><?php } ?></td>
 | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td height="5"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
|     	<td width="455" align="right" valign="top"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25" align="right"> | ||||
| 
 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | ||||
| 			    <td width="5"></td> | ||||
| 			    <td> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 					<tr> | ||||
| 				    <td width="95" height="13" bgcolor="#D09221" align="center" class="www"><a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("site.title") ?></a></td>
 | ||||
| 					</tr> | ||||
| 					</table> | ||||
| 				</td> | ||||
| 			    <td width="5"></td> | ||||
| 			    <td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"><img src='/webim/images/buttons/closewin.gif' width="15" height="15" border="0" altKey="chat.window.close_title"/></a></td> | ||||
| 			    <td width="5"></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td height="60" align="right"> | ||||
| 				 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 
 | ||||
| 				<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td> 
 | ||||
| 				<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 				<td><input id="uname" type="text" size="12" value="<?php echo $page['ct.user.name'] ?>" class="username"></td> | ||||
| 				<td width="5" valign="top"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 				<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/exec.gif' width="25" height="25" border="0" alt=">>" /></a></td> | ||||
| 
 | ||||
| 			    <td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td> | ||||
| 
 | ||||
| 				<td><a href="<?php echo $page['selfLink'] ?>&act=mailthread" target="_blank" title="<?php echo getstring("chat.window.toolbar.mail_history") ?>" onclick="this.newWindow = window.open('<?php echo $page['selfLink'] ?>&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src='/webim/images/buttons/email.gif' width="25" height="25" border="0" alt="Mail" /></a></td> | ||||
| 
 | ||||
| 				<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>"> | ||||
| 				<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh" /></a></td> | ||||
| 
 | ||||
| 			     | ||||
| 
 | ||||
| 			    <td width="20"></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td valign="top"> | ||||
| 
 | ||||
| 		<table width="585" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="History" /></td> | ||||
|     	<td width="565" valign="top" id="chatwndtd"> | ||||
| 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="100%" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<iframe name="chatwndiframe" width="100%" height="175" src="/webim/thread.php?act=refresh&thread=<?php echo $page['ct.chatThreadId'] ?>&token=<?php echo $page['ct.token'] ?>&html=on&user=true" frameborder="0" style="overflow:auto;"> | ||||
| 				Sorry, your browser does not support iframes; try a browser that supports W3 standards. | ||||
| 				</iframe> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 	    <td colspan="2" height="5"></td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.message") ?>' width="20" height="85" border="0" alt="Message" /></td> | ||||
|     	<td width="565" valign="top"> | ||||
| 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="565" height="85" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<form id="messageform" method="post" action="/webim/thread.php" target="chatwndiframe" width="565" height="85"> | ||||
| 				<input type="hidden" name="act" value="post"/><input type="hidden" name="html" value="on"/><input type="hidden" name="thread" value="<?php echo $page['ct.chatThreadId'] ?>"/><input type="hidden" name="token" value="<?php echo $page['ct.token'] ?>"/><input type="hidden" name="user" value="true"/> | ||||
| 				<input type="hidden" id="message" name="message" value=""/> | ||||
| 				<textarea id="messagetext" cols="50" rows="4" class="message" style="width:550px;" tabindex="0"></textarea> | ||||
| 				</form> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 
 | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="45"></td> | ||||
|     <td> | ||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="33%"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td width="20"></td> | ||||
| 
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		<td width="33%" align="center" class="copyr"><?php echo getstring("chat.window.poweredby") ?> <a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("chat.window.poweredreftext") ?></a></td>
 | ||||
| 		<td width="33%" align="right"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" altKey="chat.window.send_message_short"/></a></td> | ||||
| 		    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||
| 				<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||
| 				<a id="msgsend1" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><?php echo getstring("chat.window.send_message_short") ?></a><br>
 | ||||
| 			</td> | ||||
| 			<td width="10"><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" altKey="chat.window.send_message_short"/></a></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
|     <td width="585"><img src='/webim/images/free.gif' width="585" height="1" border="0" alt="" /></td> | ||||
|     <td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| <script type="text/javascript"><!-- | ||||
| function sendmessage(){ | ||||
| 	getEl('message').value = getEl('messagetext').value; | ||||
| 	getEl('messagetext').value = ''; | ||||
| 	getEl('messageform').submit(); | ||||
| } | ||||
| getEl('messagetext').onkeydown = function(k) { | ||||
| 	if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey;	} | ||||
| 	if( (k==13 && ctrl) || (k==10) ) { | ||||
| 		sendmessage(); | ||||
| 		return false; | ||||
| 	} | ||||
| 	return true; | ||||
| } | ||||
| getEl('msgsend1').onclick = function() { | ||||
| 	sendmessage(); | ||||
| 	return false; | ||||
| } | ||||
| //--></script>
 | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||
| <html> | ||||
| <head> | ||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | ||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0"> | ||||
| 
 | ||||
| <table width="600" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top"> | ||||
| 
 | ||||
| 	<table width="600" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> | ||||
| 		<table width="590" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="135" valign="top"> | ||||
| 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center"><?php if( $page['ct.company.chatLogoURL'] ) { ?><img src="<?php echo $page['ct.company.chatLogoURL'] ?>" width="85" height="45" border="0" alt="<?php echo $page['ct.company.name'] ?>"><?php } ?></td>
 | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td height="5"></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
|     	<td width="455" align="right" valign="top"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td height="25" align="right"> | ||||
| 
 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | ||||
| 			    <td width="5"></td> | ||||
| 			    <td> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 					<tr> | ||||
| 				    <td width="95" height="13" bgcolor="#D09221" align="center" class="www"><a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("site.title") ?></a></td>
 | ||||
| 					</tr> | ||||
| 					</table> | ||||
| 				</td> | ||||
| 			    <td width="5"></td> | ||||
| 			    <td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"><img src='/webim/images/buttons/closewin.gif' width="15" height="15" border="0" altKey="chat.window.close_title"/></a></td> | ||||
| 			    <td width="5"></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td height="60" align="right"> | ||||
| 				 | ||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 
 | ||||
| 				<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td> 
 | ||||
| 				<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
| 				<td><input id="uname" type="text" size="12" value="<?php echo $page['ct.user.name'] ?>" class="username"></td> | ||||
| 				<td width="5" valign="top"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 				<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/exec.gif' width="25" height="25" border="0" alt=">>" /></a></td> | ||||
| 
 | ||||
| 			    <td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td> | ||||
| 
 | ||||
| 				<td><a href="<?php echo $page['selfLink'] ?>&act=mailthread" target="_blank" title="<?php echo getstring("chat.window.toolbar.mail_history") ?>" onclick="this.newWindow = window.open('<?php echo $page['selfLink'] ?>&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src='/webim/images/buttons/email.gif' width="25" height="25" border="0" alt="Mail" /></a></td> | ||||
| 
 | ||||
| 				<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>"> | ||||
| 				<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh" /></a></td> | ||||
| 
 | ||||
| 			     | ||||
| 
 | ||||
| 			    <td width="20"></td> | ||||
| 				</tr> | ||||
| 				</table> | ||||
| 
 | ||||
| 			</td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td></td> | ||||
|     <td valign="top"> | ||||
| 
 | ||||
| 		<table width="585" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="History" /></td> | ||||
|     	<td width="565" valign="top" id="chatwndtd"> | ||||
| 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="100%" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<iframe name="chatwndiframe" width="100%" height="175" src="/webim/thread.php?act=refresh&thread=<?php echo $page['ct.chatThreadId'] ?>&token=<?php echo $page['ct.token'] ?>&html=on&user=true" frameborder="0" style="overflow:auto;"> | ||||
| 				Sorry, your browser does not support iframes; try a browser that supports W3 standards. | ||||
| 				</iframe> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 	    <td colspan="2" height="5"></td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.message") ?>' width="20" height="85" border="0" alt="Message" /></td> | ||||
|     	<td width="565" valign="top"> | ||||
| 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 		    <td width="565" height="85" bgcolor="#FFFFFF" valign="top"> | ||||
| 				<form id="messageform" method="post" action="/webim/thread.php" target="chatwndiframe" width="565" height="85"> | ||||
| 				<input type="hidden" name="act" value="post"/><input type="hidden" name="html" value="on"/><input type="hidden" name="thread" value="<?php echo $page['ct.chatThreadId'] ?>"/><input type="hidden" name="token" value="<?php echo $page['ct.token'] ?>"/><input type="hidden" name="user" value="true"/> | ||||
| 				<input type="hidden" id="message" name="message" value=""/> | ||||
| 				<textarea id="messagetext" cols="50" rows="4" class="message" style="width:550px;" tabindex="0"></textarea> | ||||
| 				</form> | ||||
| 			</td> | ||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			<tr> | ||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 
 | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td height="45"></td> | ||||
|     <td> | ||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td width="33%"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 			<tr> | ||||
| 		    <td width="20"></td> | ||||
| 
 | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		<td width="33%" align="center" class="copyr"><?php echo getstring("chat.window.poweredby") ?> <a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("chat.window.poweredreftext") ?></a></td>
 | ||||
| 		<td width="33%" align="right"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | ||||
| 
 | ||||
| 			<tr> | ||||
| 		    <td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" altKey="chat.window.send_message_short"/></a></td> | ||||
| 		    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||
| 				<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||
| 				<a id="msgsend1" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><?php echo getstring("chat.window.send_message_short") ?></a><br>
 | ||||
| 			</td> | ||||
| 			<td width="10"><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" altKey="chat.window.send_message_short"/></a></td> | ||||
| 			</tr> | ||||
| 			</table> | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
|     <td></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
|     <td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | ||||
|     <td width="585"><img src='/webim/images/free.gif' width="585" height="1" border="0" alt="" /></td> | ||||
|     <td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||
| 	</tr> | ||||
| 	</table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| <script type="text/javascript"><!-- | ||||
| function sendmessage(){ | ||||
| 	getEl('message').value = getEl('messagetext').value; | ||||
| 	getEl('messagetext').value = ''; | ||||
| 	getEl('messageform').submit(); | ||||
| } | ||||
| getEl('messagetext').onkeydown = function(k) { | ||||
| 	if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey;	} | ||||
| 	if( (k==13 && ctrl) || (k==10) ) { | ||||
| 		sendmessage(); | ||||
| 		return false; | ||||
| 	} | ||||
| 	return true; | ||||
| } | ||||
| getEl('msgsend1').onclick = function() { | ||||
| 	sendmessage(); | ||||
| 	return false; | ||||
| } | ||||
| //--></script>
 | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
|  | ||||
| @ -1,134 +1,127 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page.gen_button.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page.gen_button.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("page.gen_button.intro") ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| 
 | ||||
| <form name="buttonCodeForm" method="get" action="/webim/operator/getcode.php"> | ||||
| <table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_image") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<select name="image" onchange="this.form.submit();"><?php foreach($page['availableImages'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("image") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_locale") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<select name="lang" onchange="this.form.submit();"><?php foreach($page['availableLocales'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("lang") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.include_site_name") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<input type="checkbox" name="hostname" value="on"<?php echo form_value_cb('hostname') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| <?php if( $page['formhostname'] ) { ?>
 | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.secure_links") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<input type="checkbox" name="secure" value="on"<?php echo form_value_cb('secure') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| <?php } ?>
 | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td class="formauth"><?php echo getstring("page.gen_button.code") ?></td>
 | ||||
| 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | ||||
| 		<td></td> | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td><textarea cols="60" rows="15"><?php echo $page['buttonCode'] ?></textarea></td>
 | ||||
| 		<td></td> | ||||
| 		<td class="formauth" valign="top" nowrap><span class="formdescr"><?php echo getstring("page.gen_button.code.description") ?></span></td>
 | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" height="10"></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
| 		<td class="formauth"><?php echo getstring("page.gen_button.sample") ?></td>
 | ||||
| 		<td></td> | ||||
| 		<td></td> | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" height="2"></td> | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td><?php echo $page['buttonCode'] ?></td>
 | ||||
| 		<td></td> | ||||
| 		<td class="formauth" valign="top" nowrap><span class="formdescr"></span></td> | ||||
| 	</tr> | ||||
| </table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| </form> | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page.gen_button.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page.gen_button.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("page.gen_button.intro") ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| 
 | ||||
| <form name="buttonCodeForm" method="get" action="/webim/operator/getcode.php"> | ||||
| <table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_image") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<select name="image" onchange="this.form.submit();"><?php foreach($page['availableImages'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("image") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_locale") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<select name="lang" onchange="this.form.submit();"><?php foreach($page['availableLocales'] as $k) { echo "<option value=\"".$k."\"".($k == form_value("lang") ? " selected=\"selected\"" : "").">".$k."</option>"; } ?></select>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.include_site_name") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<input type="checkbox" name="hostname" value="on"<?php echo form_value_cb('hostname') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| <?php if( $page['formhostname'] ) { ?>
 | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.secure_links") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3"> | ||||
| 			<input type="checkbox" name="secure" value="on"<?php echo form_value_cb('secure') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | ||||
| 		</td> | ||||
| 	</tr> | ||||
| <?php } ?>
 | ||||
| 	<tr><td colspan="3" height="5"></td></tr> | ||||
| 	<tr> | ||||
| 		<td class="formauth"><?php echo getstring("page.gen_button.code") ?></td>
 | ||||
| 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | ||||
| 		<td></td> | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td><textarea cols="60" rows="15"><?php echo $page['buttonCode'] ?></textarea></td>
 | ||||
| 		<td></td> | ||||
| 		<td class="formauth" valign="top" nowrap><span class="formdescr"><?php echo getstring("page.gen_button.code.description") ?></span></td>
 | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" height="10"></td> | ||||
| 	</tr> | ||||
| 
 | ||||
| 	<tr> | ||||
| 		<td class="formauth"><?php echo getstring("page.gen_button.sample") ?></td>
 | ||||
| 		<td></td> | ||||
| 		<td></td> | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td colspan="3" height="2"></td> | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td><?php echo $page['buttonCode'] ?></td>
 | ||||
| 		<td></td> | ||||
| 		<td class="formauth" valign="top" nowrap><span class="formdescr"></span></td> | ||||
| 	</tr> | ||||
| </table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| </form> | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,143 +1,124 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_login.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("page_login.title") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | ||||
| 	    <td width="10"></td> | ||||
| 	    <td class="text"> | ||||
| 		    <?php	if( isset($errors) && count($errors) > 0 ) { | ||||
| 		print getstring("errors.header"); | ||||
| 		foreach( $errors as $e ) { | ||||
| 			print getstring("errors.prefix"); | ||||
| 			print $e; | ||||
| 			print getstring("errors.suffix"); | ||||
| 		} | ||||
| 		print getstring("errors.footer"); | ||||
| 	} ?>
 | ||||
| 
 | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	<?php } ?>
 | ||||
| 
 | ||||
| <form name="loginForm" method="post" action="/webim/operator/login.php"> | ||||
| 	<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 		<tr> | ||||
| 			<td colspan="2"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 					<td class="formauth"><?php echo getstring("page_login.login") ?></td>
 | ||||
| 					<td width="20"></td> | ||||
| 					<td><input type="text" name="login" size="20" value="<?php echo form_value('login') ?>" class="formauth"/></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td colspan="3" height="10"></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td class="formauth"><?php echo getstring("page_login.password") ?></td>
 | ||||
| 					<td></td> | ||||
| 					<td><input type="password" name="password" size="20" value="" class="formauth"/></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td colspan="3" height="5"></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td class="formauth"></td> | ||||
| 					<td></td> | ||||
| 					<td> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 						<tr> | ||||
| 							<td><input type="checkbox" name="isRemember" value="on"<?php echo form_value_cb('isRemember') ? " checked=\"checked\"" : "" ?> /></td>
 | ||||
| 							<td width="5"></td> | ||||
| 							<td class="formauth" nowrap><span><?php echo getstring("page_login.remember") ?></span></td>
 | ||||
| 						</tr> | ||||
| 					</table> | ||||
| 					</td> | ||||
| 				</tr> | ||||
| 			</table> | ||||
| 			</td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr><td colspan='2' height='20'></td></tr><tr><td colspan='2' background='/webim/images/formline.gif'><img src='/webim/images/formline.gif' width='1' height='2' border='0' alt=''></td></tr><tr><td colspan='2' height='10'></td></tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 			<td><input type="hidden" name="backPath" value="<?php echo $page['backPath'] ?>"/> <input type="image" name="" src='<?php echo getstring("image.button.login") ?>' border="0" alt='<?php echo getstring("button.enter") ?>'/> | ||||
| 			</td> | ||||
| 			 | ||||
| 		</tr> | ||||
| 	</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| </form> | ||||
| 
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_login.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("page_login.title") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | ||||
| 	    <td width="10"></td> | ||||
| 	    <td class="text"> | ||||
| 		    <?php	if( isset($errors) && count($errors) > 0 ) { | ||||
| 		print getstring("errors.header"); | ||||
| 		foreach( $errors as $e ) { | ||||
| 			print getstring("errors.prefix"); | ||||
| 			print $e; | ||||
| 			print getstring("errors.suffix"); | ||||
| 		} | ||||
| 		print getstring("errors.footer"); | ||||
| 	} ?>
 | ||||
| 
 | ||||
| 		</td> | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	<?php } ?>
 | ||||
| 
 | ||||
| <form name="loginForm" method="post" action="/webim/operator/login.php"> | ||||
| 	<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 		<tr> | ||||
| 			<td colspan="2"> | ||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 				<tr> | ||||
| 					<td class="formauth"><?php echo getstring("page_login.login") ?></td>
 | ||||
| 					<td width="20"></td> | ||||
| 					<td><input type="text" name="login" size="20" value="<?php echo form_value('login') ?>" class="formauth"/></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td colspan="3" height="10"></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td class="formauth"><?php echo getstring("page_login.password") ?></td>
 | ||||
| 					<td></td> | ||||
| 					<td><input type="password" name="password" size="20" value="" class="formauth"/></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td colspan="3" height="5"></td> | ||||
| 				</tr> | ||||
| 
 | ||||
| 				<tr> | ||||
| 					<td class="formauth"></td> | ||||
| 					<td></td> | ||||
| 					<td> | ||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 						<tr> | ||||
| 							<td><input type="checkbox" name="isRemember" value="on"<?php echo form_value_cb('isRemember') ? " checked=\"checked\"" : "" ?> /></td>
 | ||||
| 							<td width="5"></td> | ||||
| 							<td class="formauth" nowrap><span><?php echo getstring("page_login.remember") ?></span></td>
 | ||||
| 						</tr> | ||||
| 					</table> | ||||
| 					</td> | ||||
| 				</tr> | ||||
| 			</table> | ||||
| 			</td> | ||||
| 		</tr> | ||||
| 
 | ||||
| 		<tr><td colspan='2' height='20'></td></tr><tr><td colspan='2' background='/webim/images/formline.gif'><img src='/webim/images/formline.gif' width='1' height='2' border='0' alt=''></td></tr><tr><td colspan='2' height='10'></td></tr> | ||||
| 
 | ||||
| 		<tr> | ||||
| 			<td><input type="hidden" name="backPath" value="<?php echo $page['backPath'] ?>"/> <input type="image" name="" src='<?php echo getstring("image.button.login") ?>' border="0" alt='<?php echo getstring("button.enter") ?>'/> | ||||
| 			</td> | ||||
| 			 | ||||
| 		</tr> | ||||
| 	</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| </form> | ||||
| 
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,88 +1,81 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("topMenu.admin") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("topMenu.admin") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("admin.content.description") ?>
 | ||||
| <br> | ||||
| <br> | ||||
| 
 | ||||
| <table cellspacing="0" cellpadding="0" border="0"> | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/operators.php'><?php echo getstring('leftMenu.client_agents') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('admin.content.client_agents') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/users.php'><?php echo getstring('topMenu.users') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('page_client.pending_users') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/getcode.php'><?php echo getstring('leftMenu.client_gen_button') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('admin.content.client_gen_button') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
|          | ||||
|         <tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/history.php'><?php echo getstring('page_analysis.search.title') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('content.history') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/logout.php'><?php echo getstring('topMenu.logoff') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('content.logoff') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| </table> | ||||
| 
 | ||||
| <table width="200" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
|   <td height="10"></td> | ||||
| </tr> | ||||
| <tr> | ||||
|   <td bgcolor="#D6D6D6"><img src="/webim/images/free.gif" height="1" width="1" border="0" alt=""></td> | ||||
| </tr> | ||||
| <tr> | ||||
|   <td height="7"></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| Web Messenger/<?php echo $page['version'] ?> • <?php echo $page['localeLinks'] ?>
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("topMenu.admin") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("topMenu.admin") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("admin.content.description") ?>
 | ||||
| <br> | ||||
| <br> | ||||
| 
 | ||||
| <table cellspacing="0" cellpadding="0" border="0"> | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/operators.php'><?php echo getstring('leftMenu.client_agents') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('admin.content.client_agents') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/users.php'><?php echo getstring('topMenu.users') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('page_client.pending_users') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/getcode.php'><?php echo getstring('leftMenu.client_gen_button') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('admin.content.client_gen_button') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/history.php'><?php echo getstring('page_analysis.search.title') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('content.history') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| 	<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/logout.php'><?php echo getstring('topMenu.logoff') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('content.logoff') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
 | ||||
| 
 | ||||
| </table> | ||||
| 
 | ||||
| <table width="200" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
|   <td height="10"></td> | ||||
| </tr> | ||||
| <tr> | ||||
|   <td bgcolor="#D6D6D6"><img src="/webim/images/free.gif" height="1" width="1" border="0" alt=""></td> | ||||
| </tr> | ||||
| <tr> | ||||
|   <td height="7"></td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| Web Messenger/<?php echo $page['version'] ?> • <?php echo $page['localeLinks'] ?>
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,176 +1,156 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/common.js"></script> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <script><!-- | ||||
| var localized = new Array( | ||||
|     "<?php echo getstring("pending.table.speak") ?>", | ||||
|     "<?php echo getstring("pending.table.view") ?>", | ||||
|     "<?php echo getstring("pending.table.ban") ?>" | ||||
| ); | ||||
| var updaterOptions = { | ||||
| 	url:"/webim/operator/update.php",  | ||||
| 
 | ||||
| 	agentservl:"/webim/operator/agent.php", | ||||
| 	noclients:"<?php echo getstring("clients.no_clients") ?>" }; | ||||
| //--></script>
 | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/page_pendingclients.js"></script> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("clients.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("clients.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php echo getstring("clients.intro") ?><br>
 | ||||
| 
 | ||||
| <?php echo getstring("clients.how_to") ?><br>
 | ||||
| <br> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr><td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td></tr> | ||||
| <tr><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|    <td width="100%"> | ||||
|     | ||||
|    <!-- Pending --> | ||||
| 
 | ||||
| <table width="100%" id="threadlist" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
|     <td width="150" height="30" bgcolor="#276DB8" class="table"><span class="header"><?php echo getstring("pending.table.head.name") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.contactid") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.state") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.operator") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.total") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.waittime") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.etc") ?></span></td>
 | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
|     <td colspan="13" height="2"></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="prio"> | ||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tblicusers.gif' width="15" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.prio") ?></span></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="prioend"> | ||||
|     <td colspan="13" height="30" class="table" id="status"></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="wait"> | ||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tblicusers2.gif' width="15" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.wait") ?></span></td>
 | ||||
| 		</tr>	 | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="waitend"> | ||||
|     <td colspan="13" height="30" class="table" id="status"></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="chat"> | ||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||
| 	    <td><img src='/webim/images/tblicusers3.gif' width="30" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.chat") ?></span></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="chatend"> | ||||
|     <td colspan="13" height="30" class="table" id="status"></td> | ||||
| </tr> | ||||
| 
 | ||||
| </table> | ||||
| 
 | ||||
| </td><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| </tr><tr> | ||||
|    <td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| </tr></table> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr><td colspan="2" height="15"></td></tr> | ||||
| 	<tr> | ||||
|     <td class="text"></td> | ||||
|     <td align="right" class="text" id="connstatus"> | ||||
|     </td> | ||||
| 	</tr> | ||||
| 
 | ||||
| </table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/common.js"></script> | ||||
| <script><!-- | ||||
| var localized = new Array( | ||||
|     "<?php echo getstring("pending.table.speak") ?>", | ||||
|     "<?php echo getstring("pending.table.view") ?>", | ||||
|     "<?php echo getstring("pending.table.ban") ?>" | ||||
| ); | ||||
| var updaterOptions = { | ||||
| 	url:"/webim/operator/update.php",  | ||||
| 
 | ||||
| 	agentservl:"/webim/operator/agent.php", | ||||
| 	noclients:"<?php echo getstring("clients.no_clients") ?>" }; | ||||
| //--></script>
 | ||||
| <script type="text/javascript" language="javascript" src="/webim/js/page_pendingclients.js"></script> | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("clients.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("clients.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("clients.intro") ?><br>
 | ||||
| 
 | ||||
| <?php echo getstring("clients.how_to") ?><br>
 | ||||
| <br> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr><td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td></tr> | ||||
| <tr><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
|    <td width="100%"> | ||||
|     | ||||
|    <!-- Pending --> | ||||
| 
 | ||||
| <table width="100%" id="threadlist" cellspacing="0" cellpadding="0" border="0"> | ||||
| <tr> | ||||
|     <td width="150" height="30" bgcolor="#276DB8" class="table"><span class="header"><?php echo getstring("pending.table.head.name") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.contactid") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.state") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.operator") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.total") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.waittime") ?></span></td>
 | ||||
|     <td width="3"></td> | ||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.etc") ?></span></td>
 | ||||
| </tr> | ||||
| 
 | ||||
| <tr> | ||||
|     <td colspan="13" height="2"></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="prio"> | ||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tblicusers.gif' width="15" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.prio") ?></span></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="prioend"> | ||||
|     <td colspan="13" height="30" class="table" id="status"></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="wait"> | ||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | ||||
| 		<tr> | ||||
| 	    <td><img src='/webim/images/tblicusers2.gif' width="15" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.wait") ?></span></td>
 | ||||
| 		</tr>	 | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="waitend"> | ||||
|     <td colspan="13" height="30" class="table" id="status"></td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="chat"> | ||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||
| 		<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||
| 	    <td><img src='/webim/images/tblicusers3.gif' width="30" height="15" border="0" alt="" /></td> | ||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.chat") ?></span></td>
 | ||||
| 		</tr> | ||||
| 		</table> | ||||
| 	</td> | ||||
| </tr> | ||||
| 
 | ||||
| <tr id="chatend"> | ||||
|     <td colspan="13" height="30" class="table" id="status"></td> | ||||
| </tr> | ||||
| 
 | ||||
| </table> | ||||
| 
 | ||||
| </td><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| </tr><tr> | ||||
|    <td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||
| </tr></table> | ||||
| 
 | ||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||
| 	<tr><td colspan="2" height="15"></td></tr> | ||||
| 	<tr> | ||||
|     <td class="text"></td> | ||||
|     <td align="right" class="text" id="connstatus"> | ||||
|     </td> | ||||
| 	</tr> | ||||
| 
 | ||||
| </table> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,152 +1,152 @@ | ||||
| app.title=Web Instant Messenger | ||||
| site.url=http://i-services.ru | ||||
| site.title=i-services.ru | ||||
| company.title=Internet Services | ||||
| page.main_layout.meta_keyword=live chat,live help,live support | ||||
| page.main_layout.meta_description=Live chat, live help, and live support for websites | ||||
| page_login.title=Login | ||||
| page_login.login=Login: | ||||
| page_login.password=Password: | ||||
| page_login.remember=Remember | ||||
| page_login.error=Entered login/password is incorrect | ||||
| agent.not_logged_in=Your session is expired please login again | ||||
| page_client.pending_users=Your can find awaiting visitors. | ||||
| chat.window.title.agent=Web Messenger | ||||
| chat.window.title.user=Web Messenger | ||||
| chat.window.product_name=Web <span class="grey">Messenger</span> | ||||
| chat.window.close_title=Close chat | ||||
| chat.window.chatting_with=You chat with: | ||||
| chat.window.poweredby=Powered by: | ||||
| chat.window.poweredreftext=i-services.ru | ||||
| chat.window.send_message=Send message | ||||
| chat.window.send_message_short=Send (Ctrl-Enter) | ||||
| chat.window.toolbar.mail_history=Send chat history by e-mail | ||||
| chat.window.toolbar.refresh=Refresh | ||||
| chat.client.name=Your name: | ||||
| chat.client.changename=Change name | ||||
| chat.status.operator.left=Operator {0} left the chat | ||||
| chat.status.user.left=Visitor {0} left the chat | ||||
| chat.status.user.dead=Visitor closed chat window | ||||
| chat.status.operator.dead=Operator has connection issues, we temporarily moved you to foreground queue. Sorry for keeping you waiting. | ||||
| chat.status.operator.joined=Operator {0} joined the chat | ||||
| chat.status.user.changedname=Visitor changed the name {0} to {1} | ||||
| chat.status.user.reopenedthread=Visitor joined chat again | ||||
| chat.status.operator.changed=Operator {0} changed operator {1} | ||||
| chat.default.username=Visitor | ||||
| chat.error_page.title=Error | ||||
| chat.error_page.head=Error occurred: | ||||
| chat.error_page.close=Close... | ||||
| page.chat.old_browser.title=Please, use newer browser | ||||
| page.chat.old_browser.close=Close... | ||||
| page.chat.old_browser.content=Your web browser is not fully supported by Web Messenger. \nPlease, use one of the following web browsers: \n<p><ul>\n<li>Internet Explorer 5.5+\n<li>Firefox 1.0+\n<li>Opera 8.0+\n<li>Mozilla 1.4+\n<li>Netscape 7.1+\n<li>Safari 1.2+\n</ul></p>\nAlso, we support some old browsers:\n<p><ul>\n<li>Internet Explorer 5.0\n<li>Opera 7.0\n</ul></p> | ||||
| chat.wait=Thank you for contacting us. An operator will be with you shortly... | ||||
| mailthread.title=Send chat history<br>by mail | ||||
| mailthread.enter_email=Enter your e-mail: | ||||
| mailthread.perform=Send | ||||
| mailthread.close=Close... | ||||
| chat.mailthread.sent.title=Sent | ||||
| chat.mailthread.sent.content=History of your chat was sent on address {0} | ||||
| chat.mailthread.sent.closewindow=Click on this link to close the window | ||||
| chat.mailthread.sent.close=Close... | ||||
| chat.thread.state_wait=In queue | ||||
| chat.thread.state_wait_for_another_agent=Waiting for operator | ||||
| chat.thread.state_chatting_with_agent=In chat | ||||
| chat.thread.state_closed=Closed | ||||
| clients.title=List of awaiting visitors | ||||
| clients.no_clients=The of awaiting visitors is empty | ||||
| clients.intro=The page displays list of awaiting visitors. | ||||
| clients.how_to=To answer the visitor click on his/her name in the list. | ||||
| clients.queue.prio=Priority visitors queue | ||||
| clients.queue.wait=Waiting for operator for the first time | ||||
| clients.queue.chat=Visitors in dialogs | ||||
| pending.table.head.name=Name | ||||
| pending.table.head.contactid=Visitor's address | ||||
| pending.table.head.state=State | ||||
| pending.table.head.operator=Operator | ||||
| pending.table.head.total=Total time | ||||
| pending.table.head.waittime=Waiting time | ||||
| pending.table.head.etc=Misc | ||||
| pending.table.speak=Click to chat with the visitor | ||||
| pending.table.view=Watch the chat | ||||
| pending.table.ban=Ban the visitor | ||||
| thread.chat_log=Chat log | ||||
| thread.back_to_search=Go to search | ||||
| thread.intro=The page displays chat | ||||
| page_analysis.search.title=Chats history | ||||
| page.analysis.search.head_name=Name | ||||
| page.analysis.search.head_host=Visitor's address | ||||
| page.analysis.search.head_operator=Operator | ||||
| page.analysis.search.head_time=Time in chat | ||||
| common.asterisk_explanation=<b><font class="red">*</font></b> - mandatory fields | ||||
| page_agents.title=Agents | ||||
| page_agents.agents=Agents full list: | ||||
| page_agents.new_agent=Create new agent... | ||||
| page_agents.agent_name=Name | ||||
| page_agents.login=Login | ||||
| page_agents.intro=This page displays list of company agents it also allows add new ones if you permissions | ||||
| page_agent.title=Operator details | ||||
| page_agent.intro=This page displays agent details, if you have access rights you can edit them. | ||||
| page_agent.error.duplicate_login=Please choose another login, because agent with entered login is already registered in the system. | ||||
| my_settings.error.password_match=Entered passwords do not match | ||||
| topMenu.admin=Administration | ||||
| topMenu.users=Visitors | ||||
| topMenu.logoff=Exit | ||||
| leftMenu.client_agents=Agents | ||||
| leftMenu.client_gen_button=Button code | ||||
| admin.content.description=Functions available for power users. | ||||
| admin.content.client_agents=Create, delete company agents. Manage theirs permissions. | ||||
| admin.content.client_gen_button=Button HTML code generation. | ||||
| page.gen_button.title=Button HTML code generation | ||||
| page.gen_button.intro=You can generate HTML code to place at your site here. | ||||
| page.gen_button.code=HTML code | ||||
| page.gen_button.sample=Example | ||||
| page.gen_button.code.description=<strong>Caution!</strong> Please don't change<br/> the code manually because<br/> we don't guarantee that<br/> it will work! | ||||
| mail.user.history.subject=Web Messenger: dialog history | ||||
| mail.user.history.body=Hello, {0}!\n\nYour chat history: \n\n{1}\n--- \nKind Regards,\nThe I-Services Support Team | ||||
| errors.header=<font color="#c13030"><b>Correct the mistakes:</b><br/><br/><ul> | ||||
| errors.prefix=<li class="error"> | ||||
| errors.suffix=</li> | ||||
| errors.footer=</ul></font> | ||||
| errors.required=Please fill "{0}".   | ||||
| form.field.login=Login | ||||
| form.field.login.description=Login can consist of small Latin letters<br/> and underscore. | ||||
| form.field.agent_name=Name | ||||
| form.field.agent_name.description=This name will be seen by your visitors. | ||||
| form.field.password_confirm=Confirmation | ||||
| form.field.password_confirm.description=Confirm new password | ||||
| form.field.password=Password | ||||
| form.field.password.description= | ||||
| button.enter=Enter | ||||
| button.save=Save | ||||
| button.search=Search | ||||
| tag.pagination.info=Page {0} of {1}, {2}-{3} from {4} | ||||
| tag.pagination.no_items=Found 0 elements | ||||
| image.chat.history=/webim/images/en/history.gif | ||||
| image.chat.message=/webim/images/en/message.gif | ||||
| image.button.login=/webim/images/en/login.gif | ||||
| image.button.save=/webim/images/en/save.gif | ||||
| image.button.search=/webim/images/en/search.gif | ||||
| chat.came.from=Vistor came from page {0} | ||||
| content.history=Search the dialogs history | ||||
| content.logoff=Log out of the system. | ||||
| form.field.agent_commonname=International name (Latin) | ||||
| form.field.agent_commonname.description=This name will be seen by your visitors | ||||
| install.create_db_link=Create tables in MySQL database | ||||
| install.license=Software license agreement | ||||
| install.message=We are ready to complete installation by creating tables. | ||||
| install.title=System setup | ||||
| installed.login_link=Proceed to login page | ||||
| installed.message=Tables were created successfully. You can logon as admin with empty password. For security reasons, please <br/>change your password immediately and remove /webim/install folder from your server. | ||||
| installed.title=Application installed successfully | ||||
| menu.agents=Agents list | ||||
| menu.main=Main | ||||
| menu.operator=You are {0} | ||||
| no_such_operator=No such operator | ||||
| page.gen_button.choose_image=Choose image | ||||
| page.gen_button.choose_locale=Target locale | ||||
| page.gen_button.include_site_name=Include host name into code | ||||
| page.gen_button.secure_links=Use secure links (https) | ||||
| page_agent.create_new=Here you can create new operator | ||||
| page_agents.agent_commonname=International name | ||||
| page_analysis.full.text.search=User name or message text search: | ||||
| page_search.intro=Search for chat history of a specified user or a specified phrase in a message. | ||||
| app.title=Web Instant Messenger | ||||
| site.url=http://i-services.ru | ||||
| site.title=i-services.ru | ||||
| company.title=Internet Services | ||||
| page.main_layout.meta_keyword=live chat,live help,live support | ||||
| page.main_layout.meta_description=Live chat, live help, and live support for websites | ||||
| page_login.title=Login | ||||
| page_login.login=Login: | ||||
| page_login.password=Password: | ||||
| page_login.remember=Remember | ||||
| page_login.error=Entered login/password is incorrect | ||||
| agent.not_logged_in=Your session is expired please login again | ||||
| page_client.pending_users=Your can find awaiting visitors. | ||||
| chat.window.title.agent=Web Messenger | ||||
| chat.window.title.user=Web Messenger | ||||
| chat.window.product_name=Web <span class="grey">Messenger</span> | ||||
| chat.window.close_title=Close chat | ||||
| chat.window.chatting_with=You chat with: | ||||
| chat.window.poweredby=Powered by: | ||||
| chat.window.poweredreftext=i-services.ru | ||||
| chat.window.send_message=Send message | ||||
| chat.window.send_message_short=Send (Ctrl-Enter) | ||||
| chat.window.toolbar.mail_history=Send chat history by e-mail | ||||
| chat.window.toolbar.refresh=Refresh | ||||
| chat.client.name=Your name: | ||||
| chat.client.changename=Change name | ||||
| chat.status.operator.left=Operator {0} left the chat | ||||
| chat.status.user.left=Visitor {0} left the chat | ||||
| chat.status.user.dead=Visitor closed chat window | ||||
| chat.status.operator.dead=Operator has connection issues, we temporarily moved you to foreground queue. Sorry for keeping you waiting. | ||||
| chat.status.operator.joined=Operator {0} joined the chat | ||||
| chat.status.user.changedname=Visitor changed the name {0} to {1} | ||||
| chat.status.user.reopenedthread=Visitor joined chat again | ||||
| chat.status.operator.changed=Operator {0} changed operator {1} | ||||
| chat.default.username=Visitor | ||||
| chat.error_page.title=Error | ||||
| chat.error_page.head=Error occurred: | ||||
| chat.error_page.close=Close... | ||||
| page.chat.old_browser.title=Please, use newer browser | ||||
| page.chat.old_browser.close=Close... | ||||
| page.chat.old_browser.content=Your web browser is not fully supported by Web Messenger. \nPlease, use one of the following web browsers: \n<p><ul>\n<li>Internet Explorer 5.5+\n<li>Firefox 1.0+\n<li>Opera 8.0+\n<li>Mozilla 1.4+\n<li>Netscape 7.1+\n<li>Safari 1.2+\n</ul></p>\nAlso, we support some old browsers:\n<p><ul>\n<li>Internet Explorer 5.0\n<li>Opera 7.0\n</ul></p> | ||||
| chat.wait=Thank you for contacting us. An operator will be with you shortly... | ||||
| mailthread.title=Send chat history<br>by mail | ||||
| mailthread.enter_email=Enter your e-mail: | ||||
| mailthread.perform=Send | ||||
| mailthread.close=Close... | ||||
| chat.mailthread.sent.title=Sent | ||||
| chat.mailthread.sent.content=History of your chat was sent on address {0} | ||||
| chat.mailthread.sent.closewindow=Click on this link to close the window | ||||
| chat.mailthread.sent.close=Close... | ||||
| chat.thread.state_wait=In queue | ||||
| chat.thread.state_wait_for_another_agent=Waiting for operator | ||||
| chat.thread.state_chatting_with_agent=In chat | ||||
| chat.thread.state_closed=Closed | ||||
| clients.title=List of awaiting visitors | ||||
| clients.no_clients=The of awaiting visitors is empty | ||||
| clients.intro=The page displays list of awaiting visitors. | ||||
| clients.how_to=To answer the visitor click on his/her name in the list. | ||||
| clients.queue.prio=Priority visitors queue | ||||
| clients.queue.wait=Waiting for operator for the first time | ||||
| clients.queue.chat=Visitors in dialogs | ||||
| pending.table.head.name=Name | ||||
| pending.table.head.contactid=Visitor's address | ||||
| pending.table.head.state=State | ||||
| pending.table.head.operator=Operator | ||||
| pending.table.head.total=Total time | ||||
| pending.table.head.waittime=Waiting time | ||||
| pending.table.head.etc=Misc | ||||
| pending.table.speak=Click to chat with the visitor | ||||
| pending.table.view=Watch the chat | ||||
| pending.table.ban=Ban the visitor | ||||
| thread.chat_log=Chat log | ||||
| thread.back_to_search=Go to search | ||||
| thread.intro=The page displays chat | ||||
| page_analysis.search.title=Chats history | ||||
| page.analysis.search.head_name=Name | ||||
| page.analysis.search.head_host=Visitor's address | ||||
| page.analysis.search.head_operator=Operator | ||||
| page.analysis.search.head_time=Time in chat | ||||
| common.asterisk_explanation=<b><font class="red">*</font></b> - mandatory fields | ||||
| page_agents.title=Agents | ||||
| page_agents.agents=Agents full list: | ||||
| page_agents.new_agent=Create new agent... | ||||
| page_agents.agent_name=Name | ||||
| page_agents.login=Login | ||||
| page_agents.intro=This page displays list of company agents it also allows add new ones if you permissions | ||||
| page_agent.title=Operator details | ||||
| page_agent.intro=This page displays agent details, if you have access rights you can edit them. | ||||
| page_agent.error.duplicate_login=Please choose another login, because agent with entered login is already registered in the system. | ||||
| my_settings.error.password_match=Entered passwords do not match | ||||
| topMenu.admin=Administration | ||||
| topMenu.users=Visitors | ||||
| topMenu.logoff=Exit | ||||
| leftMenu.client_agents=Agents | ||||
| leftMenu.client_gen_button=Button code | ||||
| admin.content.description=Functions available for power users. | ||||
| admin.content.client_agents=Create, delete company agents. Manage theirs permissions. | ||||
| admin.content.client_gen_button=Button HTML code generation. | ||||
| page.gen_button.title=Button HTML code generation | ||||
| page.gen_button.intro=You can generate HTML code to place at your site here. | ||||
| page.gen_button.code=HTML code | ||||
| page.gen_button.sample=Example | ||||
| page.gen_button.code.description=<strong>Caution!</strong> Please don't change<br/> the code manually because<br/> we don't guarantee that<br/> it will work! | ||||
| mail.user.history.subject=Web Messenger: dialog history | ||||
| mail.user.history.body=Hello, {0}!\n\nYour chat history: \n\n{1}\n--- \nKind Regards,\nThe I-Services Support Team | ||||
| errors.header=<font color="#c13030"><b>Correct the mistakes:</b><br/><ul> | ||||
| errors.prefix=<li class="error"> | ||||
| errors.suffix=</li> | ||||
| errors.footer=</ul></font> | ||||
| errors.required=Please fill "{0}".   | ||||
| form.field.login=Login | ||||
| form.field.login.description=Login can consist of small Latin letters<br/> and underscore. | ||||
| form.field.agent_name=Name | ||||
| form.field.agent_name.description=This name will be seen by your visitors. | ||||
| form.field.password_confirm=Confirmation | ||||
| form.field.password_confirm.description=Confirm new password | ||||
| form.field.password=Password | ||||
| form.field.password.description= | ||||
| button.enter=Enter | ||||
| button.save=Save | ||||
| button.search=Search | ||||
| tag.pagination.info=Page {0} of {1}, {2}-{3} from {4} | ||||
| tag.pagination.no_items=Found 0 elements | ||||
| image.chat.history=/webim/images/en/history.gif | ||||
| image.chat.message=/webim/images/en/message.gif | ||||
| image.button.login=/webim/images/en/login.gif | ||||
| image.button.save=/webim/images/en/save.gif | ||||
| image.button.search=/webim/images/en/search.gif | ||||
| chat.came.from=Vistor came from page {0} | ||||
| content.history=Search the dialogs history | ||||
| content.logoff=Log out of the system. | ||||
| form.field.agent_commonname=International name (Latin) | ||||
| form.field.agent_commonname.description=This name will be seen by your visitors | ||||
| install.create_db_link=Create tables in MySQL database | ||||
| install.license=Software license agreement | ||||
| install.message=We are ready to complete installation by creating tables. | ||||
| install.title=System setup | ||||
| installed.login_link=Proceed to login page | ||||
| installed.message=Tables were created successfully. You can logon as admin with empty password. For security reasons, please <br/>change your password immediately and remove /webim/install folder from your server. | ||||
| installed.title=Application installed successfully | ||||
| menu.agents=Agents list | ||||
| menu.main=Main | ||||
| menu.operator=You are {0} | ||||
| no_such_operator=No such operator | ||||
| page.gen_button.choose_image=Choose image | ||||
| page.gen_button.choose_locale=Target locale | ||||
| page.gen_button.include_site_name=Include host name into code | ||||
| page.gen_button.secure_links=Use secure links (https) | ||||
| page_agent.create_new=Here you can create new operator | ||||
| page_agents.agent_commonname=International name | ||||
| page_analysis.full.text.search=User name or message text search: | ||||
| page_search.intro=Search for chat history of a specified user or a specified phrase in a message. | ||||
|  | ||||
| @ -1,152 +1,152 @@ | ||||
| app.title=Вэб мессенджер | ||||
| site.url=http://i-services.ru | ||||
| site.title=i-services.ru | ||||
| company.title=Internet Services | ||||
| page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm  | ||||
| page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем | ||||
| page_login.title=Вход в систему | ||||
| page_login.login=Логин: | ||||
| page_login.password=Пароль: | ||||
| page_login.remember=Запомнить | ||||
| page_login.error=Введен неправильный логин или пароль | ||||
| agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова | ||||
| page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей. | ||||
| chat.window.title.agent=Вэб Мессенджер | ||||
| chat.window.title.user=Вэб Мессенджер | ||||
| chat.window.product_name=Вэб <span class="grey">Мессенджер</span> | ||||
| chat.window.close_title=Закрыть диалог | ||||
| chat.window.chatting_with=Вы общаетесь с: | ||||
| chat.window.poweredby=Предоставлено: | ||||
| chat.window.poweredreftext=i-services.ru | ||||
| chat.window.send_message=Отправить сообщение | ||||
| chat.window.send_message_short=Отправить (Ctrl-Enter) | ||||
| chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте | ||||
| chat.window.toolbar.refresh=Обновить содержимое диалога | ||||
| chat.client.name=Ваше имя: | ||||
| chat.client.changename=Изменить имя | ||||
| chat.status.operator.left=Оператор {0} покинул диалог | ||||
| chat.status.user.left=Посетитель {0} покинул диалог | ||||
| chat.status.user.dead=Посетитель закрыл окно диалога | ||||
| chat.status.operator.dead=У оператора возникли проблемы со связью, мы временно перевели Вас в приоритетную очередь. Приносим извинения за Ваше ожидание. | ||||
| chat.status.operator.joined=Оператор {0} включился в разговор | ||||
| chat.status.user.changedname=Посетитель сменил имя {0} на {1} | ||||
| chat.status.user.reopenedthread=Посетитель заново вошел в диалог | ||||
| chat.status.operator.changed=Оператор {0} сменил оператора {1} | ||||
| chat.default.username=Посетитель | ||||
| chat.error_page.title=Ошибка | ||||
| chat.error_page.head=Произошла ошибка: | ||||
| chat.error_page.close=Закрыть... | ||||
| page.chat.old_browser.title=Используйте более новый browser | ||||
| page.chat.old_browser.close=Закрыть... | ||||
| page.chat.old_browser.content=К сожалению, для работы этой страницы необходим более новый браузер. Для лучшего просмотра используйте:\n<p><ul>\n<li>Internet Explorer 5.5+\n<li>Firefox 1.0+\n<li>Opera 8.0+\n<li>Mozilla 1.4+\n<li>Netscape 7.1+\n<li>Safari 1.2+\n</ul></p>\nТакже поддерживаются некоторые старые браузеры:\n<p><ul>\n<li>Internet Explorer 5.0\n<li>Opera 7.0\n</ul></p> | ||||
| chat.wait=Пожалуйста, подождите немного, к Вам присоединится оператор.. | ||||
| mailthread.title=Отправить историю разговора<br>на почтовый ящик | ||||
| mailthread.enter_email=Введите Ваш E-mail: | ||||
| mailthread.perform=Отправить | ||||
| mailthread.close=Закрыть... | ||||
| chat.mailthread.sent.title=Отправлено | ||||
| chat.mailthread.sent.content=История Вашего разговора была отправлена на адрес {0} | ||||
| chat.mailthread.sent.closewindow=Нажмите на эту ссылку чтобы закрыть окно | ||||
| chat.mailthread.sent.close=Закрыть... | ||||
| chat.thread.state_wait=В очереди | ||||
| chat.thread.state_wait_for_another_agent=Ожидание оператора | ||||
| chat.thread.state_chatting_with_agent=В диалоге | ||||
| chat.thread.state_closed=Закрыто | ||||
| clients.title=Список ожидающих посетителей | ||||
| clients.no_clients=В этой очереди ожидающих посетителей нет | ||||
| clients.intro=На этой странице можно просмотреть список ожидающих ответа посетителей. | ||||
| clients.how_to=Для ответа посетителю кликните на соответствующее имя в списке. | ||||
| clients.queue.prio=Приоритетная очередь посетителей | ||||
| clients.queue.wait=Ожидающие оператора в первый раз | ||||
| clients.queue.chat=Посетители в диалогах | ||||
| pending.table.head.name=Имя | ||||
| pending.table.head.contactid=Адрес посетителя | ||||
| pending.table.head.state=Состояние | ||||
| pending.table.head.operator=Оператор | ||||
| pending.table.head.total=Общее время | ||||
| pending.table.head.waittime=Время ожидания | ||||
| pending.table.head.etc=Разное | ||||
| pending.table.speak=Нажмите для того, чтобы обслужить посетителя | ||||
| pending.table.view=Подключиться к диалогу в режиме просмотра | ||||
| pending.table.ban=Пометить посетителя как нежелательного | ||||
| thread.chat_log=Протокол разговора | ||||
| thread.back_to_search=Перейти в поиск | ||||
| thread.intro=На данной странице Вы можете просмотреть диалог. | ||||
| page_analysis.search.title=История диалогов | ||||
| page.analysis.search.head_name=Имя | ||||
| page.analysis.search.head_host=Адрес посетителя | ||||
| page.analysis.search.head_operator=Оператор | ||||
| page.analysis.search.head_time=Время в диалоге | ||||
| common.asterisk_explanation=<b><font class="red">*</font></b> - поля, обязательные для заполнения | ||||
| page_agents.title=Агенты | ||||
| page_agents.agents=Полный список агентов: | ||||
| page_agents.new_agent=Создать нового агента... | ||||
| page_agents.agent_name=Имя | ||||
| page_agents.login=Логин | ||||
| page_agents.intro=На этой странице можно просмотреть список агентов компании, добавить нового при наличии соответствующих прав доступа | ||||
| page_agent.title=Детали агента | ||||
| page_agent.intro=На этой странице Вы можете просмотреть детали и свойства агента и отредактировать их | ||||
| page_agent.error.duplicate_login=Выберите другой логин, т.к. агент с введенным логином уже зарегистрирован в системе. | ||||
| my_settings.error.password_match=Введенные пароли должны совпадать | ||||
| topMenu.admin=Операторское меню | ||||
| topMenu.users=Посетители | ||||
| topMenu.logoff=Выход | ||||
| leftMenu.client_agents=Агенты | ||||
| leftMenu.client_gen_button=Код кнопки | ||||
| admin.content.description=Набор функций, доступный только зарегистрированным операторам | ||||
| admin.content.client_agents=Создание, удаление агентов компании. Управление их правами и возможностями. | ||||
| admin.content.client_gen_button=Получение HTML-кода для кнопки "Вэб Мессенджера". | ||||
| page.gen_button.title=Получение HTML-кода кнопки | ||||
| page.gen_button.intro=На этой странице Вы можете получить HTML-код кнопки "Вэб Мессенджера" для размещения на своем сайте. | ||||
| page.gen_button.code=HTML-код | ||||
| page.gen_button.sample=Пример | ||||
| page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется! | ||||
| mail.user.history.subject=Вэб Мессенджер: история диалога | ||||
| mail.user.history.body=Здраствуйте, {0}!\n\nПо Вашему запросу, высылаем историю: \n\n{1}\n--- \nС уважением,\nСлужба поддержки i-services.ru | ||||
| errors.header=<font color="#c13030"><b>Исправьте ошибки:</b><br/><br/><ul> | ||||
| errors.prefix=<li class="error"> | ||||
| errors.suffix=</li> | ||||
| errors.footer=</ul></font> | ||||
| errors.required=Заполните поле "{0}".   | ||||
| form.field.login=Логин | ||||
| form.field.login.description=Логин может состоять из маленьких латинских<br/> букв и знака подчеркивания. | ||||
| form.field.agent_name=Имя | ||||
| form.field.agent_name.description=Под этим именем Вас увидят ваши посетители, <br/> по нему же к Вам будет обращаться система. | ||||
| form.field.password_confirm=Подтверждение | ||||
| form.field.password_confirm.description=Подтвердите введенный пароль | ||||
| form.field.password=Пароль | ||||
| form.field.password.description= | ||||
| button.enter=Войти | ||||
| button.save=Сохранить | ||||
| button.search=Искать | ||||
| tag.pagination.info=Страница {0} из {1}, показаны {2}-{3} из {4} | ||||
| tag.pagination.no_items=Ничего не найдено | ||||
| image.chat.history=/webim/images/ru/history.gif | ||||
| image.chat.message=/webim/images/ru/message.gif | ||||
| image.button.login=/webim/images/ru/login.gif | ||||
| image.button.save=/webim/images/ru/save.gif | ||||
| image.button.search=/webim/images/ru/search.gif | ||||
| chat.came.from=Посетитель пришел со страницы {0} | ||||
| content.history=Поиск по истории диалогов | ||||
| content.logoff=Покинуть систему. | ||||
| form.field.agent_commonname=Интернациональное имя (латиницей) | ||||
| form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран | ||||
| install.create_db_link=Создать необходимые таблицы в базе данных | ||||
| install.license=Лицензионное соглашение о программном обеспечении | ||||
| install.message=Для окончания установки необходимо создать таблицы. | ||||
| install.title=Установка | ||||
| installed.login_link=Войти в систему | ||||
| installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.<br/>В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. | ||||
| installed.title=Установка завершена | ||||
| menu.agents=Список агентов | ||||
| menu.main=Главная | ||||
| menu.operator=Вы {0} | ||||
| no_such_operator=Запрашиваемая учетная запись не существует | ||||
| page.gen_button.choose_image=Выбор картинки | ||||
| page.gen_button.choose_locale=Для какой локали создавать кнопку | ||||
| page.gen_button.include_site_name=Включать имя сайта в код | ||||
| page.gen_button.secure_links=Использовать защищенное соединение (https) | ||||
| page_agent.create_new=Создание нового оператора | ||||
| page_agents.agent_commonname=Интернациональное имя | ||||
| page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: | ||||
| page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. | ||||
| app.title=Вэб мессенджер | ||||
| site.url=http://i-services.ru | ||||
| site.title=i-services.ru | ||||
| company.title=Internet Services | ||||
| page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm  | ||||
| page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем | ||||
| page_login.title=Вход в систему | ||||
| page_login.login=Логин: | ||||
| page_login.password=Пароль: | ||||
| page_login.remember=Запомнить | ||||
| page_login.error=Введен неправильный логин или пароль | ||||
| agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова | ||||
| page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей. | ||||
| chat.window.title.agent=Вэб Мессенджер | ||||
| chat.window.title.user=Вэб Мессенджер | ||||
| chat.window.product_name=Вэб <span class="grey">Мессенджер</span> | ||||
| chat.window.close_title=Закрыть диалог | ||||
| chat.window.chatting_with=Вы общаетесь с: | ||||
| chat.window.poweredby=Предоставлено: | ||||
| chat.window.poweredreftext=i-services.ru | ||||
| chat.window.send_message=Отправить сообщение | ||||
| chat.window.send_message_short=Отправить (Ctrl-Enter) | ||||
| chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте | ||||
| chat.window.toolbar.refresh=Обновить содержимое диалога | ||||
| chat.client.name=Ваше имя: | ||||
| chat.client.changename=Изменить имя | ||||
| chat.status.operator.left=Оператор {0} покинул диалог | ||||
| chat.status.user.left=Посетитель {0} покинул диалог | ||||
| chat.status.user.dead=Посетитель закрыл окно диалога | ||||
| chat.status.operator.dead=У оператора возникли проблемы со связью, мы временно перевели Вас в приоритетную очередь. Приносим извинения за Ваше ожидание. | ||||
| chat.status.operator.joined=Оператор {0} включился в разговор | ||||
| chat.status.user.changedname=Посетитель сменил имя {0} на {1} | ||||
| chat.status.user.reopenedthread=Посетитель заново вошел в диалог | ||||
| chat.status.operator.changed=Оператор {0} сменил оператора {1} | ||||
| chat.default.username=Посетитель | ||||
| chat.error_page.title=Ошибка | ||||
| chat.error_page.head=Произошла ошибка: | ||||
| chat.error_page.close=Закрыть... | ||||
| page.chat.old_browser.title=Используйте более новый browser | ||||
| page.chat.old_browser.close=Закрыть... | ||||
| page.chat.old_browser.content=К сожалению, для работы этой страницы необходим более новый браузер. Для лучшего просмотра используйте:\n<p><ul>\n<li>Internet Explorer 5.5+\n<li>Firefox 1.0+\n<li>Opera 8.0+\n<li>Mozilla 1.4+\n<li>Netscape 7.1+\n<li>Safari 1.2+\n</ul></p>\nТакже поддерживаются некоторые старые браузеры:\n<p><ul>\n<li>Internet Explorer 5.0\n<li>Opera 7.0\n</ul></p> | ||||
| chat.wait=Пожалуйста, подождите немного, к Вам присоединится оператор.. | ||||
| mailthread.title=Отправить историю разговора<br>на почтовый ящик | ||||
| mailthread.enter_email=Введите Ваш E-mail: | ||||
| mailthread.perform=Отправить | ||||
| mailthread.close=Закрыть... | ||||
| chat.mailthread.sent.title=Отправлено | ||||
| chat.mailthread.sent.content=История Вашего разговора была отправлена на адрес {0} | ||||
| chat.mailthread.sent.closewindow=Нажмите на эту ссылку чтобы закрыть окно | ||||
| chat.mailthread.sent.close=Закрыть... | ||||
| chat.thread.state_wait=В очереди | ||||
| chat.thread.state_wait_for_another_agent=Ожидание оператора | ||||
| chat.thread.state_chatting_with_agent=В диалоге | ||||
| chat.thread.state_closed=Закрыто | ||||
| clients.title=Список ожидающих посетителей | ||||
| clients.no_clients=В этой очереди ожидающих посетителей нет | ||||
| clients.intro=На этой странице можно просмотреть список ожидающих ответа посетителей. | ||||
| clients.how_to=Для ответа посетителю кликните на соответствующее имя в списке. | ||||
| clients.queue.prio=Приоритетная очередь посетителей | ||||
| clients.queue.wait=Ожидающие оператора в первый раз | ||||
| clients.queue.chat=Посетители в диалогах | ||||
| pending.table.head.name=Имя | ||||
| pending.table.head.contactid=Адрес посетителя | ||||
| pending.table.head.state=Состояние | ||||
| pending.table.head.operator=Оператор | ||||
| pending.table.head.total=Общее время | ||||
| pending.table.head.waittime=Время ожидания | ||||
| pending.table.head.etc=Разное | ||||
| pending.table.speak=Нажмите для того, чтобы обслужить посетителя | ||||
| pending.table.view=Подключиться к диалогу в режиме просмотра | ||||
| pending.table.ban=Пометить посетителя как нежелательного | ||||
| thread.chat_log=Протокол разговора | ||||
| thread.back_to_search=Перейти в поиск | ||||
| thread.intro=На данной странице Вы можете просмотреть диалог. | ||||
| page_analysis.search.title=История диалогов | ||||
| page.analysis.search.head_name=Имя | ||||
| page.analysis.search.head_host=Адрес посетителя | ||||
| page.analysis.search.head_operator=Оператор | ||||
| page.analysis.search.head_time=Время в диалоге | ||||
| common.asterisk_explanation=<b><font class="red">*</font></b> - поля, обязательные для заполнения | ||||
| page_agents.title=Агенты | ||||
| page_agents.agents=Полный список агентов: | ||||
| page_agents.new_agent=Создать нового агента... | ||||
| page_agents.agent_name=Имя | ||||
| page_agents.login=Логин | ||||
| page_agents.intro=На этой странице можно просмотреть список агентов компании, добавить нового при наличии соответствующих прав доступа | ||||
| page_agent.title=Детали агента | ||||
| page_agent.intro=На этой странице Вы можете просмотреть детали и свойства агента и отредактировать их | ||||
| page_agent.error.duplicate_login=Выберите другой логин, т.к. агент с введенным логином уже зарегистрирован в системе. | ||||
| my_settings.error.password_match=Введенные пароли должны совпадать | ||||
| topMenu.admin=Операторское меню | ||||
| topMenu.users=Посетители | ||||
| topMenu.logoff=Выход | ||||
| leftMenu.client_agents=Агенты | ||||
| leftMenu.client_gen_button=Код кнопки | ||||
| admin.content.description=Набор функций, доступный только зарегистрированным операторам | ||||
| admin.content.client_agents=Создание, удаление агентов компании. Управление их правами и возможностями. | ||||
| admin.content.client_gen_button=Получение HTML-кода для кнопки "Вэб Мессенджера". | ||||
| page.gen_button.title=Получение HTML-кода кнопки | ||||
| page.gen_button.intro=На этой странице Вы можете получить HTML-код кнопки "Вэб Мессенджера" для размещения на своем сайте. | ||||
| page.gen_button.code=HTML-код | ||||
| page.gen_button.sample=Пример | ||||
| page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется! | ||||
| mail.user.history.subject=Вэб Мессенджер: история диалога | ||||
| mail.user.history.body=Здраствуйте, {0}!\n\nПо Вашему запросу, высылаем историю: \n\n{1}\n--- \nС уважением,\nСлужба поддержки i-services.ru | ||||
| errors.header=<font color="#c13030"><b>Исправьте ошибки:</b><br/><ul> | ||||
| errors.prefix=<li class="error"> | ||||
| errors.suffix=</li> | ||||
| errors.footer=</ul></font> | ||||
| errors.required=Заполните поле "{0}".   | ||||
| form.field.login=Логин | ||||
| form.field.login.description=Логин может состоять из маленьких латинских<br/> букв и знака подчеркивания. | ||||
| form.field.agent_name=Имя | ||||
| form.field.agent_name.description=Под этим именем Вас увидят ваши посетители, <br/> по нему же к Вам будет обращаться система. | ||||
| form.field.password_confirm=Подтверждение | ||||
| form.field.password_confirm.description=Подтвердите введенный пароль | ||||
| form.field.password=Пароль | ||||
| form.field.password.description= | ||||
| button.enter=Войти | ||||
| button.save=Сохранить | ||||
| button.search=Искать | ||||
| tag.pagination.info=Страница {0} из {1}, показаны {2}-{3} из {4} | ||||
| tag.pagination.no_items=Ничего не найдено | ||||
| image.chat.history=/webim/images/ru/history.gif | ||||
| image.chat.message=/webim/images/ru/message.gif | ||||
| image.button.login=/webim/images/ru/login.gif | ||||
| image.button.save=/webim/images/ru/save.gif | ||||
| image.button.search=/webim/images/ru/search.gif | ||||
| chat.came.from=Посетитель пришел со страницы {0} | ||||
| content.history=Поиск по истории диалогов | ||||
| content.logoff=Покинуть систему. | ||||
| form.field.agent_commonname=Интернациональное имя (латиницей) | ||||
| form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран | ||||
| install.create_db_link=Создать необходимые таблицы в базе данных | ||||
| install.license=Лицензионное соглашение о программном обеспечении | ||||
| install.message=Для окончания установки необходимо создать таблицы. | ||||
| install.title=Установка | ||||
| installed.login_link=Войти в систему | ||||
| installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.<br/>В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. | ||||
| installed.title=Установка завершена | ||||
| menu.agents=Список агентов | ||||
| menu.main=Главная | ||||
| menu.operator=Вы {0} | ||||
| no_such_operator=Запрашиваемая учетная запись не существует | ||||
| page.gen_button.choose_image=Выбор картинки | ||||
| page.gen_button.choose_locale=Для какой локали создавать кнопку | ||||
| page.gen_button.include_site_name=Включать имя сайта в код | ||||
| page.gen_button.secure_links=Использовать защищенное соединение (https) | ||||
| page_agent.create_new=Создание нового оператора | ||||
| page_agents.agent_commonname=Интернациональное имя | ||||
| page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: | ||||
| page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. | ||||
|  | ||||
| @ -1,88 +1,76 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/chat.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("thread.chat_log") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("thread.chat_log") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <?php echo getstring("thread.intro") ?>
 | ||||
| 
 | ||||
| <br/><br/> | ||||
| 
 | ||||
| <table border="0" cellpadding="0" cellspacing="0"> | ||||
| <tr> | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'> | ||||
| 		<?php echo getstring("thread.chat_log") ?>
 | ||||
| 	</span></td> | ||||
| </tr> | ||||
| <tr> | ||||
| 	<td height='45' class='table'> | ||||
| 		<span class="message"> | ||||
|                         <?php foreach( $page['threadMessages'] as $message ) { ?>
 | ||||
|                         	<?php echo $message ?>	
 | ||||
|                         <?php } ?>			
 | ||||
| 		</span> | ||||
| 	</td> | ||||
| </tr> | ||||
| <tr><td height='2' colspan='1'></td></tr><tr><td bgcolor='#e1e1e1' colspan='1'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='1'></td></tr> | ||||
| </table> | ||||
| 
 | ||||
| <br /> | ||||
| <a href="/webim/operator/history.php"> | ||||
| 	<?php echo getstring("thread.back_to_search") ?></a>
 | ||||
| <br /> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/chat.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("thread.chat_log") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
| 		<h1><?php echo getstring("thread.chat_log") ?></h1>
 | ||||
| 	 | ||||
| 
 | ||||
| 	 | ||||
| <?php echo getstring("thread.intro") ?>
 | ||||
| 
 | ||||
| <br/><br/> | ||||
| 
 | ||||
| <table border="0" cellpadding="0" cellspacing="0"> | ||||
| <tr> | ||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'> | ||||
| 		<?php echo getstring("thread.chat_log") ?>
 | ||||
| 	</span></td> | ||||
| </tr> | ||||
| <tr> | ||||
| 	<td height='45' class='table'> | ||||
| 		<span class="message"> | ||||
|                         <?php foreach( $page['threadMessages'] as $message ) { ?>
 | ||||
|                         	<?php echo $message ?>	
 | ||||
|                         <?php } ?>			
 | ||||
| 		</span> | ||||
| 	</td> | ||||
| </tr> | ||||
| <tr><td height='2' colspan='1'></td></tr><tr><td bgcolor='#e1e1e1' colspan='1'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='1'></td></tr> | ||||
| </table> | ||||
| 
 | ||||
| <br /> | ||||
| <a href="/webim/operator/history.php"> | ||||
| 	<?php echo getstring("thread.back_to_search") ?></a>
 | ||||
| <br /> | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
| @ -1,117 +1,111 @@ | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_analysis.search.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page_analysis.search.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("page_search.intro") ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <form name="searchForm" method="get" action="/webim/operator/history.php"> | ||||
| <table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 	<tr> | ||||
| 		<td class="formauth" colspan="3"><?php echo getstring("page_analysis.full.text.search") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<td class="formauth"><input type="text" name="q" size="80" value="<?php echo form_value('q') ?>" class="formauth"/></td> | ||||
| 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | ||||
| 		<td class="formauth"> | ||||
| 			<input type="image" name="" src='<?php echo getstring("image.button.search") ?>' border="0" alt='<?php echo getstring("button.search") ?>'/> | ||||
| 		</td> | ||||
| 	</tr> | ||||
| </table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| </form> | ||||
| 
 | ||||
| <br/> | ||||
| <?php if( $page['pagination'] && $page['pagination.items'] ) { ?>
 | ||||
| 	<table cellpadding="0" cellspacing="0" border="0" width="100%"> | ||||
| 		<tr> | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_name") ?></span></td><td width='3'></td>
 | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_host") ?></span></td><td width='3'></td>
 | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_operator") ?></span></td><td width='3'></td>
 | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_time") ?></span></td>
 | ||||
| 		</tr> | ||||
| 		<?php foreach( $page['pagination.items'] as $chatthread ) { ?>
 | ||||
| 			<tr> | ||||
| 				<td height='30' class='table'> | ||||
| 					<a href="/webim/operator/threadprocessor.php?threadid=<?php echo $chatthread['threadid'] ?>" target="_blank" onclick="this.newWindow = window.open('/webim/operator/threadprocessor.php?threadid=<?php echo $chatthread['threadid'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=600,height=420,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo htmlspecialchars($chatthread['userName']) ?></a>
 | ||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 				<td height='30' class='table'> | ||||
| 					<?php echo htmlspecialchars($chatthread['remote']) ?>
 | ||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 				<td height='30' class='table'> | ||||
|         			<?php if( $chatthread['agentName'] ) { ?><?php echo htmlspecialchars($chatthread['agentName']) ?><?php } ?>
 | ||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 				<td height='30' class='table'> | ||||
| 					<?php echo date("d M Y H:i:s", $chatthread['created']) ?>,  <?php echo date_diff($chatthread['modified']-$chatthread['created']) ?>
 | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 			<tr><td height='2' colspan='7'></td></tr><tr><td bgcolor='#e1e1e1' colspan='7'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='7'></td></tr> | ||||
| 		<?php } ?>
 | ||||
| 	</table> | ||||
| 	<br /> | ||||
| 	<?php echo generate_pagination($page['pagination']) ?>
 | ||||
| <?php } ?>
 | ||||
| <?php if( $page['pagination'] && !$page['pagination.items'] ) { ?>
 | ||||
| 	<br/><br/> | ||||
| 	<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 		<span class="table"> | ||||
| 			<?php echo getstring("tag.pagination.no_items") ?>
 | ||||
| 		</span> | ||||
| 	</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| <?php } ?>
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
| <?php | ||||
| /* | ||||
|  * This file is part of Web Instant Messenger project. | ||||
|  * | ||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||
|  * All rights reserved. This program and the accompanying materials | ||||
|  * are made available under the terms of the Eclipse Public License v1.0 | ||||
|  * which accompanies this distribution, and is available at | ||||
|  * http://www.eclipse.org/legal/epl-v10.html | ||||
|  * | ||||
|  * Contributors: | ||||
|  *    Evgeny Gryaznov - initial API and implementation | ||||
|  */ | ||||
| ?>
 | ||||
| <html> | ||||
| <head> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | ||||
| 
 | ||||
| 
 | ||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||
| <title> | ||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_analysis.search.title") ?>
 | ||||
| </title> | ||||
| 
 | ||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||
| </head> | ||||
| 
 | ||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | ||||
| 
 | ||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||
| <tr> | ||||
| <td valign="top" class="text"> | ||||
| 	 | ||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||
| 		<h1><?php echo getstring("page_analysis.search.title") ?></h1>
 | ||||
|  </td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table> 
 | ||||
| 	 | ||||
| 
 | ||||
| 	<?php echo getstring("page_search.intro") ?>
 | ||||
| <br /> | ||||
| <br /> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <form name="searchForm" method="get" action="/webim/operator/history.php"> | ||||
| <table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 	<tr> | ||||
| 		<td class="formauth" colspan="3"><?php echo getstring("page_analysis.full.text.search") ?></td>
 | ||||
| 	</tr> | ||||
| 	<tr><td colspan="3" height="2"></td></tr> | ||||
| 	<tr> | ||||
| 		<td class="formauth"><input type="text" name="q" size="80" value="<?php echo form_value('q') ?>" class="formauth"/></td> | ||||
| 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | ||||
| 		<td class="formauth"> | ||||
| 			<input type="image" name="" src='<?php echo getstring("image.button.search") ?>' border="0" alt='<?php echo getstring("button.search") ?>'/> | ||||
| 		</td> | ||||
| 	</tr> | ||||
| </table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| </form> | ||||
| 
 | ||||
| <br/> | ||||
| <?php if( $page['pagination'] && $page['pagination.items'] ) { ?>
 | ||||
| 	<table cellpadding="0" cellspacing="0" border="0" width="100%"> | ||||
| 		<tr> | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_name") ?></span></td><td width='3'></td>
 | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_host") ?></span></td><td width='3'></td>
 | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_operator") ?></span></td><td width='3'></td>
 | ||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_time") ?></span></td>
 | ||||
| 		</tr> | ||||
| 		<?php foreach( $page['pagination.items'] as $chatthread ) { ?>
 | ||||
| 			<tr> | ||||
| 				<td height='30' class='table'> | ||||
| 					<a href="/webim/operator/threadprocessor.php?threadid=<?php echo $chatthread['threadid'] ?>" target="_blank" onclick="this.newWindow = window.open('/webim/operator/threadprocessor.php?threadid=<?php echo $chatthread['threadid'] ?>', '', 'toolbar=0,scrollbars=1,location=0,status=1,menubar=0,width=600,height=420,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><?php echo htmlspecialchars($chatthread['userName']) ?></a>
 | ||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 				<td height='30' class='table'> | ||||
| 					<?php echo htmlspecialchars($chatthread['remote']) ?>
 | ||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 				<td height='30' class='table'> | ||||
|         			<?php if( $chatthread['agentName'] ) { ?><?php echo htmlspecialchars($chatthread['agentName']) ?><?php } ?>
 | ||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||
| 				<td height='30' class='table'> | ||||
| 					<?php echo date("d M Y H:i:s", $chatthread['created']) ?>,  <?php echo date_diff($chatthread['modified']-$chatthread['created']) ?>
 | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 			<tr><td height='2' colspan='7'></td></tr><tr><td bgcolor='#e1e1e1' colspan='7'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='7'></td></tr> | ||||
| 		<?php } ?>
 | ||||
| 	</table> | ||||
| 	<br /> | ||||
| 	<?php echo generate_pagination($page['pagination']) ?>
 | ||||
| <?php } ?>
 | ||||
| <?php if( $page['pagination'] && !$page['pagination.items'] ) { ?>
 | ||||
| 	<br/><br/> | ||||
| 	<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'> | ||||
| 		<span class="table"> | ||||
| 			<?php echo getstring("tag.pagination.no_items") ?>
 | ||||
| 		</span> | ||||
| 	</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table> | ||||
| <?php } ?>
 | ||||
| 
 | ||||
| </td> | ||||
| </tr> | ||||
| </table> | ||||
| 
 | ||||
| </body> | ||||
| </html> | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user