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 | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('libs/common.php'); | require('libs/common.php'); | ||||||
| require('libs/operator.php'); | require('libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $image = verifyparam("image","/^\w+$/", "webim"); | $image = verifyparam("image","/^\w+$/", "webim"); | ||||||
| $lang = verifyparam("lang", "/^\w\w$/", ""); | $lang = verifyparam("lang", "/^\w\w$/", ""); | ||||||
| if( !$lang || !in_array($lang,$available_locales) ) | if( !$lang || !in_array($lang,$available_locales) ) | ||||||
| 	$lang = $current_locale; | 	$lang = $current_locale; | ||||||
| 
 | 
 | ||||||
| $image_postfix = has_online_operators() ? "on" : "off"; | $image_postfix = has_online_operators() ? "on" : "off"; | ||||||
| $name = "images/webim/${image}_${lang}_${image_postfix}.gif"; | $name = "images/webim/${image}_${lang}_${image_postfix}.gif"; | ||||||
| 
 | 
 | ||||||
| $fp = fopen($name, 'rb') or die("no image"); | $fp = fopen($name, 'rb') or die("no image"); | ||||||
| header("Content-Type: image/gif"); | header("Content-Type: image/gif"); | ||||||
| header("Content-Length: ".filesize($name)); | header("Content-Length: ".filesize($name)); | ||||||
| fpassthru($fp); | fpassthru($fp); | ||||||
| exit; | exit; | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,68 +1,68 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('libs/common.php'); | require('libs/common.php'); | ||||||
| require('libs/chat.php'); | require('libs/chat.php'); | ||||||
| 
 | 
 | ||||||
| if( !isset($_GET['token']) || !isset($_GET['thread']) ) { | if( !isset($_GET['token']) || !isset($_GET['thread']) ) { | ||||||
| 
 | 
 | ||||||
| 	$thread = NULL; | 	$thread = NULL; | ||||||
| 	if( isset($_SESSION['threadid']) ) { | 	if( isset($_SESSION['threadid']) ) { | ||||||
| 		$thread = reopen_thread($_SESSION['threadid']); | 		$thread = reopen_thread($_SESSION['threadid']); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if( !$thread ) { | 	if( !$thread ) { | ||||||
| 		$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; | 		$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; | ||||||
| 		$remote = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR']; | 		$remote = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR']; | ||||||
| 		$visitor = $remote_visitor(); | 		$visitor = $remote_visitor(); | ||||||
| 		$thread = create_thread($visitor['name'], $remote, $referer,$current_locale); | 		$thread = create_thread($visitor['name'], $remote, $referer,$current_locale); | ||||||
| 		$_SESSION['threadid'] = $thread['threadid']; | 		$_SESSION['threadid'] = $thread['threadid']; | ||||||
| 		if( $referer ) { | 		if( $referer ) { | ||||||
| 			post_message($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referer))); | 			post_message($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referer))); | ||||||
| 		} | 		} | ||||||
| 		post_message($thread['threadid'],$kind_info,getstring('chat.wait')); | 		post_message($thread['threadid'],$kind_info,getstring('chat.wait')); | ||||||
| 	} | 	} | ||||||
| 	$threadid = $thread['threadid']; | 	$threadid = $thread['threadid']; | ||||||
| 	$token = $thread['ltoken']; | 	$token = $thread['ltoken']; | ||||||
| 	$level = get_remote_level($_SERVER['HTTP_USER_AGENT']); | 	$level = get_remote_level($_SERVER['HTTP_USER_AGENT']); | ||||||
| 	header("Location: ".dirname($_SERVER['PHP_SELF'])."/client.php?thread=$threadid&token=$token&level=$level"); | 	header("Location: ".dirname($_SERVER['PHP_SELF'])."/client.php?thread=$threadid&token=$token&level=$level"); | ||||||
| 	exit; | 	exit; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||||
| $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); | $level = verifyparam( "level", "/^(ajaxed|simple|old)$/"); | ||||||
| 
 | 
 | ||||||
| $thread = thread_by_id($threadid); | $thread = thread_by_id($threadid); | ||||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||||
| 	die("wrong thread"); | 	die("wrong thread"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| //$level = "simple";
 | //$level = "simple";
 | ||||||
| 
 | 
 | ||||||
| setup_chatview_for_user($thread, $level); | setup_chatview_for_user($thread, $level); | ||||||
| start_html_output(); | start_html_output(); | ||||||
| 
 | 
 | ||||||
| $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); | $pparam = verifyparam( "act", "/^(mailthread)$/", "default"); | ||||||
| if( $pparam == "mailthread" ) { | if( $pparam == "mailthread" ) { | ||||||
| 	require('view/chat_mailthread.php'); | 	require('view/chat_mailthread.php'); | ||||||
| } else if( $level == "ajaxed" ) { | } else if( $level == "ajaxed" ) { | ||||||
| 	require('view/chat_ajaxed.php'); | 	require('view/chat_ajaxed.php'); | ||||||
| } else if( $level == "simple" ) { | } else if( $level == "simple" ) { | ||||||
| 	require('view/chat_simple.php'); | 	require('view/chat_simple.php'); | ||||||
| } else if( $level == "old" ) { | } else if( $level == "old" ) { | ||||||
| 	require('view/chat_oldbrowser.php'); | 	require('view/chat_oldbrowser.php'); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,19 +1,19 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('view_index.php'); | require('view_index.php'); | ||||||
| ?>
 | ?>
 | ||||||
|  | |||||||
| @ -1,90 +1,98 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| function drop_tables() { | function drop_tables() { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 	perform_query("DROP TABLE IF EXISTS chatthread",$link); | 	perform_query("DROP TABLE IF EXISTS chatthread",$link); | ||||||
| 	perform_query("DROP TABLE IF EXISTS chatmessage",$link); | 	perform_query("DROP TABLE IF EXISTS chatmessage",$link); | ||||||
| 	perform_query("DROP TABLE IF EXISTS chatrevision",$link); | 	perform_query("DROP TABLE IF EXISTS chatrevision",$link); | ||||||
| 	perform_query("DROP TABLE IF EXISTS chatoperator",$link); | 	perform_query("DROP TABLE IF EXISTS chatoperator",$link); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function create_tables() { | function create_tables() { | ||||||
| 	global $dbencoding; | 	global $dbencoding; | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 
 | 
 | ||||||
| 	$query =  | 	// to update from v1
 | ||||||
| 		"CREATE TABLE chatthread (\n". | 	// ALTER TABLE chatthread ADD agentId int NOT NULL DEFAULT 0 AFTER agentName
 | ||||||
| 		"	threadid int NOT NULL auto_increment PRIMARY KEY ,\n". | 	// update chatthread,chatoperator set agentId = operatorid where agentId = 0 AND (vclocalename = agentName OR vccommonname = agentName) 
 | ||||||
| 		"	userName varchar(64) NOT NULL,\n". | 	// ALTER TABLE chatmessage ADD agentId int NOT NULL DEFAULT 0 AFTER ikind
 | ||||||
| 		"	agentName varchar(64),\n". | 	// update chatmessage,chatoperator set agentId = operatorid where agentId = 0 AND ikind = 2 AND (vclocalename = tname OR vccommonname = tname) 
 | ||||||
| 		"	dtmcreated datetime DEFAULT 0,\n". | 	 | ||||||
| 		"	dtmmodified datetime DEFAULT 0,\n". | 	$query =  | ||||||
| 		"	lrevision int NOT NULL DEFAULT 0,\n". | 		"CREATE TABLE chatthread (\n". | ||||||
| 		"	istate int NOT NULL DEFAULT 0,\n". | 		"	threadid int NOT NULL auto_increment PRIMARY KEY ,\n". | ||||||
| 		"	ltoken int NOT NULL,\n". | 		"	userName varchar(64) NOT NULL,\n". | ||||||
| 		"	remote varchar(255),\n". | 		"	agentName varchar(64),\n". | ||||||
| 		"	referer text,\n". | 		"   agentId int NOT NULL DEFAULT 0,\n". | ||||||
| 		"	locale varchar(8),\n". | 		"	dtmcreated datetime DEFAULT 0,\n". | ||||||
| 		"	lastpinguser datetime DEFAULT 0,\n". | 		"	dtmmodified datetime DEFAULT 0,\n". | ||||||
| 		"	lastpingagent datetime DEFAULT 0\n". | 		"	lrevision int NOT NULL DEFAULT 0,\n". | ||||||
| 		") charset $dbencoding\n"; | 		"	istate int NOT NULL DEFAULT 0,\n". | ||||||
| 
 | 		"	ltoken int NOT NULL,\n". | ||||||
| 	perform_query($query,$link);	 | 		"	remote varchar(255),\n". | ||||||
| 
 | 		"	referer text,\n". | ||||||
| 	$query =  | 		"	locale varchar(8),\n". | ||||||
| 		"CREATE TABLE chatmessage\n". | 		"	lastpinguser datetime DEFAULT 0,\n". | ||||||
| 		"(\n". | 		"	lastpingagent datetime DEFAULT 0\n". | ||||||
| 		"	messageid int NOT NULL auto_increment PRIMARY KEY,\n". | 		") charset $dbencoding\n"; | ||||||
| 		"	threadid int NOT NULL references chatthread(threadid),\n". | 
 | ||||||
| 		"	ikind int NOT NULL,\n". | 	perform_query($query,$link);	 | ||||||
| 		"	tmessage text NOT NULL,\n". | 
 | ||||||
| 		"	dtmcreated datetime DEFAULT 0,\n". | 	$query =  | ||||||
| 		"	tname varchar(64)\n". | 		"CREATE TABLE chatmessage\n". | ||||||
| 		") charset $dbencoding\n"; | 		"(\n". | ||||||
| 
 | 		"	messageid int NOT NULL auto_increment PRIMARY KEY,\n". | ||||||
| 	perform_query($query,$link);	 | 		"	threadid int NOT NULL references chatthread(threadid),\n". | ||||||
| 
 | 		"	ikind int NOT NULL,\n". | ||||||
| 	perform_query("CREATE TABLE chatrevision (id INT NOT NULL)",$link);	 | 		"   agentId int NOT NULL DEFAULT 0,\n". | ||||||
| 	perform_query("INSERT INTO chatrevision VALUES (1)",$link);	 | 		"	tmessage text NOT NULL,\n". | ||||||
| 
 | 		"	dtmcreated datetime DEFAULT 0,\n". | ||||||
| 	$query =  | 		"	tname varchar(64)\n". | ||||||
| 		"CREATE TABLE chatoperator\n". | 		") charset $dbencoding\n"; | ||||||
| 		"(\n". | 
 | ||||||
| 		"	operatorid int NOT NULL auto_increment PRIMARY KEY,\n". | 	perform_query($query,$link);	 | ||||||
| 		"	vclogin varchar(64) NOT NULL,\n". | 
 | ||||||
| 		"	vcpassword varchar(64) NOT NULL,\n". | 	perform_query("CREATE TABLE chatrevision (id INT NOT NULL)",$link);	 | ||||||
| 		"	vclocalename varchar(64) NOT NULL,\n". | 	perform_query("INSERT INTO chatrevision VALUES (1)",$link);	 | ||||||
| 		"	vccommonname varchar(64) NOT NULL,\n". | 
 | ||||||
| 		"	dtmlastvisited datetime DEFAULT 0\n". | 	$query =  | ||||||
| 		") charset $dbencoding\n"; | 		"CREATE TABLE chatoperator\n". | ||||||
| 
 | 		"(\n". | ||||||
| 	perform_query($query,$link);	 | 		"	operatorid int NOT NULL auto_increment PRIMARY KEY,\n". | ||||||
| 
 | 		"	vclogin varchar(64) NOT NULL,\n". | ||||||
| 	mysql_close($link); | 		"	vcpassword varchar(64) NOT NULL,\n". | ||||||
| 
 | 		"	vclocalename varchar(64) NOT NULL,\n". | ||||||
| 	create_operator("admin", "", "Administrator", "Administrator"); | 		"	vccommonname varchar(64) NOT NULL,\n". | ||||||
| } | 		"	dtmlastvisited datetime DEFAULT 0\n". | ||||||
| 
 | 		") charset $dbencoding\n"; | ||||||
| drop_tables(); | 
 | ||||||
| create_tables(); | 	perform_query($query,$link);	 | ||||||
| 
 | 
 | ||||||
| start_html_output(); | 	mysql_close($link); | ||||||
| require('view_install.php'); | 
 | ||||||
| 
 | 	create_operator("admin", "", "Administrator", "Administrator"); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | drop_tables(); | ||||||
|  | create_tables(); | ||||||
|  | 
 | ||||||
|  | start_html_output(); | ||||||
|  | require('view_install.php'); | ||||||
|  | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,64 +1,57 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("install.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 | 		<h1><?php echo getstring("install.title") ?></h1>
 | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 	 | ||||||
| 
 | 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	<?php echo getstring("install.message") ?>
 | ||||||
| <tr> | <br/> | ||||||
| <td valign="top" class="text"> | <br/> | ||||||
| 	 | 
 | ||||||
| 		<h1><?php echo getstring("install.title") ?></h1>
 | <a href="install.php"><?php echo getstring("install.create_db_link") ?></a>
 | ||||||
| 	 | 
 | ||||||
| 
 | <br/> | ||||||
| 	<?php echo getstring("install.message") ?>
 | <br/> | ||||||
| <br/> | 
 | ||||||
| <br/> | <a href="/webim/epl-v10.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | ||||||
| 
 | </td> | ||||||
| <a href="install.php"><?php echo getstring("install.create_db_link") ?></a>
 | </tr> | ||||||
| 
 | </table> | ||||||
| <br/> | 
 | ||||||
| <br/> | </body> | ||||||
| 
 | </html> | ||||||
| <a href="/webim/epl-v10.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | 
 | ||||||
| </td> |  | ||||||
| </tr> |  | ||||||
| </table> |  | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,64 +1,57 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("installed.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 | 		<h1><?php echo getstring("installed.title") ?></h1>
 | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 	 | ||||||
| 
 | 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	<?php echo getstring("installed.message") ?>
 | ||||||
| <tr> | <br/> | ||||||
| <td valign="top" class="text"> | <br/> | ||||||
| 	 | 
 | ||||||
| 		<h1><?php echo getstring("installed.title") ?></h1>
 | <a href="/webim/operator/login.php"><?php echo getstring("installed.login_link") ?></a>
 | ||||||
| 	 | 
 | ||||||
| 
 | <br/> | ||||||
| 	<?php echo getstring("installed.message") ?>
 | <br/> | ||||||
| <br/> | 
 | ||||||
| <br/> | <a href="/webim/LICENSE.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | ||||||
| 
 | </td> | ||||||
| <a href="/webim/operator/login.php"><?php echo getstring("installed.login_link") ?></a>
 | </tr> | ||||||
| 
 | </table> | ||||||
| <br/> | 
 | ||||||
| <br/> | </body> | ||||||
| 
 | </html> | ||||||
| <a href="/webim/LICENSE.html" target="_blank"><?php echo getstring("install.license") ?></a>
 | 
 | ||||||
| </td> |  | ||||||
| </tr> |  | ||||||
| </table> |  | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,435 +1,438 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  *    Pavel Petroshenko - history search |  *    Pavel Petroshenko - history search | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| $connection_timeout = 30; # sec
 | $connection_timeout = 30; # sec
 | ||||||
| 
 | 
 | ||||||
| $namecookie = "WEBIM_Name"; | $namecookie = "WEBIM_Name"; | ||||||
| 
 | 
 | ||||||
| $state_queue = 0; | $state_queue = 0; | ||||||
| $state_waiting = 1; | $state_waiting = 1; | ||||||
| $state_chatting = 2; | $state_chatting = 2; | ||||||
| $state_closed = 3; | $state_closed = 3; | ||||||
| 
 | 
 | ||||||
| $kind_user = 1; | $kind_user = 1; | ||||||
| $kind_agent = 2; | $kind_agent = 2; | ||||||
| $kind_for_agent = 3; | $kind_for_agent = 3; | ||||||
| $kind_info = 4; | $kind_info = 4; | ||||||
| $kind_conn = 5; | $kind_conn = 5; | ||||||
| $kind_events = 6; | $kind_events = 6; | ||||||
| 
 | 
 | ||||||
| $kind_to_string = array( $kind_user => "user", $kind_agent => "agent", $kind_for_agent => "hidden", | $kind_to_string = array( $kind_user => "user", $kind_agent => "agent", $kind_for_agent => "hidden", | ||||||
| 	$kind_info => "inf", $kind_conn => "conn", $kind_events => "event" ); | 	$kind_info => "inf", $kind_conn => "conn", $kind_events => "event" ); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| function next_token() { | function next_token() { | ||||||
| 	return rand(99999,99999999); | 	return rand(99999,99999999); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function next_revision($link) { | function next_revision($link) { | ||||||
| 	perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link); | 	perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link); | ||||||
| 	$val = mysql_insert_id($link); | 	$val = mysql_insert_id($link); | ||||||
| 	return $val; | 	return $val; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function post_message_($threadid,$kind,$message,$link,$from=null,$time=null) { | function post_message_($threadid,$kind,$message,$link,$from=null,$time=null,$opid=null) { | ||||||
| 	$query = sprintf( | 	$query = sprintf( | ||||||
| 	    "insert into chatmessage (threadid,ikind,tmessage,tname,dtmcreated) values (%s, %s,'%s',%s,%s)", | 	    "insert into chatmessage (threadid,ikind,tmessage,tname,agentId,dtmcreated) values (%s, %s,'%s',%s,%s,%s)", | ||||||
| 			$threadid, | 			$threadid, | ||||||
| 			$kind, | 			$kind, | ||||||
| 			quote_smart($message,$link), | 			quote_smart($message,$link), | ||||||
| 			$from ? "'".quote_smart($from,$link)."'" : "null", | 			$from ? "'".quote_smart($from,$link)."'" : "null", | ||||||
| 			$time ? "FROM_UNIXTIME($time)" : "CURRENT_TIMESTAMP" ); | 			$opid ? $opid : "0", | ||||||
| 
 | 			$time ? "FROM_UNIXTIME($time)" : "CURRENT_TIMESTAMP" ); | ||||||
| 	perform_query($query,$link); | 
 | ||||||
| } | 	perform_query($query,$link); | ||||||
| 
 | } | ||||||
| function post_message($threadid,$kind,$message,$from=null) { | 
 | ||||||
| 	$link = connect(); | function post_message($threadid,$kind,$message,$from=null,$agentid=null) { | ||||||
| 	post_message_($threadid,$kind,$message,$link,$from); | 	$link = connect(); | ||||||
| 	mysql_close($link); | 	post_message_($threadid,$kind,$message,$link,$from,null,$agentid); | ||||||
| } | 	mysql_close($link); | ||||||
| 
 | } | ||||||
| function prepare_html_message($text) { | 
 | ||||||
| 	$escaped_text = htmlspecialchars($text); | function prepare_html_message($text) { | ||||||
| 	$text_w_links = preg_replace('/(http|ftp):\/\/\S*/','<a href="$0" target="_blank">$0</a>',$escaped_text); | 	$escaped_text = htmlspecialchars($text); | ||||||
| 	$multiline = str_replace("\n","<br/>",$text_w_links); | 	$text_w_links = preg_replace('/(http|ftp):\/\/\S*/','<a href="$0" target="_blank">$0</a>',$escaped_text); | ||||||
| 	return $multiline; | 	$multiline = str_replace("\n","<br/>",$text_w_links); | ||||||
| } | 	return $multiline; | ||||||
| 
 | } | ||||||
| function message_to_html($msg) { | 
 | ||||||
| 	global $kind_to_string; | function message_to_html($msg) { | ||||||
| 	$message = "<span>".date("H:i:s",$msg['created'])."</span> "; | 	global $kind_to_string; | ||||||
| 	$kind = $kind_to_string{$msg['ikind']}; | 	$message = "<span>".date("H:i:s",$msg['created'])."</span> "; | ||||||
| 	if( $msg['tname'] ) | 	$kind = $kind_to_string{$msg['ikind']}; | ||||||
| 		$message.= "<span class='n$kind'>".htmlspecialchars($msg['tname'])."</span>: "; | 	if( $msg['tname'] ) | ||||||
| 	$message.= "<span class='m$kind'>".prepare_html_message($msg['tmessage'])."</span><br/>"; | 		$message.= "<span class='n$kind'>".htmlspecialchars($msg['tname'])."</span>: "; | ||||||
| 	return $message; | 	$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; | function message_to_text($msg) { | ||||||
| 	$time = date("H:i:s ",$msg['created']); | 	global $kind_user, $kind_agent, $kind_info; | ||||||
| 	if($msg['ikind'] == $kind_user || $msg['ikind'] == $kind_agent) { | 	$time = date("H:i:s ",$msg['created']); | ||||||
| 		if( $msg['tname'] ) | 	if($msg['ikind'] == $kind_user || $msg['ikind'] == $kind_agent) { | ||||||
| 			return $time.$msg['tname'].": ".$msg['tmessage']."\n"; | 		if( $msg['tname'] ) | ||||||
| 		else | 			return $time.$msg['tname'].": ".$msg['tmessage']."\n"; | ||||||
| 			return $time.$msg['tmessage']."\n"; | 		else | ||||||
| 	} else if($msg['ikind'] == $kind_info ) { | 			return $time.$msg['tmessage']."\n"; | ||||||
| 		return $time.$msg['tmessage']."\n"; | 	} else if($msg['ikind'] == $kind_info ) { | ||||||
| 	} else { | 		return $time.$msg['tmessage']."\n"; | ||||||
| 		return $time."[".$msg['tmessage']."]\n"; | 	} else { | ||||||
| 	} | 		return $time."[".$msg['tmessage']."]\n"; | ||||||
| } | 	} | ||||||
| 
 | } | ||||||
| function get_messages($threadid,$meth,$isuser,&$lastid) { | 
 | ||||||
| 	global $kind_for_agent; | function get_messages($threadid,$meth,$isuser,&$lastid) { | ||||||
| 	$link = connect(); | 	global $kind_for_agent; | ||||||
| 
 | 	$link = connect(); | ||||||
| 	$query = sprintf( | 
 | ||||||
| 	    "select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ". | 	$query = sprintf( | ||||||
| 	    "where threadid = %s and messageid > %s %s order by messageid", | 	    "select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ". | ||||||
| 	    $threadid, $lastid, $isuser ? "and ikind <> $kind_for_agent" : "" ); | 	    "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); | 	$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); | 	while ($msg = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||||
| 		$messages[] = $message; | 		$message = ($meth == 'text') ? message_to_text($msg) : message_to_html($msg); | ||||||
| 		if( $msg['messageid'] > $lastid ) | 		$messages[] = $message; | ||||||
| 			$lastid = $msg['messageid']; | 		if( $msg['messageid'] > $lastid ) | ||||||
| 	} | 			$lastid = $msg['messageid']; | ||||||
| 
 | 	} | ||||||
| 	mysql_free_result($result); | 
 | ||||||
| 	mysql_close($link); | 	mysql_free_result($result); | ||||||
| 	return $messages; | 	mysql_close($link); | ||||||
| }  | 	return $messages; | ||||||
| 
 | }  | ||||||
| function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) { | 
 | ||||||
| 	global $webim_encoding, $webimroot; | function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) { | ||||||
| 	$output = get_messages($threadid,"html",$isuser,$lastid); | 	global $webim_encoding, $webimroot; | ||||||
| 
 | 	$output = get_messages($threadid,"html",$isuser,$lastid); | ||||||
| 	if( $format == "xml" ) { | 
 | ||||||
| 		start_xml_output(); | 	if( $format == "xml" ) { | ||||||
| 		print("<thread lastID=\"$lastid\">");
 | 		start_xml_output(); | ||||||
| 		foreach( $output as $msg ) { | 		print("<thread lastID=\"$lastid\">");
 | ||||||
| 			print "<message>".myiconv($webim_encoding,"utf-8",escape_with_cdata($msg))."</message>\n"; | 		foreach( $output as $msg ) { | ||||||
| 		} | 			print "<message>".myiconv($webim_encoding,"utf-8",escape_with_cdata($msg))."</message>\n"; | ||||||
| 		print("</thread>"); | 		} | ||||||
| 	} else if( $format == "html" ) { | 		print("</thread>"); | ||||||
| 		start_html_output(); | 	} else if( $format == "html" ) { | ||||||
| 		$url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false"); | 		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". | 		print("<html><head>\n". | ||||||
| 		    "<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | 		    "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"$webimroot/chat.css\" />\n". | ||||||
| 		    "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n". | 		    "<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n". | ||||||
| 		    "</head>". | 		    "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n". | ||||||
| 		    "<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';}\">". | 		    "</head>". | ||||||
| 		    "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>" ); | 		    "<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; | 		foreach( $output as $msg ) { | ||||||
| 		} | 			print $msg; | ||||||
| 
 | 		} | ||||||
| 		print( | 
 | ||||||
| 		    "</td></tr></table><a name='aend'>". | 		print( | ||||||
| 		    "</body></html>" ); | 		    "</td></tr></table><a name='aend'>". | ||||||
| 	} | 		    "</body></html>" ); | ||||||
| } | 	} | ||||||
| 
 | } | ||||||
| function get_user_name($name, $id="") { | 
 | ||||||
| 	global $presentable_name_pattern; | function get_user_name($name, $id="") { | ||||||
|        	return str_replace("{id}", $id, str_replace("{name}", $name, $presentable_name_pattern)); | 	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; | function setup_chatview_for_user($thread,$level) { | ||||||
| 	$page = array(); | 	global $page, $webimroot, $user_can_change_name, $company_logo_link, $company_name; | ||||||
| 	$page['agent'] = false; | 	$page = array(); | ||||||
| 	$page['user'] = true; | 	$page['agent'] = false; | ||||||
| 	$page['canpost'] = true; | 	$page['user'] = true; | ||||||
| 	$nameisset = getstring("chat.default.username") != $thread['userName']; | 	$page['canpost'] = true; | ||||||
| 	$page['displ1'] = $nameisset ? "none" : "inline"; | 	$nameisset = getstring("chat.default.username") != $thread['userName']; | ||||||
| 	$page['displ2'] = $nameisset ? "inline" : "none"; | 	$page['displ1'] = $nameisset ? "none" : "inline"; | ||||||
| 	$page['level'] = $level; | 	$page['displ2'] = $nameisset ? "inline" : "none"; | ||||||
| 	$page['ct.chatThreadId'] = $thread['threadid']; | 	$page['level'] = $level; | ||||||
| 	$page['ct.token'] = $thread['ltoken']; | 	$page['ct.chatThreadId'] = $thread['threadid']; | ||||||
| 	$page['ct.user.name'] = $thread['userName']; | 	$page['ct.token'] = $thread['ltoken']; | ||||||
| 	$page['canChangeName'] = $user_can_change_name; | 	$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; | 	$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; | 	$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; | function setup_chatview_for_operator($thread,$operator) { | ||||||
| 	$page = array(); | 	global $page, $webimroot, $company_logo_link, $company_name; | ||||||
| 	$page['agent'] = true; | 	$page = array(); | ||||||
| 	$page['user'] = false; | 	$page['agent'] = true; | ||||||
| 	$page['canpost'] = true; | 	$page['user'] = false; | ||||||
| 	$page['ct.chatThreadId'] = $thread['threadid']; | 	$page['canpost'] = true; | ||||||
| 	$page['ct.token'] = $thread['ltoken']; | 	$page['ct.chatThreadId'] = $thread['threadid']; | ||||||
| 	$page['ct.user.name'] = get_user_name($thread['userName']); | 	$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; | 	$page['ct.company.name'] = $company_name; | ||||||
| 
 | 	$page['ct.company.chatLogoURL'] = $company_logo_link; | ||||||
| 	// TODO
 | 
 | ||||||
| 	$page['namePostfix'] = "";	 | 	// TODO
 | ||||||
| } | 	$page['namePostfix'] = "";	 | ||||||
| 
 | } | ||||||
| function is_ajax_browser($name,$ver,$useragent) { | 
 | ||||||
| 	if( $name == "opera" ) | function is_ajax_browser($name,$ver,$useragent) { | ||||||
| 		return $ver >= 8.02; | 	if( $name == "opera" ) | ||||||
| 	if( $name == "safari" ) | 		return $ver >= 8.02; | ||||||
| 		return $ver >= 125; | 	if( $name == "safari" ) | ||||||
| 	if( $name == "msie" ) | 		return $ver >= 125; | ||||||
| 		return $ver >= 5.5 && !strstr($useragent, "powerpc"); | 	if( $name == "msie" ) | ||||||
| 	if( $name == "netscape" ) | 		return $ver >= 5.5 && !strstr($useragent, "powerpc"); | ||||||
| 		return $ver >= 7.1; | 	if( $name == "netscape" ) | ||||||
| 	if( $name == "mozilla") | 		return $ver >= 7.1; | ||||||
| 		return $ver >= 1.4; | 	if( $name == "mozilla") | ||||||
| 	if( $name == "firefox") | 		return $ver >= 1.4; | ||||||
| 		return $ver >= 1.0; | 	if( $name == "firefox") | ||||||
| 
 | 		return $ver >= 1.0; | ||||||
| 	return false; | 
 | ||||||
| } | 	return false; | ||||||
| 
 | } | ||||||
| function is_old_browser($name,$ver) { | 
 | ||||||
| 	if( $name == "opera" ) | function is_old_browser($name,$ver) { | ||||||
| 		return $ver < 7.0; | 	if( $name == "opera" ) | ||||||
| 	if( $name == "msie" ) | 		return $ver < 7.0; | ||||||
| 		return $ver < 5.0; | 	if( $name == "msie" ) | ||||||
| 	return false;  | 		return $ver < 5.0; | ||||||
| } | 	return false;  | ||||||
| 
 | } | ||||||
| $knownAgents = array("opera","msie","safari","firefox","netscape","mozilla"); | 
 | ||||||
| 
 | $knownAgents = array("opera","msie","safari","firefox","netscape","mozilla"); | ||||||
| function get_remote_level($useragent) { | 
 | ||||||
| 	global $knownAgents; | function get_remote_level($useragent) { | ||||||
| 	$useragent = strtolower($useragent); | 	global $knownAgents; | ||||||
| 	foreach( $knownAgents as $agent ) { | 	$useragent = strtolower($useragent); | ||||||
| 		if( strstr($useragent,$agent) ) { | 	foreach( $knownAgents as $agent ) { | ||||||
| 			if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) { | 		if( strstr($useragent,$agent) ) { | ||||||
| 				$ver = $matches[1]; | 			if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) { | ||||||
| 
 | 				$ver = $matches[1]; | ||||||
| 				if( is_ajax_browser($agent,$ver,$useragent) ) | 
 | ||||||
| 					return "ajaxed"; | 				if( is_ajax_browser($agent,$ver,$useragent) ) | ||||||
| 				else if( is_old_browser($agent,$ver) ) | 					return "ajaxed"; | ||||||
| 					return "old"; | 				else if( is_old_browser($agent,$ver) ) | ||||||
| 
 | 					return "old"; | ||||||
| 				return "simple"; | 
 | ||||||
| 			} | 				return "simple"; | ||||||
| 		} | 			} | ||||||
| 	} | 		} | ||||||
| 	return "simple"; | 	} | ||||||
| } | 	return "simple"; | ||||||
| 
 | } | ||||||
| function update_thread_access($threadid, $params, $link) { | 
 | ||||||
| 	$clause = ""; | function update_thread_access($threadid, $params, $link) { | ||||||
| 	foreach( $params as $k => $v ) { | 	$clause = ""; | ||||||
| 		if( strlen($clause) > 0 ) | 	foreach( $params as $k => $v ) { | ||||||
| 			$clause .= ", "; | 		if( strlen($clause) > 0 ) | ||||||
| 	    $clause .= $k."=".$v; | 			$clause .= ", "; | ||||||
| 	} | 	    $clause .= $k."=".$v; | ||||||
| 	perform_query( | 	} | ||||||
| 		 "update chatthread set $clause ". | 	perform_query( | ||||||
| 		 "where threadid = ".$threadid,$link); | 		 "update chatthread set $clause ". | ||||||
| } | 		 "where threadid = ".$threadid,$link); | ||||||
| 
 | } | ||||||
| function get_access_time($threadid, $isuser, $link) { | 
 | ||||||
| 	return select_one_row(sprintf( | function get_access_time($threadid, $isuser, $link) { | ||||||
| 		 "select unix_timestamp(%s) as lastping, ". | 	return select_one_row(sprintf( | ||||||
| 		 "unix_timestamp(CURRENT_TIMESTAMP) as current ". | 		 "select unix_timestamp(%s) as lastping, ". | ||||||
| 		 "from chatthread where threadid = %s", | 		 "unix_timestamp(CURRENT_TIMESTAMP) as current ". | ||||||
| 		$isuser ? "lastpinguser" : "lastpingagent", | 		 "from chatthread where threadid = %s", | ||||||
| 		$threadid), $link); | 		$isuser ? "lastpinguser" : "lastpingagent", | ||||||
| } | 		$threadid), $link); | ||||||
| 
 | } | ||||||
| function ping_thread($thread, $isuser) { | 
 | ||||||
| 	global $kind_for_agent, $state_chatting, $state_waiting, $kind_conn, $connection_timeout; | function ping_thread($thread, $isuser) { | ||||||
| 	$link = connect(); | 	global $kind_for_agent, $state_chatting, $state_waiting, $kind_conn, $connection_timeout; | ||||||
| 	$params = array(($isuser ? "lastpinguser" : "lastpingagent") => "CURRENT_TIMESTAMP" ); | 	$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 ) { | 	$access = get_access_time($thread['threadid'], !$isuser, $link); | ||||||
| 		$params[$isuser ? "lastpingagent" : "lastpinguser"] = "0"; |  	if( $access['lastping'] > 0 && abs($access['current']-$access['lastping']) > $connection_timeout ) { | ||||||
| 		if( !$isuser ) { | 		$params[$isuser ? "lastpingagent" : "lastpinguser"] = "0"; | ||||||
| 			$message_to_post = getstring_("chat.status.user.dead", $thread['locale']); | 		if( !$isuser ) { | ||||||
| 			post_message_($thread['threadid'],$kind_for_agent,$message_to_post,$link,null,$access['lastping']+$connection_timeout); | 			$message_to_post = getstring_("chat.status.user.dead", $thread['locale']); | ||||||
| 		} else if( $thread['istate'] == $state_chatting ) { | 			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); | 			$message_to_post = getstring_("chat.status.operator.dead", $thread['locale']); | ||||||
| 			$params['istate'] = $state_waiting; | 			post_message_($thread['threadid'],$kind_conn,$message_to_post,$link,null,$access['lastping']+$connection_timeout); | ||||||
| 			commit_thread($thread['threadid'], $params, $link); | 			$params['istate'] = $state_waiting; | ||||||
| 			mysql_close($link); | 			commit_thread($thread['threadid'], $params, $link); | ||||||
| 			return; | 			mysql_close($link); | ||||||
| 		} | 			return; | ||||||
| 	} | 		} | ||||||
| 
 | 	} | ||||||
| 	update_thread_access($thread['threadid'], $params, $link); | 
 | ||||||
| 	mysql_close($link); | 	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"; | function commit_thread($threadid,$params,$link) { | ||||||
| 	foreach( $params as $k => $v ) { | 	$query = "update chatthread set lrevision = ".next_revision($link).", dtmmodified = CURRENT_TIMESTAMP"; | ||||||
| 	    $query .= ", ".$k."=".$v; | 	foreach( $params as $k => $v ) { | ||||||
| 	} | 	    $query .= ", ".$k."=".$v; | ||||||
| 	$query .= " where threadid = ".$threadid; | 	} | ||||||
| 
 | 	$query .= " where threadid = ".$threadid; | ||||||
| 	perform_query($query,$link); | 
 | ||||||
| } | 	perform_query($query,$link); | ||||||
| 
 | } | ||||||
| function rename_user($thread, $newname) { | 
 | ||||||
| 	global $kind_events; | function rename_user($thread, $newname) { | ||||||
| 
 | 	global $kind_events; | ||||||
| 	$link = connect(); | 
 | ||||||
| 	commit_thread( $thread['threadid'], array('userName' => "'".mysql_real_escape_string($newname)."'"), $link); | 	$link = connect(); | ||||||
| 	mysql_close($link); | 	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, | 	if( $thread['userName'] != $newname ) { | ||||||
| 			getstring2_("chat.status.user.changedname",array($thread['userName'], $newname), $thread['locale'])); | 		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; | function close_thread($thread,$isuser) { | ||||||
| 	 | 	global $state_closed, $kind_events; | ||||||
| 	if( $thread['istate'] != $state_closed ) { | 	 | ||||||
| 		$link = connect(); | 	if( $thread['istate'] != $state_closed ) { | ||||||
| 		commit_thread( $thread['threadid'], array('istate' => $state_closed), $link); | 		$link = connect(); | ||||||
| 		mysql_close($link); | 		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']); | 	$message =  $isuser ? getstring2_("chat.status.user.left", array($thread['userName']), $thread['locale']) | ||||||
| 	post_message($thread['threadid'], $kind_events, $message); | 					: 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(); | function create_thread($username,$remote,$referer,$lang) { | ||||||
| 
 | 	$link = connect(); | ||||||
| 	$query = sprintf( | 
 | ||||||
| 		 "insert into chatthread (userName,"."ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ". | 	$query = sprintf( | ||||||
| 								 "('%s',"."%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)", | 		 "insert into chatthread (userName,"."ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ". | ||||||
| 			mysql_real_escape_string($username), | 								 "('%s',"."%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)", | ||||||
| 			next_token(), | 			mysql_real_escape_string($username), | ||||||
| 			mysql_real_escape_string($remote), | 			next_token(), | ||||||
| 			mysql_real_escape_string($referer), | 			mysql_real_escape_string($remote), | ||||||
| 			next_revision($link), | 			mysql_real_escape_string($referer), | ||||||
| 			mysql_real_escape_string($lang) ); | 			next_revision($link), | ||||||
| 
 | 			mysql_real_escape_string($lang) ); | ||||||
| 	perform_query($query,$link); | 
 | ||||||
| 	$id = mysql_insert_id($link); | 	perform_query($query,$link); | ||||||
| 
 | 	$id = mysql_insert_id($link); | ||||||
| 	$newthread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | 
 | ||||||
| 	mysql_close($link); | 	$newthread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | ||||||
| 	return $newthread; | 	mysql_close($link); | ||||||
| } | 	return $newthread; | ||||||
| 
 | } | ||||||
| function do_take_thread($threadid,$operatorName) { | 
 | ||||||
| 	global $state_chatting; | function do_take_thread($threadid,$operatorId,$operatorName) { | ||||||
| 	$link = connect(); | 	global $state_chatting; | ||||||
| 	commit_thread( $threadid,  | 	$link = connect(); | ||||||
| 		array("istate" => $state_chatting, | 	commit_thread( $threadid,  | ||||||
| 			  "agentName" => "'".mysql_real_escape_string($operatorName)."'"), $link); | 		array("istate" => $state_chatting, | ||||||
| 	mysql_close($link); | 			  "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); | function reopen_thread($threadid) { | ||||||
| 
 | 	global $state_queue,$state_waiting,$state_chatting,$state_closed,$kind_events; | ||||||
| 	if( !$thread ) | 	$thread = thread_by_id($threadid); | ||||||
| 		return FALSE; | 
 | ||||||
| 
 | 	if( !$thread ) | ||||||
| 	if( $thread['istate'] == $state_closed ) | 		return FALSE; | ||||||
| 		return FALSE; | 
 | ||||||
| 
 | 	if( $thread['istate'] == $state_closed ) | ||||||
| 	if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) { | 		return FALSE; | ||||||
| 		$link = connect(); | 
 | ||||||
| 		commit_thread( $threadid,  | 	if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) { | ||||||
| 			array("istate" => $state_waiting ), $link); | 		$link = connect(); | ||||||
| 		mysql_close($link); | 		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; | 
 | ||||||
| } | 	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; | 
 | ||||||
| 
 | function take_thread($thread,$operator) { | ||||||
| 	$state = $thread['istate']; | 	global $state_queue, $state_waiting, $state_chatting, $kind_events, $home_locale; | ||||||
| 	$threadid = $thread['threadid']; | 
 | ||||||
| 	$message_to_post = ""; | 	$state = $thread['istate']; | ||||||
| 
 | 	$threadid = $thread['threadid']; | ||||||
| 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | 	$message_to_post = ""; | ||||||
| 
 | 
 | ||||||
| 	if( $state == $state_queue || $state == $state_waiting) { | 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | ||||||
| 		do_take_thread($threadid, $operatorName); | 
 | ||||||
| 
 | 	if( $state == $state_queue || $state == $state_waiting) { | ||||||
| 		if( $state == $state_waiting  ) { | 		do_take_thread($threadid, $operator['operatorid'], $operatorName); | ||||||
| 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | 
 | ||||||
| 		} else { | 		if( $state == $state_waiting  ) { | ||||||
| 			$message_to_post = getstring2_("chat.status.operator.joined", array($operatorName), $thread['locale']); | 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | ||||||
| 		} | 		} else { | ||||||
| 	} else if( $state == $state_chatting ) { | 			$message_to_post = getstring2_("chat.status.operator.joined", array($operatorName), $thread['locale']); | ||||||
| 		if( $operatorName != $thread['agentName'] ) { | 		} | ||||||
| 			do_take_thread($threadid, $operatorName);		 | 	} else if( $state == $state_chatting ) { | ||||||
| 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']); | 		if( $operator['operatorid'] != $thread['agentId'] ) { | ||||||
| 		} | 			do_take_thread($threadid, $operator['operatorid'], $operatorName);		 | ||||||
| 	} else { | 			$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']); | ||||||
| 		die("cannot take thread"); | 		} | ||||||
| 	} | 	} else { | ||||||
| 
 | 		die("cannot take thread"); | ||||||
| 	if( $message_to_post ) | 	} | ||||||
| 		post_message($threadid,$kind_events,$message_to_post); | 
 | ||||||
| } | 	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 &&  | function check_for_reassign($thread,$operator) { | ||||||
| 			(  $thread['agentName'] == $operatorName )) { | 	global $state_waiting, $home_locale, $kind_events; | ||||||
| 		do_take_thread($thread['threadid'], $operatorName); | 	$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; | ||||||
| 		$message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); | 	if( $thread['istate'] == $state_waiting &&  | ||||||
| 		post_message($thread['threadid'],$kind_events,$message_to_post); | 			(  $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); | function thread_by_id($id) { | ||||||
| 	return $thread; | 	$link = connect(); | ||||||
| } | 	$thread = select_one_row("select * from chatthread where threadid = ". $id, $link ); | ||||||
| 
 | 	mysql_close($link); | ||||||
| function visitor_from_request() { | 	return $thread; | ||||||
| 	global $namecookie; | } | ||||||
| 	$userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username"); | 
 | ||||||
| 
 | function visitor_from_request() { | ||||||
| 	return array( 'name' => $userName ); | 	global $namecookie; | ||||||
| } | 	$userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username"); | ||||||
| 
 | 
 | ||||||
| ?>
 | 	return array( 'name' => $userName ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | ?>
 | ||||||
|  | |||||||
| @ -1,293 +1,335 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| session_start(); | session_start(); | ||||||
| 
 | 
 | ||||||
| require(dirname(__FILE__).'/converter.php'); | require(dirname(__FILE__).'/converter.php'); | ||||||
| require(dirname(__FILE__).'/config.php'); | require(dirname(__FILE__).'/config.php'); | ||||||
| 
 | 
 | ||||||
| $webimroot = "/webim";                      # absolute path on server
 | $webimroot = "/webim";                      # absolute path on server
 | ||||||
| 
 | 
 | ||||||
| function myiconv($in_enc, $out_enc, $string) { | function myiconv($in_enc, $out_enc, $string) { | ||||||
| 	global $_utf8win1251, $_win1251utf8; | 	global $_utf8win1251, $_win1251utf8; | ||||||
| 	if( function_exists('iconv') ) { | 	if( function_exists('iconv') ) { | ||||||
| 	    $converted = iconv($in_enc, $out_enc, $string); | 	    $converted = iconv($in_enc, $out_enc, $string); | ||||||
| 	    if( $converted !== FALSE ) | 	    if( $converted !== FALSE ) | ||||||
| 			return $converted; | 			return $converted; | ||||||
| 	} | 	} | ||||||
| 	if( $in_enc == "cp1251" && $out_enc == "utf-8" ) | 	if( $in_enc == "cp1251" && $out_enc == "utf-8" ) | ||||||
| 		return strtr($string, $_win1251utf8); | 		return strtr($string, $_win1251utf8); | ||||||
| 	if( $in_enc == "utf-8" && $out_enc == "cp1251" ) | 	if( $in_enc == "utf-8" && $out_enc == "cp1251" ) | ||||||
| 		return strtr($string, $_utf8win1251); | 		return strtr($string, $_utf8win1251); | ||||||
| 
 | 
 | ||||||
| 	return $string; // do not know how to convert
 | 	return $string; // do not know how to convert
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getrawparam( $name ) { | function getrawparam( $name ) { | ||||||
| 	global $webim_encoding, $request_encoding; | 	global $webim_encoding, $request_encoding; | ||||||
| 	if( isset($_POST[$name]) ) | 	if( isset($_POST[$name]) ) | ||||||
| 		return myiconv($request_encoding,$webim_encoding,$_POST[$name]); | 		return myiconv($request_encoding,$webim_encoding,$_POST[$name]); | ||||||
| 	die("no ".$name." parameter"); | 	die("no ".$name." parameter"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getparam( $name ) { | function getparam( $name ) { | ||||||
| 	if( isset($_POST[$name]) ) | 	if( isset($_POST[$name]) ) | ||||||
| 		return $_POST[$name]; | 		return $_POST[$name]; | ||||||
| 	die("no ".$name." parameter"); | 	die("no ".$name." parameter"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function verifyparam( $name, $regexp, $default = null ) { | function verifyparam( $name, $regexp, $default = null ) { | ||||||
| 
 | 
 | ||||||
| 	if( isset( $_GET[$name] ) ) { | 	if( isset( $_GET[$name] ) ) { | ||||||
| 		$val = $_GET[$name]; | 		$val = $_GET[$name]; | ||||||
| 		if( preg_match( $regexp, $val ) ) | 		if( preg_match( $regexp, $val ) ) | ||||||
| 			return $val; | 			return $val; | ||||||
| 
 | 
 | ||||||
| 	} else if( isset( $_POST[$name] ) ) { | 	} else if( isset( $_POST[$name] ) ) { | ||||||
| 		$val = $_POST[$name]; | 		$val = $_POST[$name]; | ||||||
| 		if( preg_match( $regexp, $val ) ) | 		if( preg_match( $regexp, $val ) ) | ||||||
| 			return $val; | 			return $val; | ||||||
| 
 | 
 | ||||||
| 	} else { | 	} else { | ||||||
| 		if( isset( $default ) ) | 		if( isset( $default ) ) | ||||||
| 			return $default; | 			return $default; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	echo "<html><head></head><body>Wrong parameter used or absent: ".$name."</body></html>"; | 	echo "<html><head></head><body>Wrong parameter used or absent: ".$name."</body></html>"; | ||||||
| 	exit; | 	exit; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function debugexit_print( $var ) { | function debugexit_print( $var ) { | ||||||
| 	echo "<html><body><pre>"; | 	echo "<html><body><pre>"; | ||||||
| 	print_r( $var ); | 	print_r( $var ); | ||||||
| 	echo "</pre></body></html>"; | 	echo "</pre></body></html>"; | ||||||
| 	exit; | 	exit; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_user_locale() { | function get_user_locale() { | ||||||
| 	global $available_locales, $default_locale; | 	global $available_locales, $default_locale; | ||||||
| 
 | 
 | ||||||
| 	if( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) { | 	if( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) { | ||||||
| 		$requested_langs = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); | 		$requested_langs = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']); | ||||||
| 		foreach( $requested_langs as $requested_lang) { | 		foreach( $requested_langs as $requested_lang) { | ||||||
| 			if( strlen($requested_lang) > 2 ) | 			if( strlen($requested_lang) > 2 ) | ||||||
| 				$requested_lang = substr($requested_lang,0,2); | 				$requested_lang = substr($requested_lang,0,2); | ||||||
| 
 | 
 | ||||||
| 			if( in_array($requested_lang,$available_locales) ) | 			if( in_array($requested_lang,$available_locales) ) | ||||||
| 				return $requested_lang; | 				return $requested_lang; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if( in_array($default_locale,$available_locales) ) | 	if( in_array($default_locale,$available_locales) ) | ||||||
| 		return $default_locale; | 		return $default_locale; | ||||||
| 
 | 
 | ||||||
| 	return 'en'; | 	return 'en'; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_locale() { | function get_locale() { | ||||||
| 	global $available_locales; | 	global $available_locales; | ||||||
| 
 | 
 | ||||||
| 	$locale = verifyparam("locale", "/^\w\w$/", ""); | 	$locale = verifyparam("locale", "/^\w\w$/", ""); | ||||||
| 
 | 
 | ||||||
| 	if( $locale && in_array($locale,$available_locales) ) { | 	if( $locale && in_array($locale,$available_locales) ) { | ||||||
| 		$_SESSION['locale'] = $locale; | 		$_SESSION['locale'] = $locale; | ||||||
| 	} else if( isset($_SESSION['locale']) ){ | 	} else if( isset($_SESSION['locale']) ){ | ||||||
| 	    $locale = $_SESSION['locale']; | 	    $locale = $_SESSION['locale']; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if( !$locale || !in_array($locale,$available_locales) ) | 	if( !$locale || !in_array($locale,$available_locales) ) | ||||||
| 		$locale = get_user_locale(); | 		$locale = get_user_locale(); | ||||||
| 	return $locale; | 	return $locale; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function set_locale($locale) { | function set_locale($locale) { | ||||||
| 	global $current_locale, $available_locales; | 	global $current_locale, $available_locales; | ||||||
| 	if( in_array($locale,$available_locales) ) | 	if( in_array($locale,$available_locales) ) | ||||||
| 		$current_locale = $locale; | 		$current_locale = $locale; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $current_locale = get_locale(); | $current_locale = get_locale(); | ||||||
| $messages = array(); | $messages = array(); | ||||||
| 
 | 
 | ||||||
| function load_messages($locale) { | function load_messages($locale) { | ||||||
| 	global $messages; | 	global $messages; | ||||||
| 	$hash = array(); | 	$hash = array(); | ||||||
| 	$fp = fopen(dirname(__FILE__)."/../view/properties_$locale","r"); | 	$fp = fopen(dirname(__FILE__)."/../view/properties_$locale","r"); | ||||||
| 	while (!feof($fp)) { | 	while (!feof($fp)) { | ||||||
|     	$line = fgets($fp, 4096); |     	$line = fgets($fp, 4096); | ||||||
| 		$list = split("=", $line, 2 ); | 		$list = split("=", $line, 2 ); | ||||||
| 		if( isset($list[1]) ) { | 		if( isset($list[1]) ) { | ||||||
| 			$hash[$list[0]] = str_replace("\\n", "\n",trim($list[1])); | 			$hash[$list[0]] = str_replace("\\n", "\n",trim($list[1])); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	fclose($fp); | 	fclose($fp); | ||||||
| 	$messages[$locale] = $hash; | 	$messages[$locale] = $hash; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getstring_($text,$locale) { | function getstring_($text,$locale) { | ||||||
| 	global $messages; | 	global $messages; | ||||||
| 	if(!isset($messages[$locale])) | 	if(!isset($messages[$locale])) | ||||||
| 		load_messages($locale); | 		load_messages($locale); | ||||||
| 
 | 
 | ||||||
| 	$localized = $messages[$locale]; | 	$localized = $messages[$locale]; | ||||||
| 	if( isset($localized[$text]) ) | 	if( isset($localized[$text]) ) | ||||||
| 		return $localized[$text]; | 		return $localized[$text]; | ||||||
| 
 | 
 | ||||||
| 	return "!".$text; | 	return "!".$text; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getstring($text) { | function getstring($text) { | ||||||
| 	global $current_locale; | 	global $current_locale; | ||||||
| 	return getstring_($text,$current_locale); | 	return getstring_($text,$current_locale); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getstring2_($text,$params,$locale) { | function getstring2_($text,$params,$locale) { | ||||||
| 	$string = getstring_($text,$locale); | 	$string = getstring_($text,$locale); | ||||||
| 	for( $i = 0; $i < count($params); $i++ ) { | 	for( $i = 0; $i < count($params); $i++ ) { | ||||||
| 		$string = str_replace("{".$i."}", $params[$i], $string); | 		$string = str_replace("{".$i."}", $params[$i], $string); | ||||||
| 	} | 	} | ||||||
| 	return $string; | 	return $string; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getstring2($text,$params) { | function getstring2($text,$params) { | ||||||
| 	global $current_locale; | 	global $current_locale; | ||||||
| 	return getstring2_($text,$params,$current_locale); | 	return getstring2_($text,$params,$current_locale); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function connect() { | function connect() { | ||||||
| 	global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding, $force_charset_in_connection; | 	global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding, $force_charset_in_connection; | ||||||
| 	$link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) | 	$link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) | ||||||
| 		or die('Could not connect: ' . mysql_error()); | 		or die('Could not connect: ' . mysql_error()); | ||||||
| 	mysql_select_db($mysqldb) or die('Could not select database'); | 	mysql_select_db($mysqldb) or die('Could not select database'); | ||||||
| 	if( $force_charset_in_connection ) | 	if( $force_charset_in_connection ) | ||||||
| 		mysql_query("SET character set $dbencoding", $link); | 		mysql_query("SET character set $dbencoding", $link); | ||||||
| 	return $link; | 	return $link; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function perform_query($query,$link) { | function perform_query($query,$link) { | ||||||
| 	mysql_query($query,$link) or die(' Query failed: ' .  | 	mysql_query($query,$link) or die(' Query failed: ' .  | ||||||
| 		mysql_error().": ".$query); | 		mysql_error().": ".$query); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function select_one_row($query,$link) { | function select_one_row($query,$link) { | ||||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .  | 	$result = mysql_query($query,$link) or die(' Query failed: ' .  | ||||||
| 		mysql_error().": ".$query); | 		mysql_error().": ".$query); | ||||||
| 	$line = mysql_fetch_array($result, MYSQL_ASSOC); | 	$line = mysql_fetch_array($result, MYSQL_ASSOC); | ||||||
| 	mysql_free_result($result); | 	mysql_free_result($result); | ||||||
| 	return $line; | 	return $line; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function start_xml_output() { | function select_multi_assoc($query,$link) { | ||||||
| 	header("Cache-Control: no-store, no-cache, must-revalidate"); | 	$sqlresult = mysql_query($query,$link) or die(' Query failed: ' .  | ||||||
| 	header("Content-type: text/xml"); | 		mysql_error().": ".$query); | ||||||
| 	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; | 
 | ||||||
| } | 	$result = array(); | ||||||
| 
 | 	while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) { | ||||||
| function start_html_output() { | 		$result[] = $row; | ||||||
| 	global $output_charset; | 	} | ||||||
| 	header("Cache-Control: no-store, no-cache, must-revalidate"); | 	mysql_free_result($sqlresult); | ||||||
| 	header("Content-type: text/html".(isset($output_charset)?"; charset=".$output_charset:"")); | 	return $result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function escape_with_cdata($text) { | function start_xml_output() { | ||||||
| 	return "<![CDATA[" . str_replace("]]>", "]]>]]><![CDATA[",$text) . "]]>"; | 	header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||||
| } | 	header("Content-type: text/xml"); | ||||||
| 
 | 	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; | ||||||
| function form_value($key) { | } | ||||||
| 	global $page; | 
 | ||||||
| 	if( isset($page) && isset($page["form$key"]) ) | function start_html_output() { | ||||||
| 		return $page["form$key"]; | 	global $output_charset; | ||||||
| 	return ""; | 	header("Cache-Control: no-store, no-cache, must-revalidate"); | ||||||
| } | 	header("Content-type: text/html".(isset($output_charset)?"; charset=".$output_charset:"")); | ||||||
| 
 | } | ||||||
| function form_value_cb($key) { | 
 | ||||||
| 	global $page; | function escape_with_cdata($text) { | ||||||
| 	if( isset($page) && isset($page["form$key"]) ) | 	return "<![CDATA[" . str_replace("]]>", "]]>]]><![CDATA[",$text) . "]]>"; | ||||||
| 		return $page["form$key"] === true; | } | ||||||
| 	return false; | 
 | ||||||
| } | function form_value($key) { | ||||||
| 
 | 	global $page; | ||||||
| function no_field($key) { | 	if( isset($page) && isset($page["form$key"]) ) | ||||||
| 	return getstring2("errors.required",array(getstring($key))); | 		return $page["form$key"]; | ||||||
| } | 	return ""; | ||||||
| 
 | } | ||||||
| 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 form_value_cb($key) { | ||||||
| } | 	global $page; | ||||||
| 
 | 	if( isset($page) && isset($page["form$key"]) ) | ||||||
| function get_image($href,$width,$height) { | 		return $page["form$key"] === true; | ||||||
| 	if( $width != 0 && $height != 0 )                    | 	return false; | ||||||
| 		return "<img src=\"$href\" border=\"0\" width=\"$width\" height=\"$height\"/>";
 | } | ||||||
| 	return "<img src=\"$href\" border=\"0\"/>"; | 
 | ||||||
| } | function no_field($key) { | ||||||
| 
 | 	return getstring2("errors.required",array(getstring($key))); | ||||||
| function get_gifimage_size($file) { | } | ||||||
| 	if( function_exists('gd_info')) { | 
 | ||||||
| 		$info = gd_info(); | function get_popup($href,$message,$title,$wndName,$options) { | ||||||
| 		if( isset($info['GIF Read Support']) && $info['GIF Read Support'] ) { | 	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>"; | ||||||
| 			$img = @imagecreatefromgif($file); | } | ||||||
| 			if($img) { | 
 | ||||||
| 				$height = imagesy($img); | function get_image($href,$width,$height) { | ||||||
| 				$width = imagesx($img); | 	if( $width != 0 && $height != 0 )                    | ||||||
| 				imagedestroy($img); | 		return "<img src=\"$href\" border=\"0\" width=\"$width\" height=\"$height\"/>";
 | ||||||
| 				return array($width,$height); | 	return "<img src=\"$href\" border=\"0\"/>"; | ||||||
| 			} | } | ||||||
| 		} | 
 | ||||||
| 	} | function get_gifimage_size($file) { | ||||||
| 	return array(0,0); | 	if( function_exists('gd_info')) { | ||||||
| } | 		$info = gd_info(); | ||||||
| 
 | 		if( isset($info['GIF Read Support']) && $info['GIF Read Support'] ) { | ||||||
| function add_params($servlet, $params) { | 			$img = @imagecreatefromgif($file); | ||||||
| 	$infix = '?'; | 			if($img) { | ||||||
| 	if( strstr($servlet,$infix) !== FALSE ) | 				$height = imagesy($img); | ||||||
| 		$infix = '&'; | 				$width = imagesx($img); | ||||||
| 	foreach($params as $k => $v) { | 				imagedestroy($img); | ||||||
| 		$servlet .= $infix.$k."=".$v; | 				return array($width,$height); | ||||||
| 		$infix = '&'; | 			} | ||||||
| 	} | 		} | ||||||
| 	return $servlet; | 	} | ||||||
| } | 	return array(0,0); | ||||||
| 
 | } | ||||||
| function div($a,$b) { | 
 | ||||||
|     return ($a-($a % $b)) / $b; | function add_params($servlet, $params) { | ||||||
| } | 	$infix = '?'; | ||||||
| 
 | 	if( strstr($servlet,$infix) !== FALSE ) | ||||||
| function date_diff($seconds) { | 		$infix = '&'; | ||||||
|     $minutes = div($seconds,60); | 	foreach($params as $k => $v) { | ||||||
| 	$seconds = $seconds % 60; | 		$servlet .= $infix.$k."=".$v; | ||||||
| 	if( $minutes < 60 ) { | 		$infix = '&'; | ||||||
| 		return sprintf("%02d:%02d",$minutes, $seconds); | 	} | ||||||
| 	} else { | 	return $servlet; | ||||||
| 		$hours = div($minutes,60); | } | ||||||
| 		$minutes = $minutes % 60; | 
 | ||||||
| 		return sprintf("%02d:%02d:%02d",$hours, $minutes, $seconds); | function div($a,$b) { | ||||||
| 	} |     return ($a-($a % $b)) / $b; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function quote_smart($value,$link) { | function date_diff($seconds) { | ||||||
| 	if (get_magic_quotes_gpc()) { |     $minutes = div($seconds,60); | ||||||
| 		$value = stripslashes($value); | 	$seconds = $seconds % 60; | ||||||
| 	} | 	if( $minutes < 60 ) { | ||||||
| 	return mysql_real_escape_string($value,$link); | 		return sprintf("%02d:%02d",$minutes, $seconds); | ||||||
| } | 	} else { | ||||||
| 
 | 		$hours = div($minutes,60); | ||||||
| function get_app_location($showhost,$issecure) { | 		$minutes = $minutes % 60; | ||||||
| 	if( $showhost ) { | 		return sprintf("%02d:%02d:%02d",$hours, $minutes, $seconds); | ||||||
| 		return ($issecure?"https://":"http://").$_SERVER['HTTP_HOST']."/webim"; | 	} | ||||||
| 	} else { | } | ||||||
| 		return "/webim"; | 
 | ||||||
| 	} | 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 | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *  MySQL Database parameters |  *  MySQL Database parameters | ||||||
|  */ |  */ | ||||||
| $mysqlhost = "localhost"; | $mysqlhost = "localhost"; | ||||||
| $mysqldb = "webim_db"; | $mysqldb = "webim_db"; | ||||||
| $mysqllogin = "webim_lite"; | $mysqllogin = "webim_lite"; | ||||||
| $mysqlpass = "123"; | $mysqlpass = "123"; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *  Localization parameters |  *  Localization parameters | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| // Use CP-1251 database
 | // Use CP-1251 database
 | ||||||
| $dbencoding = "cp1251"; | $dbencoding = "cp1251"; | ||||||
| $webim_encoding = "cp1251"; | $webim_encoding = "cp1251"; | ||||||
| $request_encoding = "utf-8"; | $request_encoding = "utf-8"; | ||||||
| $output_charset = "Windows-1251"; | $output_charset = "Windows-1251"; | ||||||
| $force_charset_in_connection = true; | $force_charset_in_connection = true; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| // Use UTF-8 database
 | // Use UTF-8 database
 | ||||||
| /* | /* | ||||||
| $dbencoding = "utf8"; | $dbencoding = "utf8"; | ||||||
| $webim_encoding = "cp1251"; | $webim_encoding = "cp1251"; | ||||||
| $request_encoding = "utf-8"; | $request_encoding = "utf-8"; | ||||||
| $output_charset = "Windows-1251"; | $output_charset = "Windows-1251"; | ||||||
| $force_charset_in_connection = true; | $force_charset_in_connection = true; | ||||||
| */ | */ | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   From field in outgoing mail. |  *   From field in outgoing mail. | ||||||
|  */ |  */ | ||||||
| $webim_from_email = "webim@yourdomain.com"; // email from field
 | $webim_from_email = "webim@yourdomain.com"; // email from field
 | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   Company international name. |  *   Company international name. | ||||||
|  */ |  */ | ||||||
| $company_name = "My Company Ltd."; | $company_name = "My Company Ltd."; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   Company logo.  |  *   Company logo.  | ||||||
|  */ |  */ | ||||||
| $company_logo_link = ""; | $company_logo_link = ""; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   Locales  |  *   Locales  | ||||||
|  */ |  */ | ||||||
| $available_locales = array("en", "ru"); | $available_locales = array("en", "ru"); | ||||||
| $home_locale = "ru";                        // native name will be used in this locale
 | $home_locale = "ru";                        // native name will be used in this locale
 | ||||||
| $default_locale = "en";                     // if user does not provide known lang
 | $default_locale = "en";                     // if user does not provide known lang
 | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   Allows users to change their names |  *   Allows users to change their names | ||||||
|  */ |  */ | ||||||
| $user_can_change_name = true; | $user_can_change_name = true; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   How to build presentable visitor name from {name}. Default: {name} |  *   How to build presentable visitor name from {name}. Default: {name} | ||||||
|  */  |  */  | ||||||
| $presentable_name_pattern = "{name}"; | $presentable_name_pattern = "{name}"; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   Method of getting information about remote user. For example, you could |  *   Method of getting information about remote user. For example, you could | ||||||
|  *   have user name or id in session. Default value: visitor_from_request |  *   have user name or id in session. Default value: visitor_from_request | ||||||
|  */ |  */ | ||||||
| $remote_visitor = 'visitor_from_request'; | $remote_visitor = 'visitor_from_request'; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *   Timeout (in seconds) when online operator becomes offline. |  *   Timeout (in seconds) when online operator becomes offline. | ||||||
|  */ |  */ | ||||||
| $online_timeout = 30; | $online_timeout = 30; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
|  | |||||||
| @ -1,48 +1,48 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| $_utf8win1251 = array( | $_utf8win1251 = array( | ||||||
| "\xD0\x90"=>"\xC0","\xD0\x91"=>"\xC1","\xD0\x92"=>"\xC2","\xD0\x93"=>"\xC3","\xD0\x94"=>"\xC4", | "\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\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\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\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\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\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\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\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\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\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", | "\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\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\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\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"); | "\xD1\x96"=>"\xB3","\xD1\x97"=>"\xBF","\xD1\x94"=>"\xBA","\xD1\x9E"=>"\xA2"); | ||||||
| $_win1251utf8 = array( | $_win1251utf8 = array( | ||||||
| "\xC0"=>"\xD0\x90","\xC1"=>"\xD0\x91","\xC2"=>"\xD0\x92","\xC3"=>"\xD0\x93","\xC4"=>"\xD0\x94", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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", | "\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"); | "\xB3"=>"\xD1\x96","\xBF"=>"\xD1\x97","\xBA"=>"\xD1\x94","\xA2"=>"\xD1\x9E"); | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,150 +1,150 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| function operator_by_login($login) { | function operator_by_login($login) { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 	$operator = select_one_row( | 	$operator = select_one_row( | ||||||
| 		 "select * from chatoperator where vclogin = '".mysql_real_escape_string($login)."'", $link ); | 		 "select * from chatoperator where vclogin = '".mysql_real_escape_string($login)."'", $link ); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 	return $operator; | 	return $operator; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function operator_by_id_($id,$link) { | function operator_by_id_($id,$link) { | ||||||
| 	return select_one_row( | 	return select_one_row( | ||||||
| 		 "select * from chatoperator where operatorid = $id", $link ); | 		 "select * from chatoperator where operatorid = $id", $link ); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function operator_by_id($id) { | function operator_by_id($id) { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 	$operator = operator_by_id_($id,$link); | 	$operator = operator_by_id_($id,$link); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 	return $operator; | 	return $operator; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_operators() { | function get_operators() { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 
 | 
 | ||||||
| 	$query = "select * from chatoperator order by vclogin"; | 	$query = "select * from chatoperator order by vclogin"; | ||||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||||
| 
 | 
 | ||||||
| 	$operators = array(); | 	$operators = array(); | ||||||
| 	while ($op = mysql_fetch_array($result, MYSQL_ASSOC)) { | 	while ($op = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||||
| 		$operators[] = $op; | 		$operators[] = $op; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	mysql_free_result($result); | 	mysql_free_result($result); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 	return $operators; | 	return $operators; | ||||||
| }  | }  | ||||||
| 
 | 
 | ||||||
| function update_operator($operatorid,$login,$password,$localename,$commonname) { | function update_operator($operatorid,$login,$password,$localename,$commonname) { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 	$query = sprintf( | 	$query = sprintf( | ||||||
| 		"update chatoperator set vclogin = '%s',%s vclocalename = '%s',vccommonname = '%s' where operatorid = %s", | 		"update chatoperator set vclogin = '%s',%s vclocalename = '%s',vccommonname = '%s' where operatorid = %s", | ||||||
| 		mysql_real_escape_string($login), | 		mysql_real_escape_string($login), | ||||||
| 		($password ? " vcpassword='".md5($password)."'," : ""), | 		($password ? " vcpassword='".md5($password)."'," : ""), | ||||||
| 		mysql_real_escape_string($localename), | 		mysql_real_escape_string($localename), | ||||||
| 		mysql_real_escape_string($commonname), | 		mysql_real_escape_string($commonname), | ||||||
| 		$operatorid ); | 		$operatorid ); | ||||||
| 
 | 
 | ||||||
| 	perform_query($query,$link); | 	perform_query($query,$link); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function create_operator($login,$password,$localename,$commonname) { | function create_operator($login,$password,$localename,$commonname) { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 
 | 
 | ||||||
| 	$query = sprintf( | 	$query = sprintf( | ||||||
| 		"insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname) values ('%s','%s','%s','%s')", | 		"insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname) values ('%s','%s','%s','%s')", | ||||||
| 			mysql_real_escape_string($login), | 			mysql_real_escape_string($login), | ||||||
| 			md5($password), | 			md5($password), | ||||||
| 			mysql_real_escape_string($localename), | 			mysql_real_escape_string($localename), | ||||||
| 			mysql_real_escape_string($commonname) ); | 			mysql_real_escape_string($commonname) ); | ||||||
| 
 | 
 | ||||||
| 	perform_query($query,$link); | 	perform_query($query,$link); | ||||||
| 	$id = mysql_insert_id($link); | 	$id = mysql_insert_id($link); | ||||||
| 
 | 
 | ||||||
| 	$newop = select_one_row("select * from chatoperator where operatorid = $id", $link ); | 	$newop = select_one_row("select * from chatoperator where operatorid = $id", $link ); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 	return $newop; | 	return $newop; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function notify_operator_alive($operatorid) { | function notify_operator_alive($operatorid) { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 	perform_query("update chatoperator set dtmlastvisited = CURRENT_TIMESTAMP where operatorid = $operatorid",$link); | 	perform_query("update chatoperator set dtmlastvisited = CURRENT_TIMESTAMP where operatorid = $operatorid",$link); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function has_online_operators() { | function has_online_operators() { | ||||||
| 	global $online_timeout; | 	global $online_timeout; | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 	$row = select_one_row("select min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time from chatoperator",$link); | 	$row = select_one_row("select min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time from chatoperator",$link); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 	return $row['time'] < $online_timeout; | 	return $row['time'] < $online_timeout; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_operator_name($operator) { | function get_operator_name($operator) { | ||||||
| 	global $home_locale, $current_locale; | 	global $home_locale, $current_locale; | ||||||
| 	if( $home_locale == $current_locale ) | 	if( $home_locale == $current_locale ) | ||||||
| 		return $operator['vclocalename']; | 		return $operator['vclocalename']; | ||||||
| 	else | 	else | ||||||
| 		return $operator['vccommonname']; | 		return $operator['vccommonname']; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function generate_button($title,$locale,$inner,$showhost,$forcesecure) { | function generate_button($title,$locale,$inner,$showhost,$forcesecure) { | ||||||
| 	$link = get_app_location($showhost,$forcesecure)."/client.php". ($locale?"?locale=".$locale : ""); | 	$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 -->"; | 	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() { | function check_login() { | ||||||
| 	if( !isset( $_SESSION['operator'] ) ) { | 	if( !isset( $_SESSION['operator'] ) ) { | ||||||
| 		if( isset($_COOKIE['webim_lite']) ) { | 		if( isset($_COOKIE['webim_lite']) ) { | ||||||
| 			list($login,$pwd) = split(",", $_COOKIE['webim_lite'], 2); | 			list($login,$pwd) = split(",", $_COOKIE['webim_lite'], 2); | ||||||
| 			$op = operator_by_login($login); | 			$op = operator_by_login($login); | ||||||
| 			if( $op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd ) { | 			if( $op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd ) { | ||||||
| 				$_SESSION['operator'] = $op; | 				$_SESSION['operator'] = $op; | ||||||
| 				return $op; | 				return $op; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		$_SESSION['backpath'] = $_SERVER['PHP_SELF']; | 		$_SESSION['backpath'] = $_SERVER['PHP_SELF']; | ||||||
| 		header("Location: /webim/operator/login.php"); | 		header("Location: /webim/operator/login.php"); | ||||||
| 		exit; | 		exit; | ||||||
| 	} | 	} | ||||||
| 	return $_SESSION['operator']; | 	return $_SESSION['operator']; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function get_logged_in() { | function get_logged_in() { | ||||||
| 	return isset( $_SESSION['operator'] ) ? $_SESSION['operator'] : FALSE; | 	return isset( $_SESSION['operator'] ) ? $_SESSION['operator'] : FALSE; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function login_operator($operator,$remember) { | function login_operator($operator,$remember) { | ||||||
| 	$_SESSION['operator'] = $operator; | 	$_SESSION['operator'] = $operator; | ||||||
| 	if( $remember ) { | 	if( $remember ) { | ||||||
| 		$value = $operator['vclogin'].",".md5($operator['vcpassword']); | 		$value = $operator['vclogin'].",".md5($operator['vcpassword']); | ||||||
| 		setcookie('webim_lite', $value, time()+60*60*24*1000, "/webim/"); | 		setcookie('webim_lite', $value, time()+60*60*24*1000, "/webim/"); | ||||||
| 
 | 
 | ||||||
| 	} else if( isset($_COOKIE['webim_lite']) ) { | 	} else if( isset($_COOKIE['webim_lite']) ) { | ||||||
| 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function logout_operator() { | function logout_operator() { | ||||||
| 	$_SESSION['operator'] = NULL; | 	$_SESSION['operator'] = NULL; | ||||||
| 	$_SESSION['backpath'] = NULL; | 	$_SESSION['backpath'] = NULL; | ||||||
| 	if( isset($_COOKIE['webim_lite']) ) { | 	if( isset($_COOKIE['webim_lite']) ) { | ||||||
| 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | 		setcookie('webim_lite', '', time() - 3600, "/webim/"); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,99 +1,99 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| $pagination_spacing = "   "; | $pagination_spacing = "   "; | ||||||
| $links_on_page = 5; | $links_on_page = 5; | ||||||
| 
 | 
 | ||||||
| function generate_pagination_link($page,$title) { | function generate_pagination_link($page,$title) { | ||||||
| 	$lnk = $_SERVER['REQUEST_URI']; | 	$lnk = $_SERVER['REQUEST_URI']; | ||||||
| 	$href = preg_replace("/\?page=\d+\&/", "?", preg_replace("/\&page=\d+/", "", $lnk)); | 	$href = preg_replace("/\?page=\d+\&/", "?", preg_replace("/\&page=\d+/", "", $lnk)); | ||||||
| 	$href .= strstr($href,"?") ? "&page=$page" : "?page=$page"; | 	$href .= strstr($href,"?") ? "&page=$page" : "?page=$page"; | ||||||
| 	return "<a href=\"$href\" class=\"pagelink\">$title</a>"; | 	return "<a href=\"$href\" class=\"pagelink\">$title</a>"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function generate_pagination_image($id) { | function generate_pagination_image($id) { | ||||||
| 	global $webimroot; | 	global $webimroot; | ||||||
| 	return "<img src=\"$webimroot/images/$id.gif\" border=\"0\"/>"; | 	return "<img src=\"$webimroot/images/$id.gif\" border=\"0\"/>"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function setup_pagination($items,$default_items_per_page=15) { | function setup_pagination($items,$default_items_per_page=15) { | ||||||
| 	global $page; | 	global $page; | ||||||
| 
 | 
 | ||||||
| 	if( $items ) { | 	if( $items ) { | ||||||
| 		$items_per_page = verifyparam("items", "/^\d{1,3}$/", $default_items_per_page); | 		$items_per_page = verifyparam("items", "/^\d{1,3}$/", $default_items_per_page); | ||||||
| 		if( $items_per_page < 2 ) | 		if( $items_per_page < 2 ) | ||||||
| 			$items_per_page = 2; | 			$items_per_page = 2; | ||||||
| 	 | 	 | ||||||
| 		$total_pages = div(count($items) + $items_per_page - 1, $items_per_page); | 		$total_pages = div(count($items) + $items_per_page - 1, $items_per_page); | ||||||
| 		$curr_page = verifyparam("page", "/^\d{1,6}$/", 1); | 		$curr_page = verifyparam("page", "/^\d{1,6}$/", 1); | ||||||
| 	 | 	 | ||||||
| 		if( $curr_page < 1 ) | 		if( $curr_page < 1 ) | ||||||
| 			$curr_page = 1; | 			$curr_page = 1; | ||||||
| 		if( $curr_page > $total_pages ) | 		if( $curr_page > $total_pages ) | ||||||
| 			$curr_page = $total_pages; | 			$curr_page = $total_pages; | ||||||
| 	 | 	 | ||||||
| 		$start_index = ($curr_page-1)*$items_per_page; | 		$start_index = ($curr_page-1)*$items_per_page; | ||||||
| 		$end_index = min($start_index+$items_per_page, count($items)); | 		$end_index = min($start_index+$items_per_page, count($items)); | ||||||
| 	    $page['pagination.items'] = array_slice($items, $start_index, $end_index-$start_index); | 	    $page['pagination.items'] = array_slice($items, $start_index, $end_index-$start_index); | ||||||
| 	    $page['pagination'] =  | 	    $page['pagination'] =  | ||||||
| 	    	array(  "page" => $curr_page, "items" => $items_per_page, "total" => $total_pages,  | 	    	array(  "page" => $curr_page, "items" => $items_per_page, "total" => $total_pages,  | ||||||
| 	    			"count" => count($items), "start" => $start_index, "end" => $end_index ); | 	    			"count" => count($items), "start" => $start_index, "end" => $end_index ); | ||||||
| 	} else { | 	} else { | ||||||
|     	$page['pagination.items'] = false; |     	$page['pagination.items'] = false; | ||||||
|     	$page['pagination'] = true; |     	$page['pagination'] = true; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function setup_empty_pagination() { | function setup_empty_pagination() { | ||||||
| 	global $page; | 	global $page; | ||||||
|     $page['pagination.items'] = false; |     $page['pagination.items'] = false; | ||||||
|     $page['pagination'] = false; |     $page['pagination'] = false; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function generate_pagination($pagination) { | function generate_pagination($pagination) { | ||||||
| 	global $pagination_spacing, $links_on_page; | 	global $pagination_spacing, $links_on_page; | ||||||
| 	$result = getstring2("tag.pagination.info", | 	$result = getstring2("tag.pagination.info", | ||||||
| 		array($pagination['page'],$pagination['total'],$pagination['start']+1,$pagination['end'],$pagination['count']))."<br/>"; | 		array($pagination['page'],$pagination['total'],$pagination['start']+1,$pagination['end'],$pagination['count']))."<br/>"; | ||||||
| 
 | 
 | ||||||
| 	if( $pagination['total'] > 1 ) { | 	if( $pagination['total'] > 1 ) { | ||||||
| 		$result.="<br/><div class='pagination'>"; | 		$result.="<br/><div class='pagination'>"; | ||||||
| 		$curr_page = $pagination['page']; | 		$curr_page = $pagination['page']; | ||||||
| 
 | 
 | ||||||
| 		$minPage = max( $curr_page - $links_on_page, 1 ); | 		$minPage = max( $curr_page - $links_on_page, 1 ); | ||||||
| 		$maxPage = min( $curr_page + $links_on_page, $pagination['total'] ); | 		$maxPage = min( $curr_page + $links_on_page, $pagination['total'] ); | ||||||
| 		 | 		 | ||||||
| 		if( $curr_page > 1 ) { | 		if( $curr_page > 1 ) { | ||||||
| 			$result .= generate_pagination_link($curr_page-1, generate_pagination_image("prevpage")).$pagination_spacing; | 			$result .= generate_pagination_link($curr_page-1, generate_pagination_image("prevpage")).$pagination_spacing; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		for($i = $minPage; $i <= $maxPage; $i++ ) { | 		for($i = $minPage; $i <= $maxPage; $i++ ) { | ||||||
| 			$title = abs($curr_page-$i) >= $links_on_page && $i != 1 ? "..." : $i; | 			$title = abs($curr_page-$i) >= $links_on_page && $i != 1 ? "..." : $i; | ||||||
| 			if( $i != $curr_page) | 			if( $i != $curr_page) | ||||||
| 				$result .= generate_pagination_link($i, $title); | 				$result .= generate_pagination_link($i, $title); | ||||||
| 			else | 			else | ||||||
| 				$result .= "<span class=\"pagecurrent\">$title</span>"; | 				$result .= "<span class=\"pagecurrent\">$title</span>"; | ||||||
| 			if( $i < $maxPage ) | 			if( $i < $maxPage ) | ||||||
| 				$result .= $pagination_spacing; | 				$result .= $pagination_spacing; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 		if( $curr_page < $pagination['total'] ) { | 		if( $curr_page < $pagination['total'] ) { | ||||||
| 			$result .= $pagination_spacing.generate_pagination_link($curr_page+1, generate_pagination_image("nextpage")); | 			$result .= $pagination_spacing.generate_pagination_link($curr_page+1, generate_pagination_image("nextpage")); | ||||||
| 		} | 		} | ||||||
| 		$result.="</div>"; | 		$result.="</div>"; | ||||||
| 	} | 	} | ||||||
| 	return $result; | 	return $result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,50 +1,50 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('libs/common.php'); | require('libs/common.php'); | ||||||
| require('libs/chat.php'); | require('libs/chat.php'); | ||||||
| 
 | 
 | ||||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||||
| 
 | 
 | ||||||
| $thread = thread_by_id($threadid); | $thread = thread_by_id($threadid); | ||||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||||
| 	die("wrong thread"); | 	die("wrong thread"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $mail = getparam('email'); | $mail = getparam('email'); | ||||||
| $page['email'] = $mail; | $page['email'] = $mail; | ||||||
| 
 | 
 | ||||||
| // TODO check email
 | // TODO check email
 | ||||||
| 
 | 
 | ||||||
| $history = ""; | $history = ""; | ||||||
| $lastid = -1; | $lastid = -1; | ||||||
| $output = get_messages( $threadid,"text",true,$lastid ); | $output = get_messages( $threadid,"text",true,$lastid ); | ||||||
| foreach( $output as $msg ) { | foreach( $output as $msg ) { | ||||||
| 	$history .= $msg; | 	$history .= $msg; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $subject = getstring("mail.user.history.subject"); | $subject = getstring("mail.user.history.subject"); | ||||||
| $body = getstring2("mail.user.history.body", array($thread['userName'],$history) );  | $body = getstring2("mail.user.history.body", array($thread['userName'],$history) );  | ||||||
| 
 | 
 | ||||||
| $headers = 'From: '.$webim_from_email."\r\n" . | $headers = 'From: '.$webim_from_email."\r\n" . | ||||||
|    'Reply-To: '.$webim_from_email."\r\n" . |    'Reply-To: '.$webim_from_email."\r\n" . | ||||||
|    'X-Mailer: PHP/'.phpversion(); |    'X-Mailer: PHP/'.phpversion(); | ||||||
| 
 | 
 | ||||||
| mail($mail,$subject,wordwrap($body,70),$headers); | mail($mail,$subject,wordwrap($body,70),$headers); | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('view/chat_mailsent.php'); | require('view/chat_mailsent.php'); | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,56 +1,56 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/chat.php'); | require('../libs/chat.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | $threadid = verifyparam( "thread", "/^\d{1,8}$/"); | ||||||
| 
 | 
 | ||||||
| if( !isset($_GET['token']) ) { | if( !isset($_GET['token']) ) { | ||||||
| 
 | 
 | ||||||
| 	if( get_remote_level($_SERVER['HTTP_USER_AGENT']) != "ajaxed" ) { | 	if( get_remote_level($_SERVER['HTTP_USER_AGENT']) != "ajaxed" ) { | ||||||
| 		die("old browser is used, please update it"); | 		die("old browser is used, please update it"); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	$thread = thread_by_id($threadid); | 	$thread = thread_by_id($threadid); | ||||||
| 	if( !$thread || !isset($thread['ltoken']) ) { | 	if( !$thread || !isset($thread['ltoken']) ) { | ||||||
| 		die("wrong thread"); | 		die("wrong thread"); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	 | 	 | ||||||
| 	take_thread($thread,$operator); | 	take_thread($thread,$operator); | ||||||
| 
 | 
 | ||||||
| 	$token = $thread['ltoken']; | 	$token = $thread['ltoken']; | ||||||
| 	header("Location: ".$_SERVER['PHP_SELF']."?thread=$threadid&token=$token"); | 	header("Location: ".$_SERVER['PHP_SELF']."?thread=$threadid&token=$token"); | ||||||
| 	exit; | 	exit; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $token = verifyparam( "token", "/^\d{1,8}$/"); | $token = verifyparam( "token", "/^\d{1,8}$/"); | ||||||
| 
 | 
 | ||||||
| $thread = thread_by_id($threadid); | $thread = thread_by_id($threadid); | ||||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||||
| 	die("wrong thread"); | 	die("wrong thread"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| setup_chatview_for_operator($thread, $operator); | setup_chatview_for_operator($thread, $operator); | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 	require('../view/chat_ajaxed.php'); | 	require('../view/chat_ajaxed.php'); | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,65 +1,65 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| // collect available images and locales
 | // collect available images and locales
 | ||||||
| $imageLocales = array(); | $imageLocales = array(); | ||||||
| $imagesDir = '../images/webim'; | $imagesDir = '../images/webim'; | ||||||
| if($handle = opendir($imagesDir)) { | if($handle = opendir($imagesDir)) { | ||||||
| 	while (false !== ($file = readdir($handle))) { | 	while (false !== ($file = readdir($handle))) { | ||||||
| 		if (preg_match("/^(\w+)_([\w-]+)_on.gif$/", $file, $matches)  | 		if (preg_match("/^(\w+)_([\w-]+)_on.gif$/", $file, $matches)  | ||||||
| 				&& is_file("$imagesDir/".$matches[1]."_".$matches[2]."_off.gif")) { | 				&& is_file("$imagesDir/".$matches[1]."_".$matches[2]."_off.gif")) { | ||||||
| 			$image = $matches[1]; | 			$image = $matches[1]; | ||||||
| 			if( !isset($imageLocales[$image]) ) { | 			if( !isset($imageLocales[$image]) ) { | ||||||
| 				$imageLocales[$image] = array(); | 				$imageLocales[$image] = array(); | ||||||
| 			} | 			} | ||||||
| 			$imageLocales[$image][] = $matches[2]; | 			$imageLocales[$image][] = $matches[2]; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	closedir($handle); | 	closedir($handle); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $image = verifyparam("image","/^\w+$/", "webim"); | $image = verifyparam("image","/^\w+$/", "webim"); | ||||||
| $image_locales = $imageLocales[$image]; | $image_locales = $imageLocales[$image]; | ||||||
| 
 | 
 | ||||||
| $showhost = verifyparam("hostname","/^on$/", "") == "on"; | $showhost = verifyparam("hostname","/^on$/", "") == "on"; | ||||||
| $forcesecure = verifyparam("secure","/^on$/", "") == "on"; | $forcesecure = verifyparam("secure","/^on$/", "") == "on"; | ||||||
| 
 | 
 | ||||||
| $lang = verifyparam("lang", "/^\w\w$/", ""); | $lang = verifyparam("lang", "/^\w\w$/", ""); | ||||||
| if( !$lang || !in_array($lang,$image_locales) ) | if( !$lang || !in_array($lang,$image_locales) ) | ||||||
| 	$lang = in_array($current_locale,$image_locales) ? $current_locale : $image_locales[0]; | 	$lang = in_array($current_locale,$image_locales) ? $current_locale : $image_locales[0]; | ||||||
| 
 | 
 | ||||||
| $file = "../images/webim/${image}_${lang}_on.gif"; | $file = "../images/webim/${image}_${lang}_on.gif"; | ||||||
| $size = get_gifimage_size($file); | $size = get_gifimage_size($file); | ||||||
| 
 | 
 | ||||||
| $message = get_image(get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang",$size[0],$size[1]); | $message = get_image(get_app_location($showhost,$forcesecure)."/button.php?image=$image&lang=$lang",$size[0],$size[1]); | ||||||
| 
 | 
 | ||||||
| $page = array(); | $page = array(); | ||||||
| $page['operator'] = get_operator_name($operator); | $page['operator'] = get_operator_name($operator); | ||||||
| $page['buttonCode'] = generate_button("",$lang,$message,$showhost,$forcesecure); | $page['buttonCode'] = generate_button("",$lang,$message,$showhost,$forcesecure); | ||||||
| $page['availableImages'] = array_keys($imageLocales); | $page['availableImages'] = array_keys($imageLocales); | ||||||
| $page['availableLocales'] = $image_locales; | $page['availableLocales'] = $image_locales; | ||||||
| 
 | 
 | ||||||
| $page['formimage'] = $image; | $page['formimage'] = $image; | ||||||
| $page['formlang'] = $lang; | $page['formlang'] = $lang; | ||||||
| $page['formhostname'] = $showhost; | $page['formhostname'] = $showhost; | ||||||
| $page['formsecure'] = $forcesecure; | $page['formsecure'] = $forcesecure; | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/gen_button.php'); | require('../view/gen_button.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,55 +1,55 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Pavel Petroshenko - initial API and implementation |  *    Pavel Petroshenko - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| require('../libs/chat.php'); | require('../libs/chat.php'); | ||||||
| require('../libs/pagination.php'); | require('../libs/pagination.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| $page = array( 'operator' => get_operator_name($operator) ); | $page = array( 'operator' => get_operator_name($operator) ); | ||||||
| $query = isset($_GET['q']) ? $_GET['q'] : false; | $query = isset($_GET['q']) ? $_GET['q'] : false; | ||||||
| 
 | 
 | ||||||
| if($query !== false) { | if($query !== false) { | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 
 | 
 | ||||||
| 	$result = mysql_query( | 	$result = mysql_query( | ||||||
| 		 "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".  | 		 "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ".  | ||||||
|     	 "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". |     	 "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". | ||||||
| 		 "chatthread.remote, chatthread.agentName, chatthread.userName ". | 		 "chatthread.remote, chatthread.agentName, chatthread.userName ". | ||||||
| 		 "from chatthread, chatmessage ". | 		 "from chatthread, chatmessage ". | ||||||
| 		 "where chatmessage.threadid = chatthread.threadid and ". | 		 "where chatmessage.threadid = chatthread.threadid and ". | ||||||
| 			"((chatthread.userName LIKE '%%$query%%') or ". | 			"((chatthread.userName LIKE '%%$query%%') or ". | ||||||
| 			" (chatmessage.tmessage LIKE '%%$query%%'))". | 			" (chatmessage.tmessage LIKE '%%$query%%'))". | ||||||
| 		 "order by created DESC", $link)  | 		 "order by created DESC", $link)  | ||||||
| 							or die(' Query failed: ' .mysql_error().": ".$query); | 							or die(' Query failed: ' .mysql_error().": ".$query); | ||||||
| 
 | 
 | ||||||
| 	$foundThreads = array(); | 	$foundThreads = array(); | ||||||
| 	while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) { | 	while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||||
| 		$foundThreads[] = $thread; | 		$foundThreads[] = $thread; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	mysql_free_result($result); | 	mysql_free_result($result); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 
 | 
 | ||||||
| 	$page['formq'] = $query; | 	$page['formq'] = $query; | ||||||
| 	setup_pagination($foundThreads); | 	setup_pagination($foundThreads); | ||||||
| } else { | } else { | ||||||
| 	setup_empty_pagination(); | 	setup_empty_pagination(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/thread_search.php'); | require('../view/thread_search.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,39 +1,39 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| $page = array(  | $page = array(  | ||||||
| 	'operator' => get_operator_name($operator), | 	'operator' => get_operator_name($operator), | ||||||
| 	'version' => 'v1.0.7' | 	'version' => 'v1.0.7' | ||||||
| ); | ); | ||||||
| 
 | 
 | ||||||
| $localeLinks = ""; | $localeLinks = ""; | ||||||
| foreach($available_locales as $k) { | foreach($available_locales as $k) { | ||||||
| 	if( strlen($localeLinks) > 0 ) | 	if( strlen($localeLinks) > 0 ) | ||||||
| 		$localeLinks .= " • "; | 		$localeLinks .= " • "; | ||||||
| 	if( $k == $current_locale ) | 	if( $k == $current_locale ) | ||||||
| 		$localeLinks .= $k; | 		$localeLinks .= $k; | ||||||
| 	else | 	else | ||||||
| 		$localeLinks .= "<a href=\"/webim/operator/index.php?locale=$k\">$k</a>";
 | 		$localeLinks .= "<a href=\"/webim/operator/index.php?locale=$k\">$k</a>";
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $page['localeLinks'] = $localeLinks; | $page['localeLinks'] = $localeLinks; | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/menu.php'); | require('../view/menu.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,42 +1,42 @@ | |||||||
| <?php          | <?php          | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $errors = array(); | $errors = array(); | ||||||
| if( isset($_POST['login']) && isset($_POST['password']) ) { | if( isset($_POST['login']) && isset($_POST['password']) ) { | ||||||
| 	$login = getparam('login'); | 	$login = getparam('login'); | ||||||
| 	$password = getparam('password'); | 	$password = getparam('password'); | ||||||
| 	$remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on"; | 	$remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on"; | ||||||
| 
 | 
 | ||||||
| 	$operator = operator_by_login( $login ); | 	$operator = operator_by_login( $login ); | ||||||
| 	if( $operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) ) { | 	if( $operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) ) { | ||||||
| 
 | 
 | ||||||
| 		$target = isset($_SESSION['backpath'])  | 		$target = isset($_SESSION['backpath'])  | ||||||
| 				? $_SESSION['backpath']  | 				? $_SESSION['backpath']  | ||||||
| 				: dirname($_SERVER['PHP_SELF'])."/index.php"; | 				: dirname($_SERVER['PHP_SELF'])."/index.php"; | ||||||
| 		 | 		 | ||||||
|         login_operator($operator,$remember); |         login_operator($operator,$remember); | ||||||
| 		header("Location: $target"); | 		header("Location: $target"); | ||||||
| 		exit; | 		exit; | ||||||
| 	} else { | 	} else { | ||||||
| 		$errors[] = getstring("page_login.error"); | 		$errors[] = getstring("page_login.error"); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $page = array( 'backPath' => '', 'formisRemember' => true ); | $page = array( 'backPath' => '', 'formisRemember' => true ); | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/login.php'); | require('../view/login.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,24 +1,24 @@ | |||||||
| <?php          | <?php          | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| logout_operator(); | logout_operator(); | ||||||
| 
 | 
 | ||||||
| $target = dirname($_SERVER['PHP_SELF'])."/login.php"; | $target = dirname($_SERVER['PHP_SELF'])."/login.php"; | ||||||
| header("Location: $target"); | header("Location: $target"); | ||||||
| exit; | exit; | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,85 +1,85 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| $page = array('agentId' => ''); | $page = array('agentId' => ''); | ||||||
| $errors = array(); | $errors = array(); | ||||||
| 
 | 
 | ||||||
| if( isset($_POST['login']) && isset($_POST['password']) ) { | if( isset($_POST['login']) && isset($_POST['password']) ) { | ||||||
| 	$agentId = verifyparam( "agentId", "/^(\d{1,9})?$/", ""); | 	$agentId = verifyparam( "agentId", "/^(\d{1,9})?$/", ""); | ||||||
| 	$login = getparam('login'); | 	$login = getparam('login'); | ||||||
| 	$password = getparam('password'); | 	$password = getparam('password'); | ||||||
| 	$passwordConfirm = getparam('passwordConfirm'); | 	$passwordConfirm = getparam('passwordConfirm'); | ||||||
| 	$name = getparam('name'); | 	$name = getparam('name'); | ||||||
| 	$commonname = getparam('commonname'); | 	$commonname = getparam('commonname'); | ||||||
| 
 | 
 | ||||||
| 	if( !$name ) | 	if( !$name ) | ||||||
| 		$errors[] = no_field("form.field.agent_name"); | 		$errors[] = no_field("form.field.agent_name"); | ||||||
| 
 | 
 | ||||||
| 	if( !$commonname ) | 	if( !$commonname ) | ||||||
| 		$errors[] = no_field("form.field.agent_commonname"); | 		$errors[] = no_field("form.field.agent_commonname"); | ||||||
| 
 | 
 | ||||||
| 	if( !$login ) | 	if( !$login ) | ||||||
| 		$errors[] = no_field("form.field.login"); | 		$errors[] = no_field("form.field.login"); | ||||||
| 
 | 
 | ||||||
| 	if( !$agentId && !$password ) | 	if( !$agentId && !$password ) | ||||||
| 		$errors[] = no_field("form.field.password"); | 		$errors[] = no_field("form.field.password"); | ||||||
| 
 | 
 | ||||||
| 	if( $password != $passwordConfirm ) | 	if( $password != $passwordConfirm ) | ||||||
| 		$errors[] = getstring("my_settings.error.password_match"); | 		$errors[] = getstring("my_settings.error.password_match"); | ||||||
| 
 | 
 | ||||||
| 	$login_operator = operator_by_login($login); | 	$login_operator = operator_by_login($login); | ||||||
| 	if( (!$agentId && $login_operator) ||  | 	if( (!$agentId && $login_operator) ||  | ||||||
| 		( $agentId && $login_operator && $agentId != $login_operator['operatorid']) ) | 		( $agentId && $login_operator && $agentId != $login_operator['operatorid']) ) | ||||||
| 		$errors[] = getstring("page_agent.error.duplicate_login"); | 		$errors[] = getstring("page_agent.error.duplicate_login"); | ||||||
| 
 | 
 | ||||||
| 	if( count($errors) == 0 ) { | 	if( count($errors) == 0 ) { | ||||||
| 		if( $agentId ) { | 		if( $agentId ) { | ||||||
| 			update_operator($agentId,$login,$password,$name,$commonname); | 			update_operator($agentId,$login,$password,$name,$commonname); | ||||||
| 		} else { | 		} else { | ||||||
| 			create_operator($login,$password,$name,$commonname); | 			create_operator($login,$password,$name,$commonname); | ||||||
| 		} | 		} | ||||||
| 		header("Location: ".dirname($_SERVER['PHP_SELF'])."/operators.php"); | 		header("Location: ".dirname($_SERVER['PHP_SELF'])."/operators.php"); | ||||||
| 		exit; | 		exit; | ||||||
| 	} else { | 	} else { | ||||||
| 		$page['formlogin'] = $login; | 		$page['formlogin'] = $login; | ||||||
| 		$page['formname'] = $name; | 		$page['formname'] = $name; | ||||||
| 		$page['formcommonname'] = $commonname; | 		$page['formcommonname'] = $commonname; | ||||||
| 		$page['agentId'] = $agentId; | 		$page['agentId'] = $agentId; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| } else if( isset($_GET['op']) ) { | } else if( isset($_GET['op']) ) { | ||||||
| 	$login = verifyparam( 'op', "/^[\w_]+$/"); | 	$login = verifyparam( 'op', "/^[\w_]+$/"); | ||||||
| 	$op = operator_by_login( $login ); | 	$op = operator_by_login( $login ); | ||||||
| 
 | 
 | ||||||
| 	if( !$op ) { | 	if( !$op ) { | ||||||
| 		$errors[] = getstring("no_such_operator"); | 		$errors[] = getstring("no_such_operator"); | ||||||
| 		$page['formlogin'] = $login; | 		$page['formlogin'] = $login; | ||||||
| 	} else { | 	} else { | ||||||
| 		$page['formlogin'] = $op['vclogin']; | 		$page['formlogin'] = $op['vclogin']; | ||||||
| 		$page['formname'] = $op['vclocalename']; | 		$page['formname'] = $op['vclocalename']; | ||||||
| 		$page['formcommonname'] = $op['vccommonname']; | 		$page['formcommonname'] = $op['vccommonname']; | ||||||
| 		$page['agentId'] = $op['operatorid']; | 		$page['agentId'] = $op['operatorid']; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $page['operator'] = get_operator_name($operator); | $page['operator'] = get_operator_name($operator); | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/agent.php'); | require('../view/agent.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,26 +1,26 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| $page = array(); | $page = array(); | ||||||
| $page['allowedAgents'] = get_operators(); | $page['allowedAgents'] = get_operators(); | ||||||
| $page['operator'] = get_operator_name($operator); | $page['operator'] = get_operator_name($operator); | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/agents.php'); | require('../view/agents.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,32 +1,32 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| require('../libs/chat.php'); | require('../libs/chat.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| $page = array( 'operator' => get_operator_name($operator) ); | $page = array( 'operator' => get_operator_name($operator) ); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| if( isset($_GET['threadid'])) { | if( isset($_GET['threadid'])) { | ||||||
|         $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); |         $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); | ||||||
| 	$lastid = -1; | 	$lastid = -1; | ||||||
| 	$page['threadMessages'] = get_messages($threadid,"html",false,$lastid); | 	$page['threadMessages'] = get_messages($threadid,"html",false,$lastid); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/thread_log.php'); | require('../view/thread_log.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,98 +1,98 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/chat.php'); | require('../libs/chat.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = get_logged_in(); | $operator = get_logged_in(); | ||||||
| if( !$operator ) { | if( !$operator ) { | ||||||
| 	start_xml_output(); | 	start_xml_output(); | ||||||
| 	echo "<error><descr>".myiconv($webim_encoding,"utf-8",escape_with_cdata(getstring("agent.not_logged_in")))."</descr></error>"; | 	echo "<error><descr>".myiconv($webim_encoding,"utf-8",escape_with_cdata(getstring("agent.not_logged_in")))."</descr></error>"; | ||||||
| 	exit; | 	exit; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| $threadstate_to_string = array( | $threadstate_to_string = array( | ||||||
| 	$state_queue => "wait", | 	$state_queue => "wait", | ||||||
| 	$state_waiting => "prio", | 	$state_waiting => "prio", | ||||||
| 	$state_chatting => "chat", | 	$state_chatting => "chat", | ||||||
| 	$state_closed => "closed" | 	$state_closed => "closed" | ||||||
| ); | ); | ||||||
| 
 | 
 | ||||||
| $threadstate_key = array( | $threadstate_key = array( | ||||||
| 	$state_queue => "chat.thread.state_wait", | 	$state_queue => "chat.thread.state_wait", | ||||||
| 	$state_waiting => "chat.thread.state_wait_for_another_agent", | 	$state_waiting => "chat.thread.state_wait_for_another_agent", | ||||||
| 	$state_chatting => "chat.thread.state_chatting_with_agent", | 	$state_chatting => "chat.thread.state_chatting_with_agent", | ||||||
| 	$state_closed => "chat.thread.state_closed" | 	$state_closed => "chat.thread.state_closed" | ||||||
| ); | ); | ||||||
| 
 | 
 | ||||||
| function thread_to_xml($thread) { | function thread_to_xml($thread) { | ||||||
| 	global $threadstate_to_string, $threadstate_key; | 	global $threadstate_to_string, $threadstate_key; | ||||||
| 	$state = $threadstate_to_string[$thread['istate']]; | 	$state = $threadstate_to_string[$thread['istate']]; | ||||||
| 	$result = "<thread id=\"".$thread['threadid']."\" stateid=\"$state\"";
 | 	$result = "<thread id=\"".$thread['threadid']."\" stateid=\"$state\"";
 | ||||||
| 	if( $state == "closed" ) | 	if( $state == "closed" ) | ||||||
| 		return $result."/>"; | 		return $result."/>"; | ||||||
| 
 | 
 | ||||||
| 	$state = getstring($threadstate_key[$thread['istate']]); | 	$state = getstring($threadstate_key[$thread['istate']]); | ||||||
| 	$threadoperator = ($thread['agentName'] ? $thread['agentName'] : "-"); | 	$threadoperator = ($thread['agentName'] ? $thread['agentName'] : "-"); | ||||||
| 
 | 
 | ||||||
| 	$result .= " canopen=\"true\""; | 	$result .= " canopen=\"true\""; | ||||||
| 	$result .= " state=\"$state\">";
 | 	$result .= " state=\"$state\">";
 | ||||||
| 	$result .= "<name>".htmlspecialchars(htmlspecialchars(get_user_name($thread['userName'])))."</name>"; | 	$result .= "<name>".htmlspecialchars(htmlspecialchars(get_user_name($thread['userName'])))."</name>"; | ||||||
| 	$result .= "<addr>".htmlspecialchars(htmlspecialchars($thread['remote']))."</addr>"; | 	$result .= "<addr>".htmlspecialchars(htmlspecialchars($thread['remote']))."</addr>"; | ||||||
| 	$result .= "<agent>".htmlspecialchars(htmlspecialchars($threadoperator))."</agent>"; | 	$result .= "<agent>".htmlspecialchars(htmlspecialchars($threadoperator))."</agent>"; | ||||||
| 	$result .= "<time>".$thread['unix_timestamp(dtmcreated)']."000</time>"; | 	$result .= "<time>".$thread['unix_timestamp(dtmcreated)']."000</time>"; | ||||||
| 	$result .= "<modified>".$thread['unix_timestamp(dtmmodified)']."000</modified>"; | 	$result .= "<modified>".$thread['unix_timestamp(dtmmodified)']."000</modified>"; | ||||||
| 	$result .= "</thread>"; | 	$result .= "</thread>"; | ||||||
| 	return $result; | 	return $result; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function print_pending_threads($since) { | function print_pending_threads($since) { | ||||||
| 	global $webim_encoding; | 	global $webim_encoding; | ||||||
| 	$link = connect(); | 	$link = connect(); | ||||||
| 
 | 
 | ||||||
| 	$revision = $since; | 	$revision = $since; | ||||||
| 	$output = array(); | 	$output = array(); | ||||||
| 	$query = "select threadid, userName, agentName, unix_timestamp(dtmcreated), ". | 	$query = "select threadid, userName, agentName, unix_timestamp(dtmcreated), ". | ||||||
| 			 "unix_timestamp(dtmmodified), lrevision, istate, remote ". | 			 "unix_timestamp(dtmmodified), lrevision, istate, remote ". | ||||||
| 			 "from chatthread where lrevision > $since ORDER BY threadid"; | 			 "from chatthread where lrevision > $since ORDER BY threadid"; | ||||||
| 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | 	$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); | ||||||
| 
 | 
 | ||||||
| 	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { | 	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { | ||||||
| 		$thread = thread_to_xml($row); | 		$thread = thread_to_xml($row); | ||||||
| 		$output[] = $thread; | 		$output[] = $thread; | ||||||
| 		if( $row['lrevision'] > $revision ) | 		if( $row['lrevision'] > $revision ) | ||||||
| 			$revision = $row['lrevision']; | 			$revision = $row['lrevision']; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	mysql_free_result($result); | 	mysql_free_result($result); | ||||||
| 	mysql_close($link); | 	mysql_close($link); | ||||||
| 
 | 
 | ||||||
| 	start_xml_output(); | 	start_xml_output(); | ||||||
| 	echo "<threads revision=\"$revision\" time=\"".time()."000\">"; | 	echo "<threads revision=\"$revision\" time=\"".time()."000\">"; | ||||||
| 	foreach( $output as $thr ) { | 	foreach( $output as $thr ) { | ||||||
| 		print myiconv($webim_encoding,"utf-8",$thr); | 		print myiconv($webim_encoding,"utf-8",$thr); | ||||||
| 	} | 	} | ||||||
| 	echo "</threads>"; | 	echo "</threads>"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ////////
 | ////////
 | ||||||
| 
 | 
 | ||||||
| $since = verifyparam( "since", "/^\d{1,9}$/", 0); | $since = verifyparam( "since", "/^\d{1,9}$/", 0); | ||||||
| 
 | 
 | ||||||
| print_pending_threads($since); | print_pending_threads($since); | ||||||
| notify_operator_alive($operator['operatorid']); | notify_operator_alive($operator['operatorid']); | ||||||
| exit; | exit; | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,26 +1,26 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('../libs/common.php'); | require('../libs/common.php'); | ||||||
| require('../libs/operator.php'); | require('../libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $operator = check_login(); | $operator = check_login(); | ||||||
| 
 | 
 | ||||||
| notify_operator_alive($operator['operatorid']); | notify_operator_alive($operator['operatorid']); | ||||||
| 
 | 
 | ||||||
| $page = array( 'operator' => get_operator_name($operator) ); | $page = array( 'operator' => get_operator_name($operator) ); | ||||||
| 
 | 
 | ||||||
| start_html_output(); | start_html_output(); | ||||||
| require('../view/pending_users.php'); | require('../view/pending_users.php'); | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,87 +1,87 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| require('libs/common.php'); | require('libs/common.php'); | ||||||
| require('libs/chat.php'); | require('libs/chat.php'); | ||||||
| require('libs/operator.php'); | require('libs/operator.php'); | ||||||
| 
 | 
 | ||||||
| $act = verifyparam( "act", "/^(refresh|post|rename|close|ping)$/"); | $act = verifyparam( "act", "/^(refresh|post|rename|close|ping)$/"); | ||||||
| $token = verifyparam( "token", "/^\d{1,9}$/"); | $token = verifyparam( "token", "/^\d{1,9}$/"); | ||||||
| $threadid = verifyparam( "thread", "/^\d{1,9}$/"); | $threadid = verifyparam( "thread", "/^\d{1,9}$/"); | ||||||
| $isuser = verifyparam( "user", "/^true$/", "false") == 'true'; | $isuser = verifyparam( "user", "/^true$/", "false") == 'true'; | ||||||
| $outformat = (verifyparam( "html", "/^on$/", "off") == 'on') ? "html" : "xml"; | $outformat = (verifyparam( "html", "/^on$/", "off") == 'on') ? "html" : "xml"; | ||||||
| 
 | 
 | ||||||
| $thread = thread_by_id($threadid); | $thread = thread_by_id($threadid); | ||||||
| if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) { | ||||||
| 	die("wrong thread"); | 	die("wrong thread"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # This code helps in simulation of operator connection problems
 | # This code helps in simulation of operator connection problems
 | ||||||
| # if( !$isuser )     die("error");
 | # if( !$isuser )     die("error");
 | ||||||
| 
 | 
 | ||||||
| ping_thread($thread, $isuser); | ping_thread($thread, $isuser); | ||||||
| 
 | 
 | ||||||
| if( !$isuser && $act != "rename" ) { | if( !$isuser && $act != "rename" ) { | ||||||
| 	$operator = check_login(); | 	$operator = check_login(); | ||||||
| 	check_for_reassign($thread,$operator); | 	check_for_reassign($thread,$operator); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| if( $act == "refresh" ) { | if( $act == "refresh" ) { | ||||||
| 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | ||||||
| 	print_thread_mesages($threadid, $token, $lastid, $isuser,$outformat); | 	print_thread_mesages($threadid, $token, $lastid, $isuser,$outformat); | ||||||
| 	exit; | 	exit; | ||||||
| 
 | 
 | ||||||
| } else if( $act == "post" ) { | } else if( $act == "post" ) { | ||||||
| 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | 	$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1); | ||||||
| 	$message = getrawparam('message'); | 	$message = getrawparam('message'); | ||||||
| 
 | 
 | ||||||
| 	$kind = $isuser ? $kind_user : $kind_agent; | 	$kind = $isuser ? $kind_user : $kind_agent; | ||||||
| 	$from = $isuser ? $thread['userName'] : $thread['agentName']; | 	$from = $isuser ? $thread['userName'] : $thread['agentName']; | ||||||
| 
 | 
 | ||||||
| 	post_message($threadid,$kind,$message,$from); | 	post_message($threadid,$kind,$message,$from, $isuser ? null : $operator['operatorid'] ); | ||||||
| 	print_thread_mesages($threadid, $token, $lastid, $isuser, $outformat); | 	print_thread_mesages($threadid, $token, $lastid, $isuser, $outformat); | ||||||
| 	exit; | 	exit; | ||||||
| 
 | 
 | ||||||
| } else if( $act == "rename" ) { | } else if( $act == "rename" ) { | ||||||
| 
 | 
 | ||||||
| 	if( !$user_can_change_name ) { | 	if( !$user_can_change_name ) { | ||||||
| 		start_xml_output(); | 		start_xml_output(); | ||||||
| 		echo "<error></error>"; | 		echo "<error></error>"; | ||||||
| 		exit; | 		exit; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	$newname = getrawparam('name'); | 	$newname = getrawparam('name'); | ||||||
| 
 | 
 | ||||||
| 	rename_user($thread, $newname); | 	rename_user($thread, $newname); | ||||||
| 	setcookie($namecookie, $newname, time()+60*60*24*365);  | 	setcookie($namecookie, $newname, time()+60*60*24*365);  | ||||||
| 	start_xml_output(); | 	start_xml_output(); | ||||||
| 	echo "<changedname></changedname>"; | 	echo "<changedname></changedname>"; | ||||||
| 	exit; | 	exit; | ||||||
| 
 | 
 | ||||||
| } else if( $act == "ping" ) { | } else if( $act == "ping" ) { | ||||||
| 
 | 
 | ||||||
| 	start_xml_output(); | 	start_xml_output(); | ||||||
| 	echo "<ping></ping>"; | 	echo "<ping></ping>"; | ||||||
| 	exit; | 	exit; | ||||||
| 
 | 
 | ||||||
| } else if( $act == "close" ) { | } else if( $act == "close" ) { | ||||||
| 
 | 
 | ||||||
| 	close_thread($thread, $isuser); | 	close_thread($thread, $isuser); | ||||||
| 	start_xml_output(); | 	start_xml_output(); | ||||||
| 	echo "<closed></closed>"; | 	echo "<closed></closed>"; | ||||||
| 	exit; | 	exit; | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ?>
 | ?>
 | ||||||
| @ -1,144 +1,129 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_agent.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 |  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 		<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> 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	 | ||||||
| <tr> | 
 | ||||||
| <td valign="top" class="text"> | 	<?php if( $page['agentId'] ) { ?>
 | ||||||
| 	 | <?php echo getstring("page_agent.intro") ?>
 | ||||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | <?php } ?>
 | ||||||
| 		<h1><?php echo getstring("page_agent.title") ?></h1>
 | <?php if( !$page['agentId'] ) { ?>
 | ||||||
|  </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 echo getstring("page_agent.create_new") ?>
 | ||||||
| 	 | <?php } ?>
 | ||||||
| 
 | <br /> | ||||||
| 	<?php if( $page['agentId'] ) { ?>
 | <br /> | ||||||
| <?php echo getstring("page_agent.intro") ?>
 | <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | ||||||
| <?php } ?>
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| <?php if( !$page['agentId'] ) { ?>
 | 		<tr> | ||||||
| <?php echo getstring("page_agent.create_new") ?>
 | 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | ||||||
| <?php } ?>
 | 	    <td width="10"></td> | ||||||
| <br /> | 	    <td class="text"> | ||||||
| <br /> | 		    <?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"); | ||||||
| 
 | 	} ?>
 | ||||||
| <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | 
 | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 		</td> | ||||||
| 		<tr> | 		</tr> | ||||||
| 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | 		</table> | ||||||
| 	    <td width="10"></td> | 	<?php } ?>
 | ||||||
| 	    <td class="text"> | 
 | ||||||
| 		    <?php	if( isset($errors) && count($errors) > 0 ) { | <form name="agentForm" method="post" action="/webim/operator/operator.php"> | ||||||
| 		print getstring("errors.header"); | 	<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'> | ||||||
| 		foreach( $errors as $e ) { | 		<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>
 | ||||||
| 			print getstring("errors.prefix"); | 			<input type="text" name="login" size="40" value="<?php echo form_value('login') ?>" class="formauth"/> | ||||||
| 			print $e; | 		</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>
 | ||||||
| 			print getstring("errors.suffix"); | 
 | ||||||
| 		} | 		<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>
 | ||||||
| 		print getstring("errors.footer"); | 			<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>
 | ||||||
| 
 | 
 | ||||||
| 		</td> | 		<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>
 | ||||||
| 		</tr> | 			<input type="password" name="passwordConfirm" size="40" value="" class="formauth"/> | ||||||
| 		</table> | 		</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>
 | ||||||
| 	<?php } ?>
 | 
 | ||||||
| 
 | 		<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>
 | ||||||
| <form name="agentForm" method="post" action="/webim/operator/operator.php"> | 			<input type="text" name="name" size="40" value="<?php echo form_value('name') ?>" class="formauth"/> | ||||||
| 	<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'> | 		</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.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"/> | 		<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>
 | ||||||
| 		</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>
 | 			<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 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"/> | 		<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> | ||||||
| 		</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"><input type="hidden" name="agentId" value="<?php echo $page['agentId'] ?>"/>  | ||||||
| 		<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="image" name="" src='<?php echo getstring("image.button.save") ?>' border="0" alt='<?php echo getstring("button.save") ?>'/> | ||||||
| 			<input type="password" name="passwordConfirm" size="40" value="" class="formauth"/> | 			</td> | ||||||
| 		</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>
 | 			<td></td> | ||||||
| 
 | 			<td></td> | ||||||
| 		<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>
 | 		</tr> | ||||||
| 			<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>
 | 	</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> | ||||||
| 
 | 
 | ||||||
| 		<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> | <table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<td class="formauth"><input type="hidden" name="agentId" value="<?php echo $page['agentId'] ?>"/>  | 	<tr> | ||||||
| 			        <input type="image" name="" src='<?php echo getstring("image.button.save") ?>' border="0" alt='<?php echo getstring("button.save") ?>'/> | 		<td colspan="2" height="10"></td> | ||||||
| 			</td> | 	</tr> | ||||||
| 			<td></td> | 	<tr> | ||||||
| 			<td></td> | 		<td width="30"></td> | ||||||
| 		</tr> | 		<td class="formauth"><span class="formdescr"><?php echo getstring("common.asterisk_explanation") ?></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> | </table> | ||||||
| 
 | 
 | ||||||
| 	 | 
 | ||||||
| 
 | </form> | ||||||
| 
 | 
 | ||||||
| 
 | </td> | ||||||
| 
 | </tr> | ||||||
| <table cellspacing="0" cellpadding="0" border="0"> | </table> | ||||||
| 	<tr> | 
 | ||||||
| 		<td colspan="2" height="10"></td> | </body> | ||||||
| 	</tr> | </html> | ||||||
| 	<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 | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_agents.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 |  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 		<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> 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	 | ||||||
| <tr> | 
 | ||||||
| <td valign="top" class="text"> | 	<?php echo getstring("page_agents.intro") ?>
 | ||||||
| 	 | 
 | ||||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | <br><br> | ||||||
| 		<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> 
 | <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	 | <tr> | ||||||
| 
 |    <td class="text"><b><?php echo getstring("page_agents.agents") ?></b></td>
 | ||||||
| 	<?php echo getstring("page_agents.intro") ?>
 |    <td align="right"> | ||||||
| 
 | 	<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| <br><br> | 	<tr> | ||||||
| 
 |     <td><img src='/webim/images/buttons/createagent.gif' border="0" altKey="page_agents.new_agent" /></td> | ||||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> |    	<td width="10"></td> | ||||||
| <tr> |     <td class="text"> | ||||||
|    <td class="text"><b><?php echo getstring("page_agents.agents") ?></b></td>
 | 		<a href='/webim/operator/operator.php' title="<?php echo getstring("page_agents.new_agent") ?>"> | ||||||
|    <td align="right"> | 			<?php echo getstring("page_agents.new_agent") ?>
 | ||||||
| 	<table cellspacing="0" cellpadding="0" border="0"> | 		</a> | ||||||
| 	<tr> |     </td> | ||||||
|     <td><img src='/webim/images/buttons/createagent.gif' border="0" altKey="page_agents.new_agent" /></td> | 	</tr> | ||||||
|    	<td width="10"></td> | 	</table> | ||||||
|     <td class="text"> | </td> | ||||||
| 		<a href='/webim/operator/operator.php' title="<?php echo getstring("page_agents.new_agent") ?>"> | </tr> | ||||||
| 			<?php echo getstring("page_agents.new_agent") ?>
 | <tr> | ||||||
| 		</a> |    <td colspan="2" height="15"></td> | ||||||
|     </td> | </tr> | ||||||
| 	</tr> | </table> | ||||||
| 	</table> | 
 | ||||||
| </td> | <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| </tr> | <tr> | ||||||
| <tr> | 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.login") ?></span></td><td width='3'></td>
 | ||||||
|    <td colspan="2" height="15"></td> | 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_name") ?></span></td><td width='3'></td>
 | ||||||
| </tr> | 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_commonname") ?></span></td>
 | ||||||
| </table> | </tr> | ||||||
| 
 | <?php foreach( $page['allowedAgents'] as $a ) { ?>
 | ||||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> | <tr> | ||||||
| <tr> | 	<td height='45' class='table'> | ||||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.login") ?></span></td><td width='3'></td>
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_name") ?></span></td><td width='3'></td>
 | 		<tr> | ||||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_commonname") ?></span></td>
 | 	    <td><img src='/webim/images/tbliclogin.gif' width="10" height="15" border="0" alt="" /></td> | ||||||
| </tr> |     	<td class="table"> | ||||||
| <?php foreach( $page['allowedAgents'] as $a ) { ?>
 |     		<a href='/webim/operator/operator.php?op=<?php echo $a['vclogin'] ?>'> | ||||||
| <tr> |     			<?php echo htmlspecialchars($a['vclogin']) ?>
 | ||||||
| 	<td height='45' class='table'> |     		</a> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> |     	</td> | ||||||
| 		<tr> | 		</tr> | ||||||
| 	    <td><img src='/webim/images/tbliclogin.gif' width="10" height="15" border="0" alt="" /></td> | 		</table> | ||||||
|     	<td class="table"> | 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||||
|     		<a href='/webim/operator/operator.php?op=<?php echo $a['vclogin'] ?>'> | 	<td height='45' class='table'> | ||||||
|     			<?php echo htmlspecialchars($a['vclogin']) ?>
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
|     		</a> | 		<tr> | ||||||
|     	</td> | 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | ||||||
| 		</tr> |     	<td class="table"><?php echo htmlspecialchars($a['vclocalename']) ?></td>
 | ||||||
| 		</table> | 		</tr> | ||||||
| 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | 		</table> | ||||||
| 	<td height='45' class='table'> | 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	<td height='45' class='table'> | ||||||
| 		<tr> | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | 		<tr> | ||||||
|     	<td class="table"><?php echo htmlspecialchars($a['vclocalename']) ?></td>
 | 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | ||||||
| 		</tr> |     	<td class="table"><?php echo htmlspecialchars($a['vccommonname']) ?></td>
 | ||||||
| 		</table> | 		</tr> | ||||||
| 	</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | 		</table> | ||||||
| 	<td height='45' class='table'> | 	</td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | </tr> | ||||||
| 		<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> | ||||||
| 	    <td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td> | <?php } ?>
 | ||||||
|     	<td class="table"><?php echo htmlspecialchars($a['vccommonname']) ?></td>
 | </table> | ||||||
| 		</tr> | </td> | ||||||
| 		</table> | </tr> | ||||||
| 	</td> | </table> | ||||||
| </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> | </body> | ||||||
| <?php } ?>
 | </html> | ||||||
| </table> | 
 | ||||||
| </td> |  | ||||||
| </tr> |  | ||||||
| </table> |  | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,252 +1,252 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title><?php echo getstring("chat.window.title.agent") ?></title>
 | <title><?php echo getstring("chat.window.title.agent") ?></title>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | ||||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | <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/common.js"></script> | ||||||
| <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | ||||||
| <script language="javascript"><!-- | <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'] ?> };
 | 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>
 | ||||||
| <script type="text/javascript" language="javascript" src="/webim/js/page_chat.js"></script> | <script type="text/javascript" language="javascript" src="/webim/js/page_chat.js"></script> | ||||||
| </head> | </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"> | <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"> | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <tr> | <tr> | ||||||
| <td valign="top"> | <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td></td> |     <td></td> | ||||||
|     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> |     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> | ||||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td width="50%" valign="top"> | 	    <td width="50%" valign="top"> | ||||||
| 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="25"></td> | 		    <td height="25"></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<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>
 | 		    <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> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="5"></td> | 		    <td height="5"></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
|     	<td width="50%" align="right" valign="top"> |     	<td width="50%" align="right" valign="top"> | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | 			<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="25" align="right"> | 		    <td height="25" align="right"> | ||||||
| 
 | 
 | ||||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | 				<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 				<tr> | 				<tr> | ||||||
| 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | ||||||
| 			    <td width="5"></td> | 			    <td width="5"></td> | ||||||
| 			    <td> | 			    <td> | ||||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | 					<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 					<tr> | 					<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>
 | 				    <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> | 					</tr> | ||||||
| 					</table> | 					</table> | ||||||
| 				</td> | 				</td> | ||||||
| 			    <td width="5"></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><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> | 			    <td width="5"></td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				</table> | 				</table> | ||||||
| 
 | 
 | ||||||
| 			</td> | 			</td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 
 | 
 | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="60" align="right"> | 		    <td height="60" align="right"> | ||||||
| 				 | 				 | ||||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | 				<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 				<tr> | 				<tr> | ||||||
| <?php if( $page['agent'] ) { ?>
 | <?php if( $page['agent'] ) { ?>
 | ||||||
| 				<td class="text" nowrap> | 				<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>
 | 					<?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> | 				</td> | ||||||
| <?php } ?><?php if( $page['user'] && $page['canChangeName'] ) { ?>
 | <?php } ?><?php if( $page['user'] && $page['canChangeName'] ) { ?>
 | ||||||
| 				<td class="text" nowrap> | 				<td class="text" nowrap> | ||||||
| 				<div id="changename1" style="display:<?php echo $page['displ1'] ?>;"> | 				<div id="changename1" style="display:<?php echo $page['displ1'] ?>;"> | ||||||
| 					<table cellspacing="0" cellpadding="0" border="0"><tr> | 					<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||||
| 					<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td> 
 | 					<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 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><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 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><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> | 					</tr></table> | ||||||
| 				</div> | 				</div> | ||||||
| 				<div id="changename2" style="display:<?php echo $page['displ2'] ?>;"> | 				<div id="changename2" style="display:<?php echo $page['displ2'] ?>;"> | ||||||
| 					<table cellspacing="0" cellpadding="0" border="0"><tr> | 					<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 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 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> | 					<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> | 					</tr></table> | ||||||
| 				</div> | 				</div> | ||||||
| 				</td> | 				</td> | ||||||
| <?php } ?>
 | <?php } ?>
 | ||||||
| <?php if( $page['agent'] ) { ?>
 | <?php if( $page['agent'] ) { ?>
 | ||||||
| 				<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> | 				<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") ?>"> | 				<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> | 				<img src='/webim/images/buttons/close.gif' width="25" height="25" border="0" altKey="chat.window.close_link_text"/></a></td> | ||||||
| <?php } ?>
 | <?php } ?>
 | ||||||
| <!-- | <!-- | ||||||
| 				<td><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="Change User" /></td> | 				<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> | 			    <td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td> | ||||||
| <?php if( $page['user'] ) { ?>
 | <?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> | 				<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 } ?>
 | <?php } ?>
 | ||||||
| 
 | 
 | ||||||
| 				<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>"> | 				<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> | 				<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> | 				<td width="20" valign="top"><img src='/webim/images/free.gif' width="20" height="1" border="0" alt="" /></td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				</table> | 				</table> | ||||||
| 
 | 
 | ||||||
| 			</td> | 			</td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 		</table> | 		</table> | ||||||
| 	</td> | 	</td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td></td> |     <td></td> | ||||||
|     <td valign="top"> |     <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 		<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 		<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="" /></td> | 	    <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"> |     	<td colspan="2" width="100%" height="100%" valign="top" id="chatwndtd"> | ||||||
| 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <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"> | 		    <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;"> | 				<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. | 				Sorry, your browser does not support iframes; try a browser that supports W3 standards. | ||||||
| 				</iframe> | 				</iframe> | ||||||
| 			</td> | 			</td> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| <?php if( $page['canpost'] ) { ?>
 | <?php if( $page['canpost'] ) { ?>
 | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td colspan="3" height="5" style="cursor:n-resize;" id="spl1"></td> | 	    <td colspan="3" height="5" style="cursor:n-resize;" id="spl1"></td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 
 | 
 | ||||||
| 		<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="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"> |     	<td width="100%" height="100" valign="top" id="msgwndtd"> | ||||||
| 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 			<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <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"> | 		    <td width="100%" height="100%" bgcolor="#FFFFFF" valign="top"> | ||||||
| 				<textarea id="msgwnd" class="message" tabindex="0"></textarea> | 				<textarea id="msgwnd" class="message" tabindex="0"></textarea> | ||||||
| 			</td> | 			</td> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 	    <td valign="center" id="avatarwnd"></td> | 	    <td valign="center" id="avatarwnd"></td> | ||||||
| 		</tr> | 		</tr> | ||||||
| <?php } ?>	
 | <?php } ?>	
 | ||||||
| 		</table> | 		</table> | ||||||
| 
 | 
 | ||||||
| 	</td> | 	</td> | ||||||
|     <td></td> |     <td></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td height="45"></td> |     <td height="45"></td> | ||||||
|     <td> |     <td> | ||||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td width="33%"> | 	    <td width="33%"> | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | 			<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td width="20"></td> | 		    <td width="20"></td> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</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="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"> | 		<td width="33%" align="right"> | ||||||
| 		 | 		 | ||||||
| <?php if( $page['canpost'] ) { ?>
 | <?php if( $page['canpost'] ) { ?>
 | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | ||||||
| 
 | 
 | ||||||
| 			<tr> | 			<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><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"> | 		    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||||
| 				<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | 				<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>
 | 				<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> | ||||||
| 			<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> | 			<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> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| <?php } ?>
 | <?php } ?>
 | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 		</table> | 		</table> | ||||||
| 	</td> | 	</td> | ||||||
|     <td></td> |     <td></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> |     <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="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> |     <td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 	</table> | 	</table> | ||||||
| 
 | 
 | ||||||
| </td> | </td> | ||||||
| </tr> | </tr> | ||||||
| </table> | </table> | ||||||
| 
 | 
 | ||||||
| </body> | </body> | ||||||
| </html> | </html> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,108 +1,104 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title><?php echo getstring("chat.error_page.title") ?></title>
 | <title><?php echo getstring("chat.error_page.title") ?></title>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||||
| </head> | </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"> | <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"> | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <tr> | <tr> | ||||||
| <td valign="top"> | <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 
 | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 
 | <tr> | ||||||
| 
 | <td height="75"></td> | ||||||
| 
 | <td class="window"> | ||||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 	<h1><?php echo getstring("chat.error_page.head") ?></h1>
 | ||||||
| <tr> | </td> | ||||||
| <td height="75"></td> | <td></td> | ||||||
| <td class="window"> | </tr> | ||||||
| 	<h1><?php echo getstring("chat.error_page.head") ?></h1>
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="100%"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | ||||||
| <td height="100%"></td> |     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| <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> | ||||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||||
| 	<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> | 		<?php	if( isset($errors) && count($errors) > 0 ) { | ||||||
| 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		print getstring("errors.header"); | ||||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | 		foreach( $errors as $e ) { | ||||||
| 
 | 			print getstring("errors.prefix"); | ||||||
| 		<?php	if( isset($errors) && count($errors) > 0 ) { | 			print $e; | ||||||
| 		print getstring("errors.header"); | 			print getstring("errors.suffix"); | ||||||
| 		foreach( $errors as $e ) { | 		} | ||||||
| 			print getstring("errors.prefix"); | 		print getstring("errors.footer"); | ||||||
| 			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> | ||||||
| 	</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 	</tr> | ||||||
| 	</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | 	</table> | ||||||
| 	<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> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="70"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <td height="70"></td> | 	<tr> | ||||||
| <td> |     <td width="100%" align="right"> | ||||||
| 
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<tr> | ||||||
| 	<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="100%" align="right"> | 	    <td width="5"></td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	    <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> | 		</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> | 		</table> | ||||||
| 	    <td width="5"></td> | 	</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> | ||||||
| 		</tr> | 	</table> | ||||||
| 		</table> | 	 | ||||||
| 	</td> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 	 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||||
| </tr> | <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> | </tr> | ||||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | </table> | ||||||
| <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> | </td> | ||||||
| </tr> | </tr> | ||||||
| </table> | </table> | ||||||
| 
 | 
 | ||||||
| </td> | </body> | ||||||
| </tr> | </html> | ||||||
| </table> | 
 | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,108 +1,104 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||||
| </head> | </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"> | <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"> | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <tr> | <tr> | ||||||
| <td valign="top"> | <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 
 | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 
 | <tr> | ||||||
| 
 | <td height="75"></td> | ||||||
| 
 | <td class="window"> | ||||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 	<h1><?php echo getstring("chat.mailthread.sent.title") ?></h1>
 | ||||||
| <tr> | </td> | ||||||
| <td height="75"></td> | <td></td> | ||||||
| <td class="window"> | </tr> | ||||||
| 	<h1><?php echo getstring("chat.mailthread.sent.title") ?></h1>
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="100%"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <td height="100%"></td> | 	<tr> | ||||||
| <td> |     <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> | ||||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> |     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| 	<tr> | 	</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> | 	<tr> | ||||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> |     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 	</tr> | 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 		<?php echo getstring2("chat.mailthread.sent.content",array($page['email'])) ?><br/>
 | ||||||
|     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		<a href="javascript:window.close();"><?php echo getstring("chat.mailthread.sent.closewindow") ?></a>
 | ||||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | 
 | ||||||
| 
 | 	</td> | ||||||
| 		<?php echo getstring2("chat.mailthread.sent.content",array($page['email'])) ?><br/>
 |     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 		<a href="javascript:window.close();"><?php echo getstring("chat.mailthread.sent.closewindow") ?></a>
 | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	</td> | 	<tr> | ||||||
|     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> |     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| 	</tr> | 	<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> | 	</tr> | ||||||
|     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | 	</table> | ||||||
| 	<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> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="70"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <td height="70"></td> | 	<tr> | ||||||
| <td> |     <td width="100%" align="right"> | ||||||
| 
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<tr> | ||||||
| 	<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="100%" align="right"> | 	    <td width="5"></td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	    <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> | 		</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> | 		</table> | ||||||
| 	    <td width="5"></td> | 	</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> | ||||||
| 		</tr> | 	</table> | ||||||
| 		</table> | 	 | ||||||
| 	</td> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 	 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||||
| </tr> | <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> | </tr> | ||||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | </table> | ||||||
| <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> | </td> | ||||||
| </tr> | </tr> | ||||||
| </table> | </table> | ||||||
| 
 | 
 | ||||||
| </td> | </body> | ||||||
| </tr> | </html> | ||||||
| </table> | 
 | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,132 +1,128 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||||
| </head> | </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"> | <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"> | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <tr> | <tr> | ||||||
| <td valign="top"> | <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"> | ||||||
| <form name="mailThreadForm" method="post" action="/webim/mail.php"> | <tr> | ||||||
| <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'] ?>"/> | <td height="75"></td> | ||||||
| 
 | <td class="window"> | ||||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | 	<h1><?php echo getstring("mailthread.title") ?></h1>
 | ||||||
| <tr> | </td> | ||||||
| <td height="75"></td> | <td></td> | ||||||
| <td class="window"> | </tr> | ||||||
| 	<h1><?php echo getstring("mailthread.title") ?></h1>
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="60"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <td height="60"></td> | 	<tr> | ||||||
| <td> |     <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> | ||||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> |     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| 	<tr> | 	</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> | 	<tr> | ||||||
|     <td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td> |     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 	</tr> | 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||||
| 
 | 		 | ||||||
| 	<tr> | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
|     <td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		<tr> | ||||||
| 	<td background="/webim/images/winbg.gif" class="bgcy"> | 	    <td class="text"><?php echo getstring("mailthread.enter_email") ?></td>
 | ||||||
| 		 | 	    <td width="10"></td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	    <td><input type="text" name="email" size="20" value="<?php echo form_value('email') ?>" class="username"/></td> | ||||||
| 		<tr> | 		</tr> | ||||||
| 	    <td class="text"><?php echo getstring("mailthread.enter_email") ?></td>
 | 		</table> | ||||||
| 	    <td width="10"></td> | 
 | ||||||
| 	    <td><input type="text" name="email" size="20" value="<?php echo form_value('email') ?>" class="username"/></td> | 	</td> | ||||||
| 		</tr> |     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 		</table> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	</td> | 	<tr> | ||||||
|     <td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> |     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| 	</tr> | 	<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> | 	</tr> | ||||||
|     <td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | 	</table> | ||||||
| 	<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> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="70"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <td height="70"></td> | 	<tr> | ||||||
| <td> |     <td width="50%"> | ||||||
| 
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<tr> | ||||||
| 	<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 width="50%"> | 	    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 			<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | ||||||
| 		<tr> | 			<a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><?php echo getstring("mailthread.perform") ?></a><br>
 | ||||||
| 	    <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> | ||||||
| 	    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | 	    <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> | ||||||
| 			<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | 		</tr> | ||||||
| 			<a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><?php echo getstring("mailthread.perform") ?></a><br>
 | 		</table> | ||||||
| 		</td> | 	</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> |     <td width="50%" align="right"> | ||||||
| 		</tr> | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		</table> | 		<tr> | ||||||
| 	</td> | 	    <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="50%" align="right"> | 	    <td width="5"></td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><?php echo getstring("mailthread.close") ?></a></td>
 | ||||||
| 		<tr> | 		</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> | 		</table> | ||||||
| 	    <td width="5"></td> | 	</td> | ||||||
| 	    <td class="button"><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><?php echo getstring("mailthread.close") ?></a></td>
 | 	</tr> | ||||||
| 		</tr> | 	</table> | ||||||
| 		</table> | 	 | ||||||
| 	</td> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 	 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||||
| </tr> | <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> | </tr> | ||||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | </table> | ||||||
| <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> | </form> | ||||||
| </tr> | 
 | ||||||
| </table> | 
 | ||||||
| 
 | 
 | ||||||
| </form> | </td> | ||||||
| 
 | </tr> | ||||||
| 
 | </table> | ||||||
| 
 | 
 | ||||||
| </td> | </body> | ||||||
| </tr> | </html> | ||||||
| </table> | 
 | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,99 +1,95 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title><?php echo getstring("page.chat.old_browser.title") ?></title>
 | <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="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||||
| </head> | </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"> | <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"> | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <tr> | <tr> | ||||||
| <td valign="top"> | <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 
 | <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 
 | <tr> | ||||||
| 
 | <td height="20"></td> | ||||||
| 
 | <td class="window"> | ||||||
| <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> | </td> | ||||||
| <tr> | <td></td> | ||||||
| <td height="20"></td> | </tr> | ||||||
| <td class="window"> | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="100%"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | ||||||
| <td height="100%"></td> |     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| <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> | ||||||
| 	<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr> | 	</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
|     <td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td> | 	<td background="/webim/images/winbg.gif" class="bgcy"> | ||||||
| 	<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> | 		<?php echo getstring("page.chat.old_browser.content") ?>
 | ||||||
| 	</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"> | 	</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> | ||||||
| 		<?php echo getstring("page.chat.old_browser.content") ?>
 | 	<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> | ||||||
| 	</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 	</tr> | ||||||
| 	</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td> | 	</table> | ||||||
| 	<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> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 
 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td height="70"></td> | ||||||
| </tr> | <td> | ||||||
| 
 | 
 | ||||||
| <tr> | 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <td height="70"></td> | 	<tr> | ||||||
| <td> |     <td width="100%" align="right"> | ||||||
| 
 | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<tr> | ||||||
| 	<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="100%" align="right"> | 	    <td width="5"></td> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	    <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> | 		</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> | 		</table> | ||||||
| 	    <td width="5"></td> | 	</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> | ||||||
| 		</tr> | 	</table> | ||||||
| 		</table> | 	 | ||||||
| 	</td> | </td> | ||||||
| 	</tr> | <td></td> | ||||||
| 	</table> | </tr> | ||||||
| 	 | 
 | ||||||
| </td> | <tr> | ||||||
| <td></td> | <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | ||||||
| </tr> | <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> | </tr> | ||||||
| <td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td> | </table> | ||||||
| <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> | </td> | ||||||
| </table> | </tr> | ||||||
| 
 | </table> | ||||||
| 
 | 
 | ||||||
| </td> | </body> | ||||||
| </tr> | </html> | ||||||
| </table> | 
 | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,239 +1,239 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| <title><?php echo getstring("chat.window.title.user") ?></title>
 | <title><?php echo getstring("chat.window.title.user") ?></title>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | <meta http-equiv="Content-Type" content="text/html; charset=Windows-1251"> | ||||||
| <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | <link rel="stylesheet" type="text/css" href="/webim/chat.css" /> | ||||||
| <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | <script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script> | ||||||
| </head> | </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"> | <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"> | <table width="600" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <tr> | <tr> | ||||||
| <td valign="top"> | <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 	<table width="600" cellspacing="0" cellpadding="0" border="0"> | 	<table width="600" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td></td> |     <td></td> | ||||||
|     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> |     <td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn"> | ||||||
| 		<table width="590" cellspacing="0" cellpadding="0" border="0"> | 		<table width="590" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td width="135" valign="top"> | 	    <td width="135" valign="top"> | ||||||
| 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | 			<table width="135" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="25"></td> | 		    <td height="25"></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<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>
 | 		    <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> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="5"></td> | 		    <td height="5"></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | 		    <td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
 | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
|     	<td width="455" align="right" valign="top"> |     	<td width="455" align="right" valign="top"> | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | 			<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="25" align="right"> | 		    <td height="25" align="right"> | ||||||
| 
 | 
 | ||||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | 				<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 				<tr> | 				<tr> | ||||||
| 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | 			    <td class="text"><?php echo getstring("chat.window.product_name") ?></td>
 | ||||||
| 			    <td width="5"></td> | 			    <td width="5"></td> | ||||||
| 			    <td> | 			    <td> | ||||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | 					<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 					<tr> | 					<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>
 | 				    <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> | 					</tr> | ||||||
| 					</table> | 					</table> | ||||||
| 				</td> | 				</td> | ||||||
| 			    <td width="5"></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><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> | 			    <td width="5"></td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				</table> | 				</table> | ||||||
| 
 | 
 | ||||||
| 			</td> | 			</td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 
 | 
 | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td height="60" align="right"> | 		    <td height="60" align="right"> | ||||||
| 				 | 				 | ||||||
| 				<table cellspacing="0" cellpadding="0" border="0"> | 				<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 				<tr> | 				<tr> | ||||||
| 
 | 
 | ||||||
| 				<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td> 
 | 				<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 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><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 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><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><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 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") ?>"> | 				<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> | 				<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh" /></a></td> | ||||||
| 
 | 
 | ||||||
| 			     | 			     | ||||||
| 
 | 
 | ||||||
| 			    <td width="20"></td> | 			    <td width="20"></td> | ||||||
| 				</tr> | 				</tr> | ||||||
| 				</table> | 				</table> | ||||||
| 
 | 
 | ||||||
| 			</td> | 			</td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 		</table> | 		</table> | ||||||
| 	</td> | 	</td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td></td> |     <td></td> | ||||||
|     <td valign="top"> |     <td valign="top"> | ||||||
| 
 | 
 | ||||||
| 		<table width="585" cellspacing="0" cellpadding="0" border="0"> | 		<table width="585" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<tr> | 		<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="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"> |     	<td width="565" valign="top" id="chatwndtd"> | ||||||
| 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 		    <td width="100%" bgcolor="#FFFFFF" valign="top"> | 		    <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;"> | 				<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. | 				Sorry, your browser does not support iframes; try a browser that supports W3 standards. | ||||||
| 				</iframe> | 				</iframe> | ||||||
| 			</td> | 			</td> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 
 | 
 | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td colspan="2" height="5"></td> | 	    <td colspan="2" height="5"></td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 
 | 
 | ||||||
| 		<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="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"> |     	<td width="565" valign="top"> | ||||||
| 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 			<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <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"> | 		    <td width="565" height="85" bgcolor="#FFFFFF" valign="top"> | ||||||
| 				<form id="messageform" method="post" action="/webim/thread.php" target="chatwndiframe" width="565" height="85"> | 				<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" 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=""/> | 				<input type="hidden" id="message" name="message" value=""/> | ||||||
| 				<textarea id="messagetext" cols="50" rows="4" class="message" style="width:550px;" tabindex="0"></textarea> | 				<textarea id="messagetext" cols="50" rows="4" class="message" style="width:550px;" tabindex="0"></textarea> | ||||||
| 				</form> | 				</form> | ||||||
| 			</td> | 			</td> | ||||||
| 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | 		    <td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 		</table> | 		</table> | ||||||
| 
 | 
 | ||||||
| 	</td> | 	</td> | ||||||
|     <td></td> |     <td></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td height="45"></td> |     <td height="45"></td> | ||||||
|     <td> |     <td> | ||||||
| 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | 		<table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<tr> | 		<tr> | ||||||
| 	    <td width="33%"> | 	    <td width="33%"> | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | 			<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 			<tr> | 			<tr> | ||||||
| 		    <td width="20"></td> | 		    <td width="20"></td> | ||||||
| 
 | 
 | ||||||
| 			</tr> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</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="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"> | 		<td width="33%" align="right"> | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | 			<table cellspacing="0" cellpadding="0" border="0" id="postmessage"> | ||||||
| 
 | 
 | ||||||
| 			<tr> | 			<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><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"> | 		    <td background="/webim/images/submitbg.gif" valign="top" class="submit"> | ||||||
| 				<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br> | 				<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>
 | 				<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> | ||||||
| 			<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> | 			<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> | 			</tr> | ||||||
| 			</table> | 			</table> | ||||||
| 		</td> | 		</td> | ||||||
| 		</tr> | 		</tr> | ||||||
| 		</table> | 		</table> | ||||||
| 	</td> | 	</td> | ||||||
|     <td></td> |     <td></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 
 | 
 | ||||||
| 	<tr> | 	<tr> | ||||||
|     <td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td> |     <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="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> |     <td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| 	</table> | 	</table> | ||||||
| 
 | 
 | ||||||
| </td> | </td> | ||||||
| </tr> | </tr> | ||||||
| </table> | </table> | ||||||
| 
 | 
 | ||||||
| <script type="text/javascript"><!-- | <script type="text/javascript"><!-- | ||||||
| function sendmessage(){ | function sendmessage(){ | ||||||
| 	getEl('message').value = getEl('messagetext').value; | 	getEl('message').value = getEl('messagetext').value; | ||||||
| 	getEl('messagetext').value = ''; | 	getEl('messagetext').value = ''; | ||||||
| 	getEl('messageform').submit(); | 	getEl('messageform').submit(); | ||||||
| } | } | ||||||
| getEl('messagetext').onkeydown = function(k) { | getEl('messagetext').onkeydown = function(k) { | ||||||
| 	if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey;	} | 	if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey;	} | ||||||
| 	if( (k==13 && ctrl) || (k==10) ) { | 	if( (k==13 && ctrl) || (k==10) ) { | ||||||
| 		sendmessage(); | 		sendmessage(); | ||||||
| 		return false; | 		return false; | ||||||
| 	} | 	} | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| getEl('msgsend1').onclick = function() { | getEl('msgsend1').onclick = function() { | ||||||
| 	sendmessage(); | 	sendmessage(); | ||||||
| 	return false; | 	return false; | ||||||
| } | } | ||||||
| //--></script>
 | //--></script>
 | ||||||
| 
 | 
 | ||||||
| </body> | </body> | ||||||
| </html> | </html> | ||||||
|  | |||||||
| @ -1,134 +1,127 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page.gen_button.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 |  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 		<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> 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	 | ||||||
| <tr> | 
 | ||||||
| <td valign="top" class="text"> | 	<?php echo getstring("page.gen_button.intro") ?>
 | ||||||
| 	 | <br /> | ||||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | <br /> | ||||||
| 		<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> 
 | <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> | ||||||
| 	<?php echo getstring("page.gen_button.intro") ?>
 | 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_image") ?></td>
 | ||||||
| <br /> | 	</tr> | ||||||
| <br /> | 	<tr><td colspan="3" height="2"></td></tr> | ||||||
| 
 | 	<tr> | ||||||
| <form name="buttonCodeForm" method="get" action="/webim/operator/getcode.php"> | 		<td colspan="3"> | ||||||
| <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'> | 			<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>
 | ||||||
| 	<tr> | 		</td> | ||||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_image") ?></td>
 | 	</tr> | ||||||
| 	</tr> | 	<tr><td colspan="3" height="5"></td></tr> | ||||||
| 	<tr><td colspan="3" height="2"></td></tr> | 	<tr> | ||||||
| 	<tr> | 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_locale") ?></td>
 | ||||||
| 		<td colspan="3"> | 	</tr> | ||||||
| 			<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>
 | 	<tr><td colspan="3" height="2"></td></tr> | ||||||
| 		</td> | 	<tr> | ||||||
| 	</tr> | 		<td colspan="3"> | ||||||
| 	<tr><td colspan="3" height="5"></td></tr> | 			<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>
 | ||||||
| 	<tr> | 		</td> | ||||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.choose_locale") ?></td>
 | 	</tr> | ||||||
| 	</tr> | 	<tr><td colspan="3" height="5"></td></tr> | ||||||
| 	<tr><td colspan="3" height="2"></td></tr> | 	<tr> | ||||||
| 	<tr> | 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.include_site_name") ?></td>
 | ||||||
| 		<td colspan="3"> | 	</tr> | ||||||
| 			<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>
 | 	<tr><td colspan="3" height="2"></td></tr> | ||||||
| 		</td> | 	<tr> | ||||||
| 	</tr> | 		<td colspan="3"> | ||||||
| 	<tr><td colspan="3" height="5"></td></tr> | 			<input type="checkbox" name="hostname" value="on"<?php echo form_value_cb('hostname') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | ||||||
| 	<tr> | 		</td> | ||||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.include_site_name") ?></td>
 | 	</tr> | ||||||
| 	</tr> | <?php if( $page['formhostname'] ) { ?>
 | ||||||
| 	<tr><td colspan="3" height="2"></td></tr> | 	<tr><td colspan="3" height="5"></td></tr> | ||||||
| 	<tr> | 	<tr> | ||||||
| 		<td colspan="3"> | 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.secure_links") ?></td>
 | ||||||
| 			<input type="checkbox" name="hostname" value="on"<?php echo form_value_cb('hostname') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | 	</tr> | ||||||
| 		</td> | 	<tr><td colspan="3" height="2"></td></tr> | ||||||
| 	</tr> | 	<tr> | ||||||
| <?php if( $page['formhostname'] ) { ?>
 | 		<td colspan="3"> | ||||||
| 	<tr><td colspan="3" height="5"></td></tr> | 			<input type="checkbox" name="secure" value="on"<?php echo form_value_cb('secure') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | ||||||
| 	<tr> | 		</td> | ||||||
| 		<td colspan="3" class="formauth"><?php echo getstring("page.gen_button.secure_links") ?></td>
 | 	</tr> | ||||||
| 	</tr> | <?php } ?>
 | ||||||
| 	<tr><td colspan="3" height="2"></td></tr> | 	<tr><td colspan="3" height="5"></td></tr> | ||||||
| 	<tr> | 	<tr> | ||||||
| 		<td colspan="3"> | 		<td class="formauth"><?php echo getstring("page.gen_button.code") ?></td>
 | ||||||
| 			<input type="checkbox" name="secure" value="on"<?php echo form_value_cb('secure') ? " checked=\"checked\"" : "" ?> onchange="this.form.submit();"/>
 | 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | ||||||
| 		</td> | 		<td></td> | ||||||
| 	</tr> | 	</tr> | ||||||
| <?php } ?>
 | 	<tr><td colspan="3" height="2"></td></tr> | ||||||
| 	<tr><td colspan="3" height="5"></td></tr> | 	<tr> | ||||||
| 	<tr> | 		<td><textarea cols="60" rows="15"><?php echo $page['buttonCode'] ?></textarea></td>
 | ||||||
| 		<td class="formauth"><?php echo getstring("page.gen_button.code") ?></td>
 | 		<td></td> | ||||||
| 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | 		<td class="formauth" valign="top" nowrap><span class="formdescr"><?php echo getstring("page.gen_button.code.description") ?></span></td>
 | ||||||
| 		<td></td> | 	</tr> | ||||||
| 	</tr> | 	<tr> | ||||||
| 	<tr><td colspan="3" height="2"></td></tr> | 		<td colspan="3" height="10"></td> | ||||||
| 	<tr> | 	</tr> | ||||||
| 		<td><textarea cols="60" rows="15"><?php echo $page['buttonCode'] ?></textarea></td>
 | 
 | ||||||
| 		<td></td> | 	<tr> | ||||||
| 		<td class="formauth" valign="top" nowrap><span class="formdescr"><?php echo getstring("page.gen_button.code.description") ?></span></td>
 | 		<td class="formauth"><?php echo getstring("page.gen_button.sample") ?></td>
 | ||||||
| 	</tr> | 		<td></td> | ||||||
| 	<tr> | 		<td></td> | ||||||
| 		<td colspan="3" height="10"></td> | 	</tr> | ||||||
| 	</tr> | 	<tr> | ||||||
| 
 | 		<td colspan="3" height="2"></td> | ||||||
| 	<tr> | 	</tr> | ||||||
| 		<td class="formauth"><?php echo getstring("page.gen_button.sample") ?></td>
 | 	<tr> | ||||||
| 		<td></td> | 		<td><?php echo $page['buttonCode'] ?></td>
 | ||||||
| 		<td></td> | 		<td></td> | ||||||
| 	</tr> | 		<td class="formauth" valign="top" nowrap><span class="formdescr"></span></td> | ||||||
| 	<tr> | 	</tr> | ||||||
| 		<td colspan="3" height="2"></td> | </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> | ||||||
| 	</tr> | </form> | ||||||
| 	<tr> | </td> | ||||||
| 		<td><?php echo $page['buttonCode'] ?></td>
 | </tr> | ||||||
| 		<td></td> | </table> | ||||||
| 		<td class="formauth" valign="top" nowrap><span class="formdescr"></span></td> | 
 | ||||||
| 	</tr> | </body> | ||||||
| </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> | </html> | ||||||
| </form> | 
 | ||||||
| </td> |  | ||||||
| </tr> |  | ||||||
| </table> |  | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,143 +1,124 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_login.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 | 		<h1><?php echo getstring("page_login.title") ?></h1>
 | ||||||
| <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"> | 
 | ||||||
| 	 | <?php if( isset($errors) && count($errors) > 0 ) { ?>
 | ||||||
| 		<h1><?php echo getstring("page_login.title") ?></h1>
 | 		<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 if( isset($errors) && count($errors) > 0 ) { ?>
 | 	<?php } ?>
 | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 
 | ||||||
| 		<tr> | <form name="loginForm" method="post" action="/webim/operator/login.php"> | ||||||
| 	    <td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td> | 	<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'> | ||||||
| 	    <td width="10"></td> | 		<tr> | ||||||
| 	    <td class="text"> | 			<td colspan="2"> | ||||||
| 		    <?php	if( isset($errors) && count($errors) > 0 ) { | 			<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		print getstring("errors.header"); | 				<tr> | ||||||
| 		foreach( $errors as $e ) { | 					<td class="formauth"><?php echo getstring("page_login.login") ?></td>
 | ||||||
| 			print getstring("errors.prefix"); | 					<td width="20"></td> | ||||||
| 			print $e; | 					<td><input type="text" name="login" size="20" value="<?php echo form_value('login') ?>" class="formauth"/></td> | ||||||
| 			print getstring("errors.suffix"); | 				</tr> | ||||||
| 		} | 
 | ||||||
| 		print getstring("errors.footer"); | 				<tr> | ||||||
| 	} ?>
 | 					<td colspan="3" height="10"></td> | ||||||
| 
 | 				</tr> | ||||||
| 		</td> | 
 | ||||||
| 		</tr> | 				<tr> | ||||||
| 		</table> | 					<td class="formauth"><?php echo getstring("page_login.password") ?></td>
 | ||||||
| 	<?php } ?>
 | 					<td></td> | ||||||
| 
 | 					<td><input type="password" name="password" size="20" value="" class="formauth"/></td> | ||||||
| <form name="loginForm" method="post" action="/webim/operator/login.php"> | 				</tr> | ||||||
| 	<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> | 				<tr> | ||||||
| 			<td colspan="2"> | 					<td colspan="3" height="5"></td> | ||||||
| 			<table cellspacing="0" cellpadding="0" border="0"> | 				</tr> | ||||||
| 				<tr> | 
 | ||||||
| 					<td class="formauth"><?php echo getstring("page_login.login") ?></td>
 | 				<tr> | ||||||
| 					<td width="20"></td> | 					<td class="formauth"></td> | ||||||
| 					<td><input type="text" name="login" size="20" value="<?php echo form_value('login') ?>" class="formauth"/></td> | 					<td></td> | ||||||
| 				</tr> | 					<td> | ||||||
| 
 | 					<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| 				<tr> | 						<tr> | ||||||
| 					<td colspan="3" height="10"></td> | 							<td><input type="checkbox" name="isRemember" value="on"<?php echo form_value_cb('isRemember') ? " checked=\"checked\"" : "" ?> /></td>
 | ||||||
| 				</tr> | 							<td width="5"></td> | ||||||
| 
 | 							<td class="formauth" nowrap><span><?php echo getstring("page_login.remember") ?></span></td>
 | ||||||
| 				<tr> | 						</tr> | ||||||
| 					<td class="formauth"><?php echo getstring("page_login.password") ?></td>
 | 					</table> | ||||||
| 					<td></td> | 					</td> | ||||||
| 					<td><input type="password" name="password" size="20" value="" class="formauth"/></td> | 				</tr> | ||||||
| 				</tr> | 			</table> | ||||||
| 
 | 			</td> | ||||||
| 				<tr> | 		</tr> | ||||||
| 					<td colspan="3" height="5"></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> | 		<tr> | ||||||
| 					<td class="formauth"></td> | 			<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></td> | 			</td> | ||||||
| 					<td> | 			 | ||||||
| 					<table cellspacing="0" cellpadding="0" border="0"> | 		</tr> | ||||||
| 						<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> | ||||||
| 							<td><input type="checkbox" name="isRemember" value="on"<?php echo form_value_cb('isRemember') ? " checked=\"checked\"" : "" ?> /></td>
 | </form> | ||||||
| 							<td width="5"></td> | 
 | ||||||
| 							<td class="formauth" nowrap><span><?php echo getstring("page_login.remember") ?></span></td>
 | 
 | ||||||
| 						</tr> | </td> | ||||||
| 					</table> | </tr> | ||||||
| 					</td> | </table> | ||||||
| 				</tr> | 
 | ||||||
| 			</table> | </body> | ||||||
| 			</td> | </html> | ||||||
| 		</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 | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("topMenu.admin") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 |  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 		<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> 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	 | ||||||
| <tr> | 
 | ||||||
| <td valign="top" class="text"> | 	<?php echo getstring("admin.content.description") ?>
 | ||||||
| 	 | <br> | ||||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | <br> | ||||||
| 		<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> 
 | <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>
 | ||||||
| 	<?php echo getstring("admin.content.description") ?>
 | 
 | ||||||
| <br> | 	<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>
 | ||||||
| <br> | 
 | ||||||
| 
 | 	<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>
 | ||||||
| <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/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/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/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>
 | ||||||
| 	<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>
 | 
 | ||||||
| 
 | </table> | ||||||
| 	<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>
 | 
 | ||||||
|          | <table width="200" 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/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 height="10"></td> | ||||||
| 	<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>
 | </tr> | ||||||
| 
 | <tr> | ||||||
| </table> |   <td bgcolor="#D6D6D6"><img src="/webim/images/free.gif" height="1" width="1" border="0" alt=""></td> | ||||||
| 
 | </tr> | ||||||
| <table width="200" cellspacing="0" cellpadding="0" border="0"> | <tr> | ||||||
| <tr> |   <td height="7"></td> | ||||||
|   <td height="10"></td> | </tr> | ||||||
| </tr> | </table> | ||||||
| <tr> | 
 | ||||||
|   <td bgcolor="#D6D6D6"><img src="/webim/images/free.gif" height="1" width="1" border="0" alt=""></td> | Web Messenger/<?php echo $page['version'] ?> • <?php echo $page['localeLinks'] ?>
 | ||||||
| </tr> | 
 | ||||||
| <tr> | </td> | ||||||
|   <td height="7"></td> | </tr> | ||||||
| </tr> | </table> | ||||||
| </table> | 
 | ||||||
| 
 | </body> | ||||||
| Web Messenger/<?php echo $page['version'] ?> • <?php echo $page['localeLinks'] ?>
 | </html> | ||||||
| 
 | 
 | ||||||
| </td> |  | ||||||
| </tr> |  | ||||||
| </table> |  | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -1,176 +1,156 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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 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",  | ||||||
| <script><!-- | 
 | ||||||
| var localized = new Array( | 	agentservl:"/webim/operator/agent.php", | ||||||
|     "<?php echo getstring("pending.table.speak") ?>", | 	noclients:"<?php echo getstring("clients.no_clients") ?>" }; | ||||||
|     "<?php echo getstring("pending.table.view") ?>", | //--></script>
 | ||||||
|     "<?php echo getstring("pending.table.ban") ?>" | <script type="text/javascript" language="javascript" src="/webim/js/page_pendingclients.js"></script> | ||||||
| ); | 
 | ||||||
| var updaterOptions = { | <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | ||||||
| 	url:"/webim/operator/update.php",  | <title> | ||||||
| 
 | 	<?php echo getstring("app.title") ?>	- <?php echo getstring("clients.title") ?>
 | ||||||
| 	agentservl:"/webim/operator/agent.php", | </title> | ||||||
| 	noclients:"<?php echo getstring("clients.no_clients") ?>" }; | 
 | ||||||
| //--></script>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| <script type="text/javascript" language="javascript" src="/webim/js/page_pendingclients.js"></script> | <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"> | ||||||
| 
 | 
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | <table width="100%" cellpadding="2" cellspacing="0" border="0"> | ||||||
| <title> | <tr> | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("clients.title") ?>
 | <td valign="top" class="text"> | ||||||
| </title> | 	 | ||||||
| 
 |  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||||
| <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | 		<h1><?php echo getstring("clients.title") ?></h1>
 | ||||||
| <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> |  </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>
 | ||||||
| 
 | 
 | ||||||
| </head> | <?php echo getstring("clients.how_to") ?><br>
 | ||||||
| 
 | <br> | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 
 | ||||||
| 
 | <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| <table width="100%" cellpadding="2" cellspacing="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> | <tr><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| <td valign="top" class="text"> |    <td width="100%"> | ||||||
| 	 |     | ||||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  |    <!-- Pending --> | ||||||
| 		<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> 
 | <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> | ||||||
| <?php echo getstring("clients.intro") ?><br>
 |     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.operator") ?></span></td>
 | ||||||
| 
 |     <td width="3"></td> | ||||||
| <?php echo getstring("clients.how_to") ?><br>
 |     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.total") ?></span></td>
 | ||||||
| <br> |     <td width="3"></td> | ||||||
| 
 |     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.waittime") ?></span></td>
 | ||||||
| <table width="100%" cellspacing="0" cellpadding="0" border="0"> |     <td width="3"></td> | ||||||
| <tr><td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td></tr> |     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.etc") ?></span></td>
 | ||||||
| <tr><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | </tr> | ||||||
|    <td width="100%"> | 
 | ||||||
|     | <tr> | ||||||
|    <!-- Pending --> |     <td colspan="13" height="2"></td> | ||||||
| 
 | </tr> | ||||||
| <table width="100%" id="threadlist" cellspacing="0" cellpadding="0" border="0"> | 
 | ||||||
| <tr> | <tr id="prio"> | ||||||
|     <td width="150" height="30" bgcolor="#276DB8" class="table"><span class="header"><?php echo getstring("pending.table.head.name") ?></span></td>
 |     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||||
|     <td width="3"></td> | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.contactid") ?></span></td>
 | 		<tr> | ||||||
|     <td width="3"></td> | 	    <td><img src='/webim/images/tblicusers.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.state") ?></span></td>
 |     	<td class="table"><span class="black"><?php echo getstring("clients.queue.prio") ?></span></td>
 | ||||||
|     <td width="3"></td> | 		</tr> | ||||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.operator") ?></span></td>
 | 		</table> | ||||||
|     <td width="3"></td> | 	</td> | ||||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.total") ?></span></td>
 | </tr> | ||||||
|     <td width="3"></td> | 
 | ||||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.waittime") ?></span></td>
 | <tr id="prioend"> | ||||||
|     <td width="3"></td> |     <td colspan="13" height="30" class="table" id="status"></td> | ||||||
|     <td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.etc") ?></span></td>
 | </tr> | ||||||
| </tr> | 
 | ||||||
| 
 | <tr id="wait"> | ||||||
| <tr> |     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||||
|     <td colspan="13" height="2"></td> | 		<table cellspacing="0" cellpadding="0" border="0"> | ||||||
| </tr> | 		<tr> | ||||||
| 
 | 	    <td><img src='/webim/images/tblicusers2.gif' width="15" height="15" border="0" alt="" /></td> | ||||||
| <tr id="prio"> |     	<td class="table"><span class="black"><?php echo getstring("clients.queue.wait") ?></span></td>
 | ||||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | 		</tr>	 | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 		</table> | ||||||
| 		<tr> | 	</td> | ||||||
| 	    <td><img src='/webim/images/tblicusers.gif' width="15" height="15" border="0" alt="" /></td> | </tr> | ||||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.prio") ?></span></td>
 | 
 | ||||||
| 		</tr> | <tr id="waitend"> | ||||||
| 		</table> |     <td colspan="13" height="30" class="table" id="status"></td> | ||||||
| 	</td> | </tr> | ||||||
| </tr> | 
 | ||||||
| 
 | <tr id="chat"> | ||||||
| <tr id="prioend"> |     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | ||||||
|     <td colspan="13" height="30" class="table" id="status"></td> | 		<table cellspacing="0" cellpadding="0" border="0"><tr> | ||||||
| </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 id="wait"> | 		</tr> | ||||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | 		</table> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"> | 	</td> | ||||||
| 		<tr> | </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 id="chatend"> | ||||||
| 		</tr>	 |     <td colspan="13" height="30" class="table" id="status"></td> | ||||||
| 		</table> | </tr> | ||||||
| 	</td> | 
 | ||||||
| </tr> | </table> | ||||||
| 
 | 
 | ||||||
| <tr id="waitend"> | </td><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
|     <td colspan="13" height="30" class="table" id="status"></td> | </tr><tr> | ||||||
| </tr> |    <td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | ||||||
| 
 | </tr></table> | ||||||
| <tr id="chat"> | 
 | ||||||
|     <td colspan="13" height="30" bgcolor="#F5F5F5" class="table"> | <table width="100%" cellspacing="0" cellpadding="0" border="0"> | ||||||
| 		<table cellspacing="0" cellpadding="0" border="0"><tr> | 	<tr><td colspan="2" height="15"></td></tr> | ||||||
| 	    <td><img src='/webim/images/tblicusers3.gif' width="30" height="15" border="0" alt="" /></td> | 	<tr> | ||||||
|     	<td class="table"><span class="black"><?php echo getstring("clients.queue.chat") ?></span></td>
 |     <td class="text"></td> | ||||||
| 		</tr> |     <td align="right" class="text" id="connstatus"> | ||||||
| 		</table> |     </td> | ||||||
| 	</td> | 	</tr> | ||||||
| </tr> | 
 | ||||||
| 
 | </table> | ||||||
| <tr id="chatend"> | 
 | ||||||
|     <td colspan="13" height="30" class="table" id="status"></td> | </td> | ||||||
| </tr> | </tr> | ||||||
| 
 | </table> | ||||||
| </table> | 
 | ||||||
| 
 | </body> | ||||||
| </td><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td> | </html> | ||||||
| </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 | app.title=Web Instant Messenger | ||||||
| site.url=http://i-services.ru | site.url=http://i-services.ru | ||||||
| site.title=i-services.ru | site.title=i-services.ru | ||||||
| company.title=Internet Services | company.title=Internet Services | ||||||
| page.main_layout.meta_keyword=live chat,live help,live support | 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.main_layout.meta_description=Live chat, live help, and live support for websites | ||||||
| page_login.title=Login | page_login.title=Login | ||||||
| page_login.login=Login: | page_login.login=Login: | ||||||
| page_login.password=Password: | page_login.password=Password: | ||||||
| page_login.remember=Remember | page_login.remember=Remember | ||||||
| page_login.error=Entered login/password is incorrect | page_login.error=Entered login/password is incorrect | ||||||
| agent.not_logged_in=Your session is expired please login again | agent.not_logged_in=Your session is expired please login again | ||||||
| page_client.pending_users=Your can find awaiting visitors. | page_client.pending_users=Your can find awaiting visitors. | ||||||
| chat.window.title.agent=Web Messenger | chat.window.title.agent=Web Messenger | ||||||
| chat.window.title.user=Web Messenger | chat.window.title.user=Web Messenger | ||||||
| chat.window.product_name=Web <span class="grey">Messenger</span> | chat.window.product_name=Web <span class="grey">Messenger</span> | ||||||
| chat.window.close_title=Close chat | chat.window.close_title=Close chat | ||||||
| chat.window.chatting_with=You chat with: | chat.window.chatting_with=You chat with: | ||||||
| chat.window.poweredby=Powered by: | chat.window.poweredby=Powered by: | ||||||
| chat.window.poweredreftext=i-services.ru | chat.window.poweredreftext=i-services.ru | ||||||
| chat.window.send_message=Send message | chat.window.send_message=Send message | ||||||
| chat.window.send_message_short=Send (Ctrl-Enter) | chat.window.send_message_short=Send (Ctrl-Enter) | ||||||
| chat.window.toolbar.mail_history=Send chat history by e-mail | chat.window.toolbar.mail_history=Send chat history by e-mail | ||||||
| chat.window.toolbar.refresh=Refresh | chat.window.toolbar.refresh=Refresh | ||||||
| chat.client.name=Your name: | chat.client.name=Your name: | ||||||
| chat.client.changename=Change name | chat.client.changename=Change name | ||||||
| chat.status.operator.left=Operator {0} left the chat | chat.status.operator.left=Operator {0} left the chat | ||||||
| chat.status.user.left=Visitor {0} left the chat | chat.status.user.left=Visitor {0} left the chat | ||||||
| chat.status.user.dead=Visitor closed chat window | 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.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.operator.joined=Operator {0} joined the chat | ||||||
| chat.status.user.changedname=Visitor changed the name {0} to {1} | chat.status.user.changedname=Visitor changed the name {0} to {1} | ||||||
| chat.status.user.reopenedthread=Visitor joined chat again | chat.status.user.reopenedthread=Visitor joined chat again | ||||||
| chat.status.operator.changed=Operator {0} changed operator {1} | chat.status.operator.changed=Operator {0} changed operator {1} | ||||||
| chat.default.username=Visitor | chat.default.username=Visitor | ||||||
| chat.error_page.title=Error | chat.error_page.title=Error | ||||||
| chat.error_page.head=Error occurred: | chat.error_page.head=Error occurred: | ||||||
| chat.error_page.close=Close... | chat.error_page.close=Close... | ||||||
| page.chat.old_browser.title=Please, use newer browser | page.chat.old_browser.title=Please, use newer browser | ||||||
| page.chat.old_browser.close=Close... | 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> | 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... | chat.wait=Thank you for contacting us. An operator will be with you shortly... | ||||||
| mailthread.title=Send chat history<br>by mail | mailthread.title=Send chat history<br>by mail | ||||||
| mailthread.enter_email=Enter your e-mail: | mailthread.enter_email=Enter your e-mail: | ||||||
| mailthread.perform=Send | mailthread.perform=Send | ||||||
| mailthread.close=Close... | mailthread.close=Close... | ||||||
| chat.mailthread.sent.title=Sent | chat.mailthread.sent.title=Sent | ||||||
| chat.mailthread.sent.content=History of your chat was sent on address {0} | 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.closewindow=Click on this link to close the window | ||||||
| chat.mailthread.sent.close=Close... | chat.mailthread.sent.close=Close... | ||||||
| chat.thread.state_wait=In queue | chat.thread.state_wait=In queue | ||||||
| chat.thread.state_wait_for_another_agent=Waiting for operator | chat.thread.state_wait_for_another_agent=Waiting for operator | ||||||
| chat.thread.state_chatting_with_agent=In chat | chat.thread.state_chatting_with_agent=In chat | ||||||
| chat.thread.state_closed=Closed | chat.thread.state_closed=Closed | ||||||
| clients.title=List of awaiting visitors | clients.title=List of awaiting visitors | ||||||
| clients.no_clients=The of awaiting visitors is empty | clients.no_clients=The of awaiting visitors is empty | ||||||
| clients.intro=The page displays list of awaiting visitors. | 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.how_to=To answer the visitor click on his/her name in the list. | ||||||
| clients.queue.prio=Priority visitors queue | clients.queue.prio=Priority visitors queue | ||||||
| clients.queue.wait=Waiting for operator for the first time | clients.queue.wait=Waiting for operator for the first time | ||||||
| clients.queue.chat=Visitors in dialogs | clients.queue.chat=Visitors in dialogs | ||||||
| pending.table.head.name=Name | pending.table.head.name=Name | ||||||
| pending.table.head.contactid=Visitor's address | pending.table.head.contactid=Visitor's address | ||||||
| pending.table.head.state=State | pending.table.head.state=State | ||||||
| pending.table.head.operator=Operator | pending.table.head.operator=Operator | ||||||
| pending.table.head.total=Total time | pending.table.head.total=Total time | ||||||
| pending.table.head.waittime=Waiting time | pending.table.head.waittime=Waiting time | ||||||
| pending.table.head.etc=Misc | pending.table.head.etc=Misc | ||||||
| pending.table.speak=Click to chat with the visitor | pending.table.speak=Click to chat with the visitor | ||||||
| pending.table.view=Watch the chat | pending.table.view=Watch the chat | ||||||
| pending.table.ban=Ban the visitor | pending.table.ban=Ban the visitor | ||||||
| thread.chat_log=Chat log | thread.chat_log=Chat log | ||||||
| thread.back_to_search=Go to search | thread.back_to_search=Go to search | ||||||
| thread.intro=The page displays chat | thread.intro=The page displays chat | ||||||
| page_analysis.search.title=Chats history | page_analysis.search.title=Chats history | ||||||
| page.analysis.search.head_name=Name | page.analysis.search.head_name=Name | ||||||
| page.analysis.search.head_host=Visitor's address | page.analysis.search.head_host=Visitor's address | ||||||
| page.analysis.search.head_operator=Operator | page.analysis.search.head_operator=Operator | ||||||
| page.analysis.search.head_time=Time in chat | page.analysis.search.head_time=Time in chat | ||||||
| common.asterisk_explanation=<b><font class="red">*</font></b> - mandatory fields | common.asterisk_explanation=<b><font class="red">*</font></b> - mandatory fields | ||||||
| page_agents.title=Agents | page_agents.title=Agents | ||||||
| page_agents.agents=Agents full list: | page_agents.agents=Agents full list: | ||||||
| page_agents.new_agent=Create new agent... | page_agents.new_agent=Create new agent... | ||||||
| page_agents.agent_name=Name | page_agents.agent_name=Name | ||||||
| page_agents.login=Login | page_agents.login=Login | ||||||
| page_agents.intro=This page displays list of company agents it also allows add new ones if you permissions | 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.title=Operator details | ||||||
| page_agent.intro=This page displays agent details, if you have access rights you can edit them. | 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. | 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 | my_settings.error.password_match=Entered passwords do not match | ||||||
| topMenu.admin=Administration | topMenu.admin=Administration | ||||||
| topMenu.users=Visitors | topMenu.users=Visitors | ||||||
| topMenu.logoff=Exit | topMenu.logoff=Exit | ||||||
| leftMenu.client_agents=Agents | leftMenu.client_agents=Agents | ||||||
| leftMenu.client_gen_button=Button code | leftMenu.client_gen_button=Button code | ||||||
| admin.content.description=Functions available for power users. | admin.content.description=Functions available for power users. | ||||||
| admin.content.client_agents=Create, delete company agents. Manage theirs permissions. | admin.content.client_agents=Create, delete company agents. Manage theirs permissions. | ||||||
| admin.content.client_gen_button=Button HTML code generation. | admin.content.client_gen_button=Button HTML code generation. | ||||||
| page.gen_button.title=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.intro=You can generate HTML code to place at your site here. | ||||||
| page.gen_button.code=HTML code | page.gen_button.code=HTML code | ||||||
| page.gen_button.sample=Example | 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! | 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.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 | 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.header=<font color="#c13030"><b>Correct the mistakes:</b><br/><ul> | ||||||
| errors.prefix=<li class="error"> | errors.prefix=<li class="error"> | ||||||
| errors.suffix=</li> | errors.suffix=</li> | ||||||
| errors.footer=</ul></font> | errors.footer=</ul></font> | ||||||
| errors.required=Please fill "{0}".   | errors.required=Please fill "{0}".   | ||||||
| form.field.login=Login | form.field.login=Login | ||||||
| form.field.login.description=Login can consist of small Latin letters<br/> and underscore. | form.field.login.description=Login can consist of small Latin letters<br/> and underscore. | ||||||
| form.field.agent_name=Name | form.field.agent_name=Name | ||||||
| form.field.agent_name.description=This name will be seen by your visitors. | form.field.agent_name.description=This name will be seen by your visitors. | ||||||
| form.field.password_confirm=Confirmation | form.field.password_confirm=Confirmation | ||||||
| form.field.password_confirm.description=Confirm new password | form.field.password_confirm.description=Confirm new password | ||||||
| form.field.password=Password | form.field.password=Password | ||||||
| form.field.password.description= | form.field.password.description= | ||||||
| button.enter=Enter | button.enter=Enter | ||||||
| button.save=Save | button.save=Save | ||||||
| button.search=Search | button.search=Search | ||||||
| tag.pagination.info=Page {0} of {1}, {2}-{3} from {4} | tag.pagination.info=Page {0} of {1}, {2}-{3} from {4} | ||||||
| tag.pagination.no_items=Found 0 elements | tag.pagination.no_items=Found 0 elements | ||||||
| image.chat.history=/webim/images/en/history.gif | image.chat.history=/webim/images/en/history.gif | ||||||
| image.chat.message=/webim/images/en/message.gif | image.chat.message=/webim/images/en/message.gif | ||||||
| image.button.login=/webim/images/en/login.gif | image.button.login=/webim/images/en/login.gif | ||||||
| image.button.save=/webim/images/en/save.gif | image.button.save=/webim/images/en/save.gif | ||||||
| image.button.search=/webim/images/en/search.gif | image.button.search=/webim/images/en/search.gif | ||||||
| chat.came.from=Vistor came from page {0} | chat.came.from=Vistor came from page {0} | ||||||
| content.history=Search the dialogs history | content.history=Search the dialogs history | ||||||
| content.logoff=Log out of the system. | content.logoff=Log out of the system. | ||||||
| form.field.agent_commonname=International name (Latin) | form.field.agent_commonname=International name (Latin) | ||||||
| form.field.agent_commonname.description=This name will be seen by your visitors | form.field.agent_commonname.description=This name will be seen by your visitors | ||||||
| install.create_db_link=Create tables in MySQL database | install.create_db_link=Create tables in MySQL database | ||||||
| install.license=Software license agreement | install.license=Software license agreement | ||||||
| install.message=We are ready to complete installation by creating tables. | install.message=We are ready to complete installation by creating tables. | ||||||
| install.title=System setup | install.title=System setup | ||||||
| installed.login_link=Proceed to login page | 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.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 | installed.title=Application installed successfully | ||||||
| menu.agents=Agents list | menu.agents=Agents list | ||||||
| menu.main=Main | menu.main=Main | ||||||
| menu.operator=You are {0} | menu.operator=You are {0} | ||||||
| no_such_operator=No such operator | no_such_operator=No such operator | ||||||
| page.gen_button.choose_image=Choose image | page.gen_button.choose_image=Choose image | ||||||
| page.gen_button.choose_locale=Target locale | page.gen_button.choose_locale=Target locale | ||||||
| page.gen_button.include_site_name=Include host name into code | page.gen_button.include_site_name=Include host name into code | ||||||
| page.gen_button.secure_links=Use secure links (https) | page.gen_button.secure_links=Use secure links (https) | ||||||
| page_agent.create_new=Here you can create new operator | page_agent.create_new=Here you can create new operator | ||||||
| page_agents.agent_commonname=International name | page_agents.agent_commonname=International name | ||||||
| page_analysis.full.text.search=User name or message text search: | 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. | page_search.intro=Search for chat history of a specified user or a specified phrase in a message. | ||||||
|  | |||||||
| @ -1,152 +1,152 @@ | |||||||
| app.title=Вэб мессенджер | app.title=Вэб мессенджер | ||||||
| site.url=http://i-services.ru | site.url=http://i-services.ru | ||||||
| site.title=i-services.ru | site.title=i-services.ru | ||||||
| company.title=Internet Services | company.title=Internet Services | ||||||
| page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm  | page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm  | ||||||
| page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем | page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем | ||||||
| page_login.title=Вход в систему | page_login.title=Вход в систему | ||||||
| page_login.login=Логин: | page_login.login=Логин: | ||||||
| page_login.password=Пароль: | page_login.password=Пароль: | ||||||
| page_login.remember=Запомнить | page_login.remember=Запомнить | ||||||
| page_login.error=Введен неправильный логин или пароль | page_login.error=Введен неправильный логин или пароль | ||||||
| agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова | agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова | ||||||
| page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей. | page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей. | ||||||
| chat.window.title.agent=Вэб Мессенджер | chat.window.title.agent=Вэб Мессенджер | ||||||
| chat.window.title.user=Вэб Мессенджер | chat.window.title.user=Вэб Мессенджер | ||||||
| chat.window.product_name=Вэб <span class="grey">Мессенджер</span> | chat.window.product_name=Вэб <span class="grey">Мессенджер</span> | ||||||
| chat.window.close_title=Закрыть диалог | chat.window.close_title=Закрыть диалог | ||||||
| chat.window.chatting_with=Вы общаетесь с: | chat.window.chatting_with=Вы общаетесь с: | ||||||
| chat.window.poweredby=Предоставлено: | chat.window.poweredby=Предоставлено: | ||||||
| chat.window.poweredreftext=i-services.ru | chat.window.poweredreftext=i-services.ru | ||||||
| chat.window.send_message=Отправить сообщение | chat.window.send_message=Отправить сообщение | ||||||
| chat.window.send_message_short=Отправить (Ctrl-Enter) | chat.window.send_message_short=Отправить (Ctrl-Enter) | ||||||
| chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте | chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте | ||||||
| chat.window.toolbar.refresh=Обновить содержимое диалога | chat.window.toolbar.refresh=Обновить содержимое диалога | ||||||
| chat.client.name=Ваше имя: | chat.client.name=Ваше имя: | ||||||
| chat.client.changename=Изменить имя | chat.client.changename=Изменить имя | ||||||
| chat.status.operator.left=Оператор {0} покинул диалог | chat.status.operator.left=Оператор {0} покинул диалог | ||||||
| chat.status.user.left=Посетитель {0} покинул диалог | chat.status.user.left=Посетитель {0} покинул диалог | ||||||
| chat.status.user.dead=Посетитель закрыл окно диалога | chat.status.user.dead=Посетитель закрыл окно диалога | ||||||
| chat.status.operator.dead=У оператора возникли проблемы со связью, мы временно перевели Вас в приоритетную очередь. Приносим извинения за Ваше ожидание. | chat.status.operator.dead=У оператора возникли проблемы со связью, мы временно перевели Вас в приоритетную очередь. Приносим извинения за Ваше ожидание. | ||||||
| chat.status.operator.joined=Оператор {0} включился в разговор | chat.status.operator.joined=Оператор {0} включился в разговор | ||||||
| chat.status.user.changedname=Посетитель сменил имя {0} на {1} | chat.status.user.changedname=Посетитель сменил имя {0} на {1} | ||||||
| chat.status.user.reopenedthread=Посетитель заново вошел в диалог | chat.status.user.reopenedthread=Посетитель заново вошел в диалог | ||||||
| chat.status.operator.changed=Оператор {0} сменил оператора {1} | chat.status.operator.changed=Оператор {0} сменил оператора {1} | ||||||
| chat.default.username=Посетитель | chat.default.username=Посетитель | ||||||
| chat.error_page.title=Ошибка | chat.error_page.title=Ошибка | ||||||
| chat.error_page.head=Произошла ошибка: | chat.error_page.head=Произошла ошибка: | ||||||
| chat.error_page.close=Закрыть... | chat.error_page.close=Закрыть... | ||||||
| page.chat.old_browser.title=Используйте более новый browser | page.chat.old_browser.title=Используйте более новый browser | ||||||
| page.chat.old_browser.close=Закрыть... | 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> | 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=Пожалуйста, подождите немного, к Вам присоединится оператор.. | chat.wait=Пожалуйста, подождите немного, к Вам присоединится оператор.. | ||||||
| mailthread.title=Отправить историю разговора<br>на почтовый ящик | mailthread.title=Отправить историю разговора<br>на почтовый ящик | ||||||
| mailthread.enter_email=Введите Ваш E-mail: | mailthread.enter_email=Введите Ваш E-mail: | ||||||
| mailthread.perform=Отправить | mailthread.perform=Отправить | ||||||
| mailthread.close=Закрыть... | mailthread.close=Закрыть... | ||||||
| chat.mailthread.sent.title=Отправлено | chat.mailthread.sent.title=Отправлено | ||||||
| chat.mailthread.sent.content=История Вашего разговора была отправлена на адрес {0} | chat.mailthread.sent.content=История Вашего разговора была отправлена на адрес {0} | ||||||
| chat.mailthread.sent.closewindow=Нажмите на эту ссылку чтобы закрыть окно | chat.mailthread.sent.closewindow=Нажмите на эту ссылку чтобы закрыть окно | ||||||
| chat.mailthread.sent.close=Закрыть... | chat.mailthread.sent.close=Закрыть... | ||||||
| chat.thread.state_wait=В очереди | chat.thread.state_wait=В очереди | ||||||
| chat.thread.state_wait_for_another_agent=Ожидание оператора | chat.thread.state_wait_for_another_agent=Ожидание оператора | ||||||
| chat.thread.state_chatting_with_agent=В диалоге | chat.thread.state_chatting_with_agent=В диалоге | ||||||
| chat.thread.state_closed=Закрыто | chat.thread.state_closed=Закрыто | ||||||
| clients.title=Список ожидающих посетителей | clients.title=Список ожидающих посетителей | ||||||
| clients.no_clients=В этой очереди ожидающих посетителей нет | clients.no_clients=В этой очереди ожидающих посетителей нет | ||||||
| clients.intro=На этой странице можно просмотреть список ожидающих ответа посетителей. | clients.intro=На этой странице можно просмотреть список ожидающих ответа посетителей. | ||||||
| clients.how_to=Для ответа посетителю кликните на соответствующее имя в списке. | clients.how_to=Для ответа посетителю кликните на соответствующее имя в списке. | ||||||
| clients.queue.prio=Приоритетная очередь посетителей | clients.queue.prio=Приоритетная очередь посетителей | ||||||
| clients.queue.wait=Ожидающие оператора в первый раз | clients.queue.wait=Ожидающие оператора в первый раз | ||||||
| clients.queue.chat=Посетители в диалогах | clients.queue.chat=Посетители в диалогах | ||||||
| pending.table.head.name=Имя | pending.table.head.name=Имя | ||||||
| pending.table.head.contactid=Адрес посетителя | pending.table.head.contactid=Адрес посетителя | ||||||
| pending.table.head.state=Состояние | pending.table.head.state=Состояние | ||||||
| pending.table.head.operator=Оператор | pending.table.head.operator=Оператор | ||||||
| pending.table.head.total=Общее время | pending.table.head.total=Общее время | ||||||
| pending.table.head.waittime=Время ожидания | pending.table.head.waittime=Время ожидания | ||||||
| pending.table.head.etc=Разное | pending.table.head.etc=Разное | ||||||
| pending.table.speak=Нажмите для того, чтобы обслужить посетителя | pending.table.speak=Нажмите для того, чтобы обслужить посетителя | ||||||
| pending.table.view=Подключиться к диалогу в режиме просмотра | pending.table.view=Подключиться к диалогу в режиме просмотра | ||||||
| pending.table.ban=Пометить посетителя как нежелательного | pending.table.ban=Пометить посетителя как нежелательного | ||||||
| thread.chat_log=Протокол разговора | thread.chat_log=Протокол разговора | ||||||
| thread.back_to_search=Перейти в поиск | thread.back_to_search=Перейти в поиск | ||||||
| thread.intro=На данной странице Вы можете просмотреть диалог. | thread.intro=На данной странице Вы можете просмотреть диалог. | ||||||
| page_analysis.search.title=История диалогов | page_analysis.search.title=История диалогов | ||||||
| page.analysis.search.head_name=Имя | page.analysis.search.head_name=Имя | ||||||
| page.analysis.search.head_host=Адрес посетителя | page.analysis.search.head_host=Адрес посетителя | ||||||
| page.analysis.search.head_operator=Оператор | page.analysis.search.head_operator=Оператор | ||||||
| page.analysis.search.head_time=Время в диалоге | page.analysis.search.head_time=Время в диалоге | ||||||
| common.asterisk_explanation=<b><font class="red">*</font></b> - поля, обязательные для заполнения | common.asterisk_explanation=<b><font class="red">*</font></b> - поля, обязательные для заполнения | ||||||
| page_agents.title=Агенты | page_agents.title=Агенты | ||||||
| page_agents.agents=Полный список агентов: | page_agents.agents=Полный список агентов: | ||||||
| page_agents.new_agent=Создать нового агента... | page_agents.new_agent=Создать нового агента... | ||||||
| page_agents.agent_name=Имя | page_agents.agent_name=Имя | ||||||
| page_agents.login=Логин | page_agents.login=Логин | ||||||
| page_agents.intro=На этой странице можно просмотреть список агентов компании, добавить нового при наличии соответствующих прав доступа | page_agents.intro=На этой странице можно просмотреть список агентов компании, добавить нового при наличии соответствующих прав доступа | ||||||
| page_agent.title=Детали агента | page_agent.title=Детали агента | ||||||
| page_agent.intro=На этой странице Вы можете просмотреть детали и свойства агента и отредактировать их | page_agent.intro=На этой странице Вы можете просмотреть детали и свойства агента и отредактировать их | ||||||
| page_agent.error.duplicate_login=Выберите другой логин, т.к. агент с введенным логином уже зарегистрирован в системе. | page_agent.error.duplicate_login=Выберите другой логин, т.к. агент с введенным логином уже зарегистрирован в системе. | ||||||
| my_settings.error.password_match=Введенные пароли должны совпадать | my_settings.error.password_match=Введенные пароли должны совпадать | ||||||
| topMenu.admin=Операторское меню | topMenu.admin=Операторское меню | ||||||
| topMenu.users=Посетители | topMenu.users=Посетители | ||||||
| topMenu.logoff=Выход | topMenu.logoff=Выход | ||||||
| leftMenu.client_agents=Агенты | leftMenu.client_agents=Агенты | ||||||
| leftMenu.client_gen_button=Код кнопки | leftMenu.client_gen_button=Код кнопки | ||||||
| admin.content.description=Набор функций, доступный только зарегистрированным операторам | admin.content.description=Набор функций, доступный только зарегистрированным операторам | ||||||
| admin.content.client_agents=Создание, удаление агентов компании. Управление их правами и возможностями. | admin.content.client_agents=Создание, удаление агентов компании. Управление их правами и возможностями. | ||||||
| admin.content.client_gen_button=Получение HTML-кода для кнопки "Вэб Мессенджера". | admin.content.client_gen_button=Получение HTML-кода для кнопки "Вэб Мессенджера". | ||||||
| page.gen_button.title=Получение HTML-кода кнопки | page.gen_button.title=Получение HTML-кода кнопки | ||||||
| page.gen_button.intro=На этой странице Вы можете получить HTML-код кнопки "Вэб Мессенджера" для размещения на своем сайте. | page.gen_button.intro=На этой странице Вы можете получить HTML-код кнопки "Вэб Мессенджера" для размещения на своем сайте. | ||||||
| page.gen_button.code=HTML-код | page.gen_button.code=HTML-код | ||||||
| page.gen_button.sample=Пример | page.gen_button.sample=Пример | ||||||
| page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется! | page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется! | ||||||
| mail.user.history.subject=Вэб Мессенджер: история диалога | mail.user.history.subject=Вэб Мессенджер: история диалога | ||||||
| mail.user.history.body=Здраствуйте, {0}!\n\nПо Вашему запросу, высылаем историю: \n\n{1}\n--- \nС уважением,\nСлужба поддержки i-services.ru | 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.header=<font color="#c13030"><b>Исправьте ошибки:</b><br/><ul> | ||||||
| errors.prefix=<li class="error"> | errors.prefix=<li class="error"> | ||||||
| errors.suffix=</li> | errors.suffix=</li> | ||||||
| errors.footer=</ul></font> | errors.footer=</ul></font> | ||||||
| errors.required=Заполните поле "{0}".   | errors.required=Заполните поле "{0}".   | ||||||
| form.field.login=Логин | form.field.login=Логин | ||||||
| form.field.login.description=Логин может состоять из маленьких латинских<br/> букв и знака подчеркивания. | form.field.login.description=Логин может состоять из маленьких латинских<br/> букв и знака подчеркивания. | ||||||
| form.field.agent_name=Имя | form.field.agent_name=Имя | ||||||
| form.field.agent_name.description=Под этим именем Вас увидят ваши посетители, <br/> по нему же к Вам будет обращаться система. | form.field.agent_name.description=Под этим именем Вас увидят ваши посетители, <br/> по нему же к Вам будет обращаться система. | ||||||
| form.field.password_confirm=Подтверждение | form.field.password_confirm=Подтверждение | ||||||
| form.field.password_confirm.description=Подтвердите введенный пароль | form.field.password_confirm.description=Подтвердите введенный пароль | ||||||
| form.field.password=Пароль | form.field.password=Пароль | ||||||
| form.field.password.description= | form.field.password.description= | ||||||
| button.enter=Войти | button.enter=Войти | ||||||
| button.save=Сохранить | button.save=Сохранить | ||||||
| button.search=Искать | button.search=Искать | ||||||
| tag.pagination.info=Страница {0} из {1}, показаны {2}-{3} из {4} | tag.pagination.info=Страница {0} из {1}, показаны {2}-{3} из {4} | ||||||
| tag.pagination.no_items=Ничего не найдено | tag.pagination.no_items=Ничего не найдено | ||||||
| image.chat.history=/webim/images/ru/history.gif | image.chat.history=/webim/images/ru/history.gif | ||||||
| image.chat.message=/webim/images/ru/message.gif | image.chat.message=/webim/images/ru/message.gif | ||||||
| image.button.login=/webim/images/ru/login.gif | image.button.login=/webim/images/ru/login.gif | ||||||
| image.button.save=/webim/images/ru/save.gif | image.button.save=/webim/images/ru/save.gif | ||||||
| image.button.search=/webim/images/ru/search.gif | image.button.search=/webim/images/ru/search.gif | ||||||
| chat.came.from=Посетитель пришел со страницы {0} | chat.came.from=Посетитель пришел со страницы {0} | ||||||
| content.history=Поиск по истории диалогов | content.history=Поиск по истории диалогов | ||||||
| content.logoff=Покинуть систему. | content.logoff=Покинуть систему. | ||||||
| form.field.agent_commonname=Интернациональное имя (латиницей) | form.field.agent_commonname=Интернациональное имя (латиницей) | ||||||
| form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран | form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран | ||||||
| install.create_db_link=Создать необходимые таблицы в базе данных | install.create_db_link=Создать необходимые таблицы в базе данных | ||||||
| install.license=Лицензионное соглашение о программном обеспечении | install.license=Лицензионное соглашение о программном обеспечении | ||||||
| install.message=Для окончания установки необходимо создать таблицы. | install.message=Для окончания установки необходимо создать таблицы. | ||||||
| install.title=Установка | install.title=Установка | ||||||
| installed.login_link=Войти в систему | installed.login_link=Войти в систему | ||||||
| installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.<br/>В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. | installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.<br/>В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. | ||||||
| installed.title=Установка завершена | installed.title=Установка завершена | ||||||
| menu.agents=Список агентов | menu.agents=Список агентов | ||||||
| menu.main=Главная | menu.main=Главная | ||||||
| menu.operator=Вы {0} | menu.operator=Вы {0} | ||||||
| no_such_operator=Запрашиваемая учетная запись не существует | no_such_operator=Запрашиваемая учетная запись не существует | ||||||
| page.gen_button.choose_image=Выбор картинки | page.gen_button.choose_image=Выбор картинки | ||||||
| page.gen_button.choose_locale=Для какой локали создавать кнопку | page.gen_button.choose_locale=Для какой локали создавать кнопку | ||||||
| page.gen_button.include_site_name=Включать имя сайта в код | page.gen_button.include_site_name=Включать имя сайта в код | ||||||
| page.gen_button.secure_links=Использовать защищенное соединение (https) | page.gen_button.secure_links=Использовать защищенное соединение (https) | ||||||
| page_agent.create_new=Создание нового оператора | page_agent.create_new=Создание нового оператора | ||||||
| page_agents.agent_commonname=Интернациональное имя | page_agents.agent_commonname=Интернациональное имя | ||||||
| page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: | page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: | ||||||
| page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. | page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. | ||||||
|  | |||||||
| @ -1,88 +1,76 @@ | |||||||
| <?php | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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="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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("thread.chat_log") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 | 		<h1><?php echo getstring("thread.chat_log") ?></h1>
 | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 	 | ||||||
| 
 | 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	 | ||||||
| <tr> | <?php echo getstring("thread.intro") ?>
 | ||||||
| <td valign="top" class="text"> | 
 | ||||||
| 	 | <br/><br/> | ||||||
| 		<h1><?php echo getstring("thread.chat_log") ?></h1>
 | 
 | ||||||
| 	 | <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'> | ||||||
| <?php echo getstring("thread.intro") ?>
 | 		<span class="message"> | ||||||
| 
 |                         <?php foreach( $page['threadMessages'] as $message ) { ?>
 | ||||||
| <br/><br/> |                         	<?php echo $message ?>	
 | ||||||
| 
 |                         <?php } ?>			
 | ||||||
| <table border="0" cellpadding="0" cellspacing="0"> | 		</span> | ||||||
| <tr> | 	</td> | ||||||
| 	<td class='table' bgcolor='#276db8' height='30'><span class='header'> | </tr> | ||||||
| 		<?php echo getstring("thread.chat_log") ?>
 | <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> | ||||||
| 	</span></td> | </table> | ||||||
| </tr> | 
 | ||||||
| <tr> | <br /> | ||||||
| 	<td height='45' class='table'> | <a href="/webim/operator/history.php"> | ||||||
| 		<span class="message"> | 	<?php echo getstring("thread.back_to_search") ?></a>
 | ||||||
|                         <?php foreach( $page['threadMessages'] as $message ) { ?>
 | <br /> | ||||||
|                         	<?php echo $message ?>	
 | 
 | ||||||
|                         <?php } ?>			
 | </td> | ||||||
| 		</span> | </tr> | ||||||
| 	</td> | </table> | ||||||
| </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> | </body> | ||||||
| </table> | </html> | ||||||
| 
 | 
 | ||||||
| <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 | <?php | ||||||
| /* | /* | ||||||
|  * This file is part of Web Instant Messenger project. |  * This file is part of Web Instant Messenger project. | ||||||
|  * |  * | ||||||
|  * Copyright (c) 2005-2007 Internet Services Ltd. |  * Copyright (c) 2005-2007 Internet Services Ltd. | ||||||
|  * All rights reserved. This program and the accompanying materials |  * All rights reserved. This program and the accompanying materials | ||||||
|  * are made available under the terms of the Eclipse Public License v1.0 |  * are made available under the terms of the Eclipse Public License v1.0 | ||||||
|  * which accompanies this distribution, and is available at |  * which accompanies this distribution, and is available at | ||||||
|  * http://www.eclipse.org/legal/epl-v10.html |  * http://www.eclipse.org/legal/epl-v10.html | ||||||
|  * |  * | ||||||
|  * Contributors: |  * Contributors: | ||||||
|  *    Evgeny Gryaznov - initial API and implementation |  *    Evgeny Gryaznov - initial API and implementation | ||||||
|  */ |  */ | ||||||
| ?>
 | ?>
 | ||||||
| <html> | <html> | ||||||
| <head> | <head> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" /> | <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") ?>
 | ||||||
| <link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/> | </title> | ||||||
| <title> | 
 | ||||||
| 	<?php echo getstring("app.title") ?>	- <?php echo getstring("page_analysis.search.title") ?>
 | <meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>"> | ||||||
| </title> | <meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>"> | ||||||
| 
 | </head> | ||||||
| <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") ?>"> | <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"> | ||||||
| </head> | 	 | ||||||
| 
 |  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | ||||||
| <body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1"> | 		<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> 
 | ||||||
| <table width="100%" cellpadding="2" cellspacing="0" border="0"> | 	 | ||||||
| <tr> | 
 | ||||||
| <td valign="top" class="text"> | 	<?php echo getstring("page_search.intro") ?>
 | ||||||
| 	 | <br /> | ||||||
|  <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">  | <br /> | ||||||
| 		<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") ?>
 | <form name="searchForm" method="get" action="/webim/operator/history.php"> | ||||||
| <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'> | ||||||
| <br /> | 	<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> | ||||||
| <form name="searchForm" method="get" action="/webim/operator/history.php"> | 		<td class="formauth"><input type="text" name="q" size="80" value="<?php echo form_value('q') ?>" class="formauth"/></td> | ||||||
| <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'> | 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | ||||||
| 	<tr> | 		<td class="formauth"> | ||||||
| 		<td class="formauth" colspan="3"><?php echo getstring("page_analysis.full.text.search") ?></td>
 | 			<input type="image" name="" src='<?php echo getstring("image.button.search") ?>' border="0" alt='<?php echo getstring("button.search") ?>'/> | ||||||
| 	</tr> | 		</td> | ||||||
| 	<tr> | 	</tr> | ||||||
| 		<td class="formauth"><input type="text" name="q" size="80" value="<?php echo form_value('q') ?>" class="formauth"/></td> | </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> | ||||||
| 		<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td> | </form> | ||||||
| 		<td class="formauth"> | 
 | ||||||
| 			<input type="image" name="" src='<?php echo getstring("image.button.search") ?>' border="0" alt='<?php echo getstring("button.search") ?>'/> | <br/> | ||||||
| 		</td> | <?php if( $page['pagination'] && $page['pagination.items'] ) { ?>
 | ||||||
| 	</tr> | 	<table cellpadding="0" cellspacing="0" border="0" width="100%"> | ||||||
| </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> | 		<tr> | ||||||
| </form> | 			<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>
 | ||||||
| <br/> | 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_operator") ?></span></td><td width='3'></td>
 | ||||||
| <?php if( $page['pagination'] && $page['pagination.items'] ) { ?>
 | 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_time") ?></span></td>
 | ||||||
| 	<table cellpadding="0" cellspacing="0" border="0" width="100%"> | 		</tr> | ||||||
| 		<tr> | 		<?php foreach( $page['pagination.items'] as $chatthread ) { ?>
 | ||||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_name") ?></span></td><td width='3'></td>
 | 			<tr> | ||||||
| 			<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 height='30' class='table'> | ||||||
| 			<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_operator") ?></span></td><td width='3'></td>
 | 					<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 class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page.analysis.search.head_time") ?></span></td>
 | 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | ||||||
| 		</tr> | 				<td height='30' class='table'> | ||||||
| 		<?php foreach( $page['pagination.items'] as $chatthread ) { ?>
 | 					<?php echo htmlspecialchars($chatthread['remote']) ?>
 | ||||||
| 			<tr> | 				</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'> | 				<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>
 |         			<?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><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'> | 				<td height='30' class='table'> | ||||||
| 					<?php echo htmlspecialchars($chatthread['remote']) ?>
 | 					<?php echo date("d M Y H:i:s", $chatthread['created']) ?>,  <?php echo date_diff($chatthread['modified']-$chatthread['created']) ?>
 | ||||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | 				</td> | ||||||
| 				<td height='30' class='table'> | 			</tr> | ||||||
|         			<?php if( $chatthread['agentName'] ) { ?><?php echo htmlspecialchars($chatthread['agentName']) ?><?php } ?>
 | 			<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> | ||||||
| 				</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td> | 		<?php } ?>
 | ||||||
| 				<td height='30' class='table'> | 	</table> | ||||||
| 					<?php echo date("d M Y H:i:s", $chatthread['created']) ?>,  <?php echo date_diff($chatthread['modified']-$chatthread['created']) ?>
 | 	<br /> | ||||||
| 				</td> | 	<?php echo generate_pagination($page['pagination']) ?>
 | ||||||
| 			</tr> | <?php } ?>
 | ||||||
| 			<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 if( $page['pagination'] && !$page['pagination.items'] ) { ?>
 | ||||||
| 		<?php } ?>
 | 	<br/><br/> | ||||||
| 	</table> | 	<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'> | ||||||
| 	<br /> | 		<span class="table"> | ||||||
| 	<?php echo generate_pagination($page['pagination']) ?>
 | 			<?php echo getstring("tag.pagination.no_items") ?>
 | ||||||
| <?php } ?>
 | 		</span> | ||||||
| <?php if( $page['pagination'] && !$page['pagination.items'] ) { ?>
 | 	</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> | ||||||
| 	<br/><br/> | <?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'> | 
 | ||||||
| 		<span class="table"> | </td> | ||||||
| 			<?php echo getstring("tag.pagination.no_items") ?>
 | </tr> | ||||||
| 		</span> | </table> | ||||||
| 	</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 } ?>
 | </body> | ||||||
| 
 | </html> | ||||||
| </td> | 
 | ||||||
| </tr> |  | ||||||
| </table> |  | ||||||
| 
 |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| 
 |  | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user