mirror of
https://github.com/Mibew/tray.git
synced 2024-11-15 09:24:12 +03:00
import sources
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@3 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
b2bde3fc44
commit
91bd0676c2
35
src/webim/INSTALL.txt
Normal file
35
src/webim/INSTALL.txt
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
Web Instant Messenger 1.0.6
|
||||
Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
* A webserver or web hosting account with support for PHP
|
||||
* MySQL database 4.0 or above
|
||||
* PHP 4.3.3 or above with mysql support
|
||||
|
||||
QUICK INSTALLATION
|
||||
|
||||
1. Create folder with name 'webim' in the root of your website.
|
||||
|
||||
NOTE!!! current revision of WebIM could work only in /webim/ location
|
||||
!!! on your website.
|
||||
|
||||
2. Upload all the files contained in this archive (retaining the directory
|
||||
structure) into created folder.
|
||||
3. Edit /webim/libs/config.php and setup database connection parameters.
|
||||
4. Using your web browser visit http://<yourdomain>/webim/install/ and
|
||||
hit "Create tables"
|
||||
5. Remove /webim/install/ directory from your server
|
||||
6. Logon as
|
||||
user: admin
|
||||
password: <empty>
|
||||
7. Get button code and setup it on your site.
|
||||
8. Change your password and name.
|
||||
9. Wait for your visitors on "Pending users" page.
|
||||
|
||||
OPTIONAL
|
||||
|
||||
Download and install Web Messenger Tray for Windows application
|
||||
from http://www.webim.ru.
|
30
src/webim/button.php
Normal file
30
src/webim/button.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('libs/common.php');
|
||||
require('libs/operator.php');
|
||||
|
||||
$lang = verifyparam("lang", "/^\w\w$/", "");
|
||||
if( !$lang || !in_array($lang,$available_locales) )
|
||||
$lang = $current_locale;
|
||||
|
||||
$image_postfix = has_online_operators() ? "on" : "off";
|
||||
$name = "images/webim/webim_${lang}_${image_postfix}.gif";
|
||||
|
||||
$fp = fopen($name, 'rb') or die("no image");
|
||||
header("Content-Type: image/gif");
|
||||
header("Content-Length: ".filesize($name));
|
||||
fpassthru($fp);
|
||||
exit;
|
||||
?>
|
66
src/webim/client.php
Normal file
66
src/webim/client.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('libs/common.php');
|
||||
require('libs/chat.php');
|
||||
|
||||
if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
|
||||
|
||||
$thread = NULL;
|
||||
if( isset($_SESSION['threadid']) ) {
|
||||
$thread = reopen_thread($_SESSION['threadid']);
|
||||
}
|
||||
|
||||
if( !$thread ) {
|
||||
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";
|
||||
$remote = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : $_SERVER['REMOTE_ADDR'];
|
||||
$userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username");
|
||||
|
||||
$thread = create_thread($userName, $remote, $referer,$current_locale);
|
||||
$_SESSION['threadid'] = $thread['threadid'];
|
||||
post_message($thread['threadid'],$kind_info,getstring('chat.wait'));
|
||||
}
|
||||
$threadid = $thread['threadid'];
|
||||
$token = $thread['ltoken'];
|
||||
$level = get_remote_level($_SERVER['HTTP_USER_AGENT']);
|
||||
header("Location: ".dirname($_SERVER['PHP_SELF'])."/client.php?thread=$threadid&token=$token&level=$level");
|
||||
exit;
|
||||
}
|
||||
|
||||
$token = verifyparam( "token", "/^\d{1,8}$/");
|
||||
$threadid = verifyparam( "thread", "/^\d{1,8}$/");
|
||||
$level = verifyparam( "level", "/^(ajaxed|simple|old)$/");
|
||||
|
||||
$thread = thread_by_id($threadid);
|
||||
if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) {
|
||||
die("wrong thread");
|
||||
}
|
||||
|
||||
//$level = "simple";
|
||||
|
||||
setup_chatview_for_user($thread, $level);
|
||||
start_html_output();
|
||||
|
||||
$pparam = verifyparam( "page", "/^(mailthread)$/", "default");
|
||||
if( $pparam == "mailthread" ) {
|
||||
require('view/chat_mailthread.php');
|
||||
} else if( $level == "ajaxed" ) {
|
||||
require('view/chat_ajaxed.php');
|
||||
} else if( $level == "simple" ) {
|
||||
require('view/chat_simple.php');
|
||||
} else if( $level == "old" ) {
|
||||
require('view/chat_oldbrowser.php');
|
||||
}
|
||||
|
||||
?>
|
1
src/webim/index.php
Normal file
1
src/webim/index.php
Normal file
@ -0,0 +1 @@
|
||||
<?php header("Location: /webim/operator/index.php"); exit; ?>
|
18
src/webim/install/index.php
Normal file
18
src/webim/install/index.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('view_index.php');
|
||||
|
||||
?>
|
89
src/webim/install/install.php
Normal file
89
src/webim/install/install.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
function drop_tables() {
|
||||
$link = connect();
|
||||
perform_query("DROP TABLE IF EXISTS chatthread",$link);
|
||||
perform_query("DROP TABLE IF EXISTS chatmessage",$link);
|
||||
perform_query("DROP TABLE IF EXISTS chatrevision",$link);
|
||||
perform_query("DROP TABLE IF EXISTS chatoperator",$link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
function create_tables() {
|
||||
global $dbencoding;
|
||||
$link = connect();
|
||||
|
||||
$query =
|
||||
"CREATE TABLE chatthread (\n".
|
||||
" threadid int NOT NULL auto_increment PRIMARY KEY ,\n".
|
||||
" userName varchar(64) NOT NULL,\n".
|
||||
" agentName varchar(64),\n".
|
||||
" dtmcreated datetime DEFAULT 0,\n".
|
||||
" dtmmodified datetime DEFAULT 0,\n".
|
||||
" lrevision int NOT NULL DEFAULT 0,\n".
|
||||
" istate int NOT NULL DEFAULT 0,\n".
|
||||
" ltoken int NOT NULL,\n".
|
||||
" remote varchar(255),\n".
|
||||
" referer text,\n".
|
||||
" locale varchar(8),\n".
|
||||
" lastpinguser datetime DEFAULT 0,\n".
|
||||
" lastpingagent datetime DEFAULT 0\n".
|
||||
") charset $dbencoding\n";
|
||||
|
||||
perform_query($query,$link);
|
||||
|
||||
$query =
|
||||
"CREATE TABLE chatmessage\n".
|
||||
"(\n".
|
||||
" messageid int NOT NULL auto_increment PRIMARY KEY,\n".
|
||||
" threadid int NOT NULL references chatthread(threadid),\n".
|
||||
" ikind int NOT NULL,\n".
|
||||
" tmessage text NOT NULL,\n".
|
||||
" dtmcreated datetime DEFAULT 0,\n".
|
||||
" tname varchar(64)\n".
|
||||
") charset $dbencoding\n";
|
||||
|
||||
perform_query($query,$link);
|
||||
|
||||
perform_query("CREATE TABLE chatrevision (id INT NOT NULL)",$link);
|
||||
perform_query("INSERT INTO chatrevision VALUES (1)",$link);
|
||||
|
||||
$query =
|
||||
"CREATE TABLE chatoperator\n".
|
||||
"(\n".
|
||||
" operatorid int NOT NULL auto_increment PRIMARY KEY,\n".
|
||||
" vclogin varchar(64) NOT NULL,\n".
|
||||
" vcpassword varchar(64) NOT NULL,\n".
|
||||
" vclocalename varchar(64) NOT NULL,\n".
|
||||
" vccommonname varchar(64) NOT NULL,\n".
|
||||
" dtmlastvisited datetime DEFAULT 0\n".
|
||||
") charset $dbencoding\n";
|
||||
|
||||
perform_query($query,$link);
|
||||
|
||||
mysql_close($link);
|
||||
|
||||
create_operator("admin", "", "Administrator", "Administrator");
|
||||
}
|
||||
|
||||
drop_tables();
|
||||
create_tables();
|
||||
|
||||
require('view_install.php');
|
||||
|
||||
?>
|
64
src/webim/install/view_index.php
Normal file
64
src/webim/install/view_index.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("install.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<h1><?php echo getstring("install.title") ?></h1>
|
||||
|
||||
|
||||
<?php echo getstring("install.message") ?>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<a href="install.php"><?php echo getstring("install.create_db_link") ?></a>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<a href="/webim/LICENSE.html" target="_blank"><?php echo getstring("install.license") ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
64
src/webim/install/view_install.php
Normal file
64
src/webim/install/view_install.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("installed.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<h1><?php echo getstring("installed.title") ?></h1>
|
||||
|
||||
|
||||
<?php echo getstring("installed.message") ?>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<a href="/webim/operator/login.php"><?php echo getstring("installed.login_link") ?></a>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<a href="/webim/LICENSE.html" target="_blank"><?php echo getstring("install.license") ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
1
src/webim/libs/.htaccess
Normal file
1
src/webim/libs/.htaccess
Normal file
@ -0,0 +1 @@
|
||||
Deny from all
|
350
src/webim/libs/chat.php
Normal file
350
src/webim/libs/chat.php
Normal file
@ -0,0 +1,350 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
$namecookie = "WEBIM_Name";
|
||||
|
||||
$state_queue = 0;
|
||||
$state_waiting = 1;
|
||||
$state_chatting = 2;
|
||||
$state_closed = 3;
|
||||
|
||||
$kind_user = 1;
|
||||
$kind_agent = 2;
|
||||
$kind_info = 4;
|
||||
$kind_conn = 5;
|
||||
$kind_events = 6;
|
||||
|
||||
$kind_to_string = array( $kind_user => "user", $kind_agent => "agent",
|
||||
$kind_info => "inf", $kind_conn => "conn", $kind_events => "event" );
|
||||
|
||||
function next_token() {
|
||||
return rand(99999,99999999);
|
||||
}
|
||||
|
||||
function next_revision($link) {
|
||||
perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link);
|
||||
$val = mysql_insert_id($link);
|
||||
return $val;
|
||||
}
|
||||
|
||||
function post_message($threadid,$kind,$message,$from=null) {
|
||||
$link = connect();
|
||||
|
||||
$query = sprintf(
|
||||
"insert into chatmessage (threadid,ikind,tmessage,tname,dtmcreated) values (%s, %s,'%s',%s,CURRENT_TIMESTAMP)",
|
||||
$threadid,
|
||||
$kind,
|
||||
mysql_real_escape_string($message),
|
||||
$from ? "'".mysql_real_escape_string($from)."'" : "null" );
|
||||
|
||||
perform_query($query,$link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
function prepare_html_message($text) {
|
||||
$escaped_text = htmlspecialchars($text);
|
||||
$text_w_links = preg_replace('/(http|ftp):\/\/\S*/','<a href="$0" target="_blank">$0</a>',$escaped_text);
|
||||
$multiline = str_replace("\n","<br/>",$text_w_links);
|
||||
return $multiline;
|
||||
}
|
||||
|
||||
function message_to_html($msg) {
|
||||
global $kind_to_string;
|
||||
$message = "<span>".date("H:i:s",$msg['created'])."</span> ";
|
||||
$kind = $kind_to_string{$msg['ikind']};
|
||||
if( $msg['tname'] )
|
||||
$message.= "<span class='n$kind'>".htmlspecialchars($msg['tname'])."</span>: ";
|
||||
$message.= "<span class='m$kind'>".prepare_html_message($msg['tmessage'])."</span><br/>";
|
||||
return $message;
|
||||
}
|
||||
|
||||
function message_to_text($msg) {
|
||||
global $kind_user, $kind_agent, $kind_info;
|
||||
$time = date("H:i:s ",$msg['created']);
|
||||
if($msg['ikind'] == $kind_user || $msg['ikind'] == $kind_agent) {
|
||||
if( $msg['tname'] )
|
||||
return $time.$msg['tname'].": ".$msg['tmessage']."\n";
|
||||
else
|
||||
return $time.$msg['tmessage']."\n";
|
||||
} else if($msg['ikind'] == $kind_info ) {
|
||||
return $time.$msg['tmessage']."\n";
|
||||
} else {
|
||||
return $time."[".$msg['tmessage']."]\n";
|
||||
}
|
||||
}
|
||||
|
||||
function get_messages($threadid,$meth,&$lastid) {
|
||||
$link = connect();
|
||||
|
||||
$query = sprintf(
|
||||
"select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ".
|
||||
"where threadid = %s and messageid > %s order by messageid",
|
||||
$threadid, $lastid );
|
||||
|
||||
$messages = array();
|
||||
$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query);
|
||||
|
||||
while ($msg = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
$message = ($meth == 'text') ? message_to_text($msg) : message_to_html($msg);
|
||||
$messages[] = $message;
|
||||
if( $msg['messageid'] > $lastid )
|
||||
$lastid = $msg['messageid'];
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
mysql_close($link);
|
||||
return $messages;
|
||||
}
|
||||
|
||||
function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) {
|
||||
global $webim_encoding, $webimroot;
|
||||
$output = get_messages( $threadid, "html", $lastid );
|
||||
|
||||
if( $format == "xml" ) {
|
||||
start_xml_output();
|
||||
print("<thread lastID=\"$lastid\">");
|
||||
foreach( $output as $msg ) {
|
||||
print "<message>".myiconv($webim_encoding,"utf-8",escape_with_cdata($msg))."</message>\n";
|
||||
}
|
||||
print("</thread>");
|
||||
} else if( $format == "html" ) {
|
||||
start_html_output();
|
||||
$url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false");
|
||||
|
||||
print("<html><head>\n".
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"$webimroot/chat.css\" />\n".
|
||||
"<meta http-equiv=\"Refresh\" content=\"7; URL=$url&sn=11\">\n".
|
||||
"<meta http-equiv=\"Pragma\" content=\"no-cache\">\n".
|
||||
"</head>".
|
||||
"<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' marginwidth='0' marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">".
|
||||
"<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>" );
|
||||
|
||||
foreach( $output as $msg ) {
|
||||
print $msg;
|
||||
}
|
||||
|
||||
print(
|
||||
"</td></tr></table><a name='aend'>".
|
||||
"</body></html>" );
|
||||
}
|
||||
}
|
||||
|
||||
function setup_chatview_for_user($thread,$level) {
|
||||
global $page, $webimroot;
|
||||
$page = array();
|
||||
$page['agent'] = false;
|
||||
$page['user'] = true;
|
||||
$page['canpost'] = true;
|
||||
$nameisset = getstring("chat.default.username") != $thread['userName'];
|
||||
$page['displ1'] = $nameisset ? "none" : "inline";
|
||||
$page['displ2'] = $nameisset ? "inline" : "none";
|
||||
$page['level'] = $level;
|
||||
$page['ct.chatThreadId'] = $thread['threadid'];
|
||||
$page['ct.token'] = $thread['ltoken'];
|
||||
$page['ct.user.name'] = $thread['userName'];
|
||||
|
||||
$page['ct.company.name'] = "Test company"; // TODO
|
||||
$page['ct.company.chatLogoURL'] = ""; // TODO
|
||||
|
||||
$params = "thread=".$thread['threadid']."&token=".$thread['ltoken'];
|
||||
$page['selfLink'] = "$webimroot/client.php?".$params."&level=".$level;
|
||||
}
|
||||
|
||||
function setup_chatview_for_operator($thread) {
|
||||
global $page;
|
||||
$page = array();
|
||||
$page['agent'] = true;
|
||||
$page['user'] = false;
|
||||
$page['canpost'] = true;
|
||||
$page['ct.chatThreadId'] = $thread['threadid'];
|
||||
$page['ct.token'] = $thread['ltoken'];
|
||||
$page['ct.user.name'] = $thread['userName'];
|
||||
$page['ct.company.name'] = "Test company";
|
||||
$page['ct.company.chatLogoURL'] = "";
|
||||
}
|
||||
|
||||
function is_ajax_browser($name,$ver,$useragent) {
|
||||
if( $name == "opera" )
|
||||
return $ver >= 8.02;
|
||||
if( $name == "safari" )
|
||||
return $ver >= 125;
|
||||
if( $name == "msie" )
|
||||
return $ver >= 5.5 && !strstr($useragent, "powerpc");
|
||||
if( $name == "netscape" )
|
||||
return $ver >= 7.1;
|
||||
if( $name == "mozilla")
|
||||
return $ver >= 1.4;
|
||||
if( $name == "firefox")
|
||||
return $ver >= 1.0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_old_browser($name,$ver) {
|
||||
if( $name == "opera" )
|
||||
return $ver < 7.0;
|
||||
if( $name == "msie" )
|
||||
return $ver < 5.0;
|
||||
return false;
|
||||
}
|
||||
|
||||
$knownAgents = array("opera","msie","safari","firefox","netscape","mozilla");
|
||||
|
||||
function get_remote_level($useragent) {
|
||||
global $knownAgents;
|
||||
$useragent = strtolower($useragent);
|
||||
foreach( $knownAgents as $agent ) {
|
||||
if( strstr($useragent,$agent) ) {
|
||||
if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) {
|
||||
$ver = $matches[1];
|
||||
|
||||
if( is_ajax_browser($agent,$ver,$useragent) )
|
||||
return "ajaxed";
|
||||
else if( is_old_browser($agent,$ver) )
|
||||
return "old";
|
||||
|
||||
return "simple";
|
||||
}
|
||||
}
|
||||
}
|
||||
return "simple";
|
||||
}
|
||||
|
||||
function ping_thread($thread, $isuser) {
|
||||
$link = connect();
|
||||
$query = sprintf(
|
||||
"update chatthread set %s = CURRENT_TIMESTAMP where threadid = %s",
|
||||
$isuser ? "lastpinguser" : "lastpingagent",
|
||||
$thread['threadid']);
|
||||
|
||||
perform_query($query,$link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
function commit_thread($threadid,$params,$link) {
|
||||
$query = "update chatthread set lrevision = ".next_revision($link);
|
||||
foreach( $params as $k => $v ) {
|
||||
$query .= ", ".$k."=".$v;
|
||||
}
|
||||
$query .= " where threadid = ".$threadid;
|
||||
|
||||
perform_query($query,$link);
|
||||
}
|
||||
|
||||
function rename_user($thread, $newname) {
|
||||
global $kind_events;
|
||||
|
||||
$link = connect();
|
||||
commit_thread( $thread['threadid'], array('userName' => "'".mysql_real_escape_string($newname)."'"), $link);
|
||||
mysql_close($link);
|
||||
|
||||
if( $thread['userName'] != $newname ) {
|
||||
post_message($thread['threadid'],$kind_events,
|
||||
getstring2_("chat.status.user.changedname",array($thread['userName'], $newname), $thread['locale']));
|
||||
}
|
||||
}
|
||||
|
||||
function close_thread($thread,$isuser) {
|
||||
global $state_closed, $kind_events;
|
||||
|
||||
if( $thread['istate'] != $state_closed ) {
|
||||
$link = connect();
|
||||
commit_thread( $thread['threadid'], array('istate' => $state_closed), $link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
$message = $isuser ? getstring2_("chat.status.user.left", array($thread['userName']), $thread['locale'])
|
||||
: getstring2_("chat.status.operator.left", array($thread['agentName']), $thread['locale']);
|
||||
post_message($thread['threadid'], $kind_events, $message);
|
||||
}
|
||||
|
||||
function create_thread($username,$remote,$referer,$lang) {
|
||||
$link = connect();
|
||||
|
||||
$query = sprintf(
|
||||
"insert into chatthread (userName,ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ('%s',%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)",
|
||||
mysql_real_escape_string($username),
|
||||
next_token(),
|
||||
mysql_real_escape_string($remote),
|
||||
mysql_real_escape_string($referer),
|
||||
next_revision($link),
|
||||
mysql_real_escape_string($lang) );
|
||||
|
||||
perform_query($query,$link);
|
||||
$id = mysql_insert_id($link);
|
||||
|
||||
$newthread = select_one_row("select * from chatthread where threadid = ". $id, $link );
|
||||
mysql_close($link);
|
||||
return $newthread;
|
||||
}
|
||||
|
||||
function do_take_thread($threadid,$operator) {
|
||||
global $state_chatting;
|
||||
$link = connect();
|
||||
commit_thread( $threadid,
|
||||
array("istate" => $state_chatting,
|
||||
"agentName" => "'".mysql_real_escape_string($operator)."'"), $link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
function reopen_thread($threadid) {
|
||||
global $state_queue,$state_waiting,$state_chatting,$kind_events;
|
||||
$thread = thread_by_id($threadid);
|
||||
|
||||
if( !$thread )
|
||||
return FALSE;
|
||||
|
||||
if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) {
|
||||
$link = connect();
|
||||
commit_thread( $threadid,
|
||||
array("istate" => $state_waiting), $link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
post_message($thread['threadid'], $kind_events, getstring_("chat.status.user.reopenedthread", $thread['locale']));
|
||||
return $thread;
|
||||
}
|
||||
|
||||
function take_thread($thread,$operator) {
|
||||
global $state_queue, $state_waiting,
|
||||
$state_chatting, $kind_events;
|
||||
|
||||
$state = $thread['istate'];
|
||||
$threadid = $thread['threadid'];
|
||||
$message_to_post = "";
|
||||
|
||||
if( $state == $state_queue || $state == $state_waiting) {
|
||||
do_take_thread($threadid, $operator);
|
||||
$message_to_post = getstring2_("chat.status.operator.joined", array($operator), $thread['locale']);
|
||||
} else if( $state == $state_chatting ) {
|
||||
if( $operator != $thread['agentName'] ) {
|
||||
do_take_thread($threadid, $operator);
|
||||
$message_to_post = getstring2_("chat.status.operator.changed", array($operator, $thread['agentName']), $thread['locale']);
|
||||
}
|
||||
} else {
|
||||
die("cannot take thread");
|
||||
}
|
||||
|
||||
if( $message_to_post )
|
||||
post_message($threadid,$kind_events,$message_to_post);
|
||||
}
|
||||
|
||||
function thread_by_id($id) {
|
||||
$link = connect();
|
||||
$thread = select_one_row("select * from chatthread where threadid = ". $id, $link );
|
||||
mysql_close($link);
|
||||
return $thread;
|
||||
}
|
||||
|
||||
?>
|
243
src/webim/libs/common.php
Normal file
243
src/webim/libs/common.php
Normal file
@ -0,0 +1,243 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
session_start();
|
||||
|
||||
require(dirname(__FILE__).'/converter.php');
|
||||
require(dirname(__FILE__).'/config.php');
|
||||
|
||||
$webimroot = "/webim"; # absolute path on server
|
||||
|
||||
function myiconv($in_enc, $out_enc, $string) {
|
||||
global $_utf8win1251, $_win1251utf8;
|
||||
if( function_exists('iconv') ) {
|
||||
$converted = iconv($in_enc, $out_enc, $string);
|
||||
if( $converted !== FALSE )
|
||||
return $converted;
|
||||
}
|
||||
if( $in_enc == "cp1251" && $out_enc == "utf-8" )
|
||||
return strtr($string, $_win1251utf8);
|
||||
if( $in_enc == "utf-8" && $out_enc == "cp1251" )
|
||||
return strtr($string, $_utf8win1251);
|
||||
|
||||
return $string; // do not know how to convert
|
||||
}
|
||||
|
||||
function getrawparam( $name ) {
|
||||
global $webim_encoding, $request_encoding;
|
||||
if( isset($_POST[$name]) )
|
||||
return myiconv($request_encoding,$webim_encoding,$_POST[$name]);
|
||||
die("no ".$name." parameter");
|
||||
}
|
||||
|
||||
function getparam( $name ) {
|
||||
if( isset($_POST[$name]) )
|
||||
return $_POST[$name];
|
||||
die("no ".$name." parameter");
|
||||
}
|
||||
|
||||
function verifyparam( $name, $regexp, $default = null ) {
|
||||
|
||||
if( isset( $_GET[$name] ) ) {
|
||||
$val = $_GET[$name];
|
||||
if( preg_match( $regexp, $val ) )
|
||||
return $val;
|
||||
|
||||
} else if( isset( $_POST[$name] ) ) {
|
||||
$val = $_POST[$name];
|
||||
if( preg_match( $regexp, $val ) )
|
||||
return $val;
|
||||
|
||||
} else {
|
||||
if( isset( $default ) )
|
||||
return $default;
|
||||
}
|
||||
|
||||
echo "<html><head></head><body>Wrong parameter used or absent: ".$name."</body></html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
function debugexit_print( $var ) {
|
||||
echo "<html><body><pre>";
|
||||
print_r( $var );
|
||||
echo "</pre></body></html>";
|
||||
exit;
|
||||
}
|
||||
|
||||
function get_user_locale() {
|
||||
global $available_locales, $default_locale;
|
||||
|
||||
if( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ) {
|
||||
$requested_langs = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
foreach( $requested_langs as $requested_lang) {
|
||||
if( strlen($requested_lang) > 2 )
|
||||
$requested_lang = substr($requested_lang,0,2);
|
||||
|
||||
if( in_array($requested_lang,$available_locales) )
|
||||
return $requested_lang;
|
||||
}
|
||||
}
|
||||
|
||||
if( in_array($default_locale,$available_locales) )
|
||||
return $default_locale;
|
||||
|
||||
return 'en';
|
||||
}
|
||||
|
||||
function get_locale() {
|
||||
global $available_locales;
|
||||
|
||||
$locale = verifyparam("locale", "/^\w\w$/", "");
|
||||
|
||||
if( $locale && in_array($locale,$available_locales) ) {
|
||||
$_SESSION['locale'] = $locale;
|
||||
} else if( isset($_SESSION['locale']) ){
|
||||
$locale = $_SESSION['locale'];
|
||||
}
|
||||
|
||||
if( !$locale || !in_array($locale,$available_locales) )
|
||||
$locale = get_user_locale();
|
||||
return $locale;
|
||||
}
|
||||
|
||||
function set_locale($locale) {
|
||||
global $current_locale, $available_locales;
|
||||
if( in_array($locale,$available_locales) )
|
||||
$current_locale = $locale;
|
||||
}
|
||||
|
||||
$current_locale = get_locale();
|
||||
$messages = array();
|
||||
|
||||
function load_messages($locale) {
|
||||
global $messages;
|
||||
$hash = array();
|
||||
$fp = fopen(dirname(__FILE__)."/../view/properties_$locale","r");
|
||||
while (!feof($fp)) {
|
||||
$line = fgets($fp, 4096);
|
||||
$list = split("=", $line, 2 );
|
||||
if( isset($list[1]) ) {
|
||||
$hash[$list[0]] = str_replace("\\n", "\n",trim($list[1]));
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
$messages[$locale] = $hash;
|
||||
}
|
||||
|
||||
function getstring_($text,$locale) {
|
||||
global $messages;
|
||||
if(!isset($messages[$locale]))
|
||||
load_messages($locale);
|
||||
|
||||
$localized = $messages[$locale];
|
||||
if( isset($localized[$text]) )
|
||||
return $localized[$text];
|
||||
|
||||
return "!".$text;
|
||||
}
|
||||
|
||||
function getstring($text) {
|
||||
global $current_locale;
|
||||
return getstring_($text,$current_locale);
|
||||
}
|
||||
|
||||
function getstring2_($text,$params,$locale) {
|
||||
$string = getstring_($text,$locale);
|
||||
for( $i = 0; $i < count($params); $i++ ) {
|
||||
$string = str_replace("{".$i."}", $params[$i], $string);
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
function getstring2($text,$params) {
|
||||
global $current_locale;
|
||||
return getstring2_($text,$params,$current_locale);
|
||||
}
|
||||
|
||||
function connect() {
|
||||
global $mysqlhost, $mysqllogin, $mysqlpass, $mysqldb, $dbencoding;
|
||||
$link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass )
|
||||
or die('Could not connect: ' . mysql_error());
|
||||
mysql_select_db($mysqldb) or die('Could not select database');
|
||||
mysql_query("SET character set $dbencoding", $link);
|
||||
return $link;
|
||||
}
|
||||
|
||||
function perform_query($query,$link) {
|
||||
mysql_query($query,$link) or die(' Query failed: ' .
|
||||
mysql_error().": ".$query);
|
||||
}
|
||||
|
||||
function select_one_row($query,$link) {
|
||||
$result = mysql_query($query,$link) or die(' Query failed: ' .
|
||||
mysql_error().": ".$query);
|
||||
$line = mysql_fetch_array($result, MYSQL_ASSOC);
|
||||
mysql_free_result($result);
|
||||
return $line;
|
||||
}
|
||||
|
||||
function start_xml_output() {
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Content-type: text/xml");
|
||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
|
||||
}
|
||||
|
||||
function start_html_output() {
|
||||
global $output_charset;
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Content-type: text/html".(isset($output_charset)?"; charset=".$output_charset:""));
|
||||
}
|
||||
|
||||
function escape_with_cdata($text) {
|
||||
return "<![CDATA[" . str_replace("]]>", "]]>]]><![CDATA[",$text) . "]]>";
|
||||
}
|
||||
|
||||
function form_value($key) {
|
||||
global $page;
|
||||
if( isset($page) && isset($page["form$key"]) )
|
||||
return $page["form$key"];
|
||||
return "";
|
||||
}
|
||||
|
||||
function no_field($key) {
|
||||
return getstring2("errors.required",array(getstring($key)));
|
||||
}
|
||||
|
||||
function get_popup($href,$message,$title,$wndName,$options) {
|
||||
return "<a href=\"$href\" target=\"_blank\" ".($title?"title=\"$title\" ":"")."onclick=\"this.newWindow = window.open('$href', '$wndName', '$options');this.newWindow.focus();this.newWindow.opener=window;return false;\">$message</a>";
|
||||
}
|
||||
|
||||
function get_image($href,$width,$height) {
|
||||
if( $width != 0 && $height != 0 )
|
||||
return "<img src=\"$href\" border=\"0\" width=\"$width\" height=\"$height\"/>";
|
||||
return "<img src=\"$href\" border=\"0\"/>";
|
||||
}
|
||||
|
||||
function get_gifimage_size($file) {
|
||||
if( function_exists('gd_info')) {
|
||||
$info = gd_info();
|
||||
if( isset($info['GIF Read Support']) && $info['GIF Read Support'] ) {
|
||||
$img = @imagecreatefromgif($file);
|
||||
if($img) {
|
||||
$height = imagesy($img);
|
||||
$width = imagesx($img);
|
||||
imagedestroy($img);
|
||||
return array($width,$height);
|
||||
}
|
||||
}
|
||||
}
|
||||
return array(0,0);
|
||||
}
|
||||
|
||||
?>
|
42
src/webim/libs/config.php
Normal file
42
src/webim/libs/config.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
/*
|
||||
* MySQL Database parameters
|
||||
*/
|
||||
$mysqlhost = "localhost";
|
||||
$mysqldb = "webim_db";
|
||||
$mysqllogin = "webim_lite";
|
||||
$mysqlpass = "123";
|
||||
|
||||
/*
|
||||
* Localization parameters
|
||||
*/
|
||||
$dbencoding = "cp1251";
|
||||
$webim_encoding = "cp1251";
|
||||
$request_encoding = "utf-8";
|
||||
$output_charset = "cp1251";
|
||||
|
||||
/*
|
||||
* Application parameters
|
||||
*/
|
||||
$webim_from_email = "webim@yourdomain.com"; # email from field
|
||||
|
||||
$available_locales = array("en", "ru");
|
||||
$home_locale = "ru"; # native name will be used in this locale
|
||||
$default_locale = "en"; # if user does not provide known lang
|
||||
|
||||
$online_timeout = 30; # sec
|
||||
|
||||
?>
|
48
src/webim/libs/converter.php
Normal file
48
src/webim/libs/converter.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
$_utf8win1251 = array(
|
||||
"\xD0\x90"=>"\xC0","\xD0\x91"=>"\xC1","\xD0\x92"=>"\xC2","\xD0\x93"=>"\xC3","\xD0\x94"=>"\xC4",
|
||||
"\xD0\x95"=>"\xC5","\xD0\x81"=>"\xA8","\xD0\x96"=>"\xC6","\xD0\x97"=>"\xC7","\xD0\x98"=>"\xC8",
|
||||
"\xD0\x99"=>"\xC9","\xD0\x9A"=>"\xCA","\xD0\x9B"=>"\xCB","\xD0\x9C"=>"\xCC","\xD0\x9D"=>"\xCD",
|
||||
"\xD0\x9E"=>"\xCE","\xD0\x9F"=>"\xCF","\xD0\xA0"=>"\xD0","\xD0\xA1"=>"\xD1","\xD0\xA2"=>"\xD2",
|
||||
"\xD0\xA3"=>"\xD3","\xD0\xA4"=>"\xD4","\xD0\xA5"=>"\xD5","\xD0\xA6"=>"\xD6","\xD0\xA7"=>"\xD7",
|
||||
"\xD0\xA8"=>"\xD8","\xD0\xA9"=>"\xD9","\xD0\xAA"=>"\xDA","\xD0\xAB"=>"\xDB","\xD0\xAC"=>"\xDC",
|
||||
"\xD0\xAD"=>"\xDD","\xD0\xAE"=>"\xDE","\xD0\xAF"=>"\xDF","\xD0\x87"=>"\xAF","\xD0\x86"=>"\xB2",
|
||||
"\xD0\x84"=>"\xAA","\xD0\x8E"=>"\xA1","\xD0\xB0"=>"\xE0","\xD0\xB1"=>"\xE1","\xD0\xB2"=>"\xE2",
|
||||
"\xD0\xB3"=>"\xE3","\xD0\xB4"=>"\xE4","\xD0\xB5"=>"\xE5","\xD1\x91"=>"\xB8","\xD0\xB6"=>"\xE6",
|
||||
"\xD0\xB7"=>"\xE7","\xD0\xB8"=>"\xE8","\xD0\xB9"=>"\xE9","\xD0\xBA"=>"\xEA","\xD0\xBB"=>"\xEB",
|
||||
"\xD0\xBC"=>"\xEC","\xD0\xBD"=>"\xED","\xD0\xBE"=>"\xEE","\xD0\xBF"=>"\xEF","\xD1\x80"=>"\xF0",
|
||||
"\xD1\x81"=>"\xF1","\xD1\x82"=>"\xF2","\xD1\x83"=>"\xF3","\xD1\x84"=>"\xF4","\xD1\x85"=>"\xF5",
|
||||
"\xD1\x86"=>"\xF6","\xD1\x87"=>"\xF7","\xD1\x88"=>"\xF8","\xD1\x89"=>"\xF9","\xD1\x8A"=>"\xFA",
|
||||
"\xD1\x8B"=>"\xFB","\xD1\x8C"=>"\xFC","\xD1\x8D"=>"\xFD","\xD1\x8E"=>"\xFE","\xD1\x8F"=>"\xFF",
|
||||
"\xD1\x96"=>"\xB3","\xD1\x97"=>"\xBF","\xD1\x94"=>"\xBA","\xD1\x9E"=>"\xA2");
|
||||
$_win1251utf8 = array(
|
||||
"\xC0"=>"\xD0\x90","\xC1"=>"\xD0\x91","\xC2"=>"\xD0\x92","\xC3"=>"\xD0\x93","\xC4"=>"\xD0\x94",
|
||||
"\xC5"=>"\xD0\x95","\xA8"=>"\xD0\x81","\xC6"=>"\xD0\x96","\xC7"=>"\xD0\x97","\xC8"=>"\xD0\x98",
|
||||
"\xC9"=>"\xD0\x99","\xCA"=>"\xD0\x9A","\xCB"=>"\xD0\x9B","\xCC"=>"\xD0\x9C","\xCD"=>"\xD0\x9D",
|
||||
"\xCE"=>"\xD0\x9E","\xCF"=>"\xD0\x9F","\xD0"=>"\xD0\xA0","\xD1"=>"\xD0\xA1","\xD2"=>"\xD0\xA2",
|
||||
"\xD3"=>"\xD0\xA3","\xD4"=>"\xD0\xA4","\xD5"=>"\xD0\xA5","\xD6"=>"\xD0\xA6","\xD7"=>"\xD0\xA7",
|
||||
"\xD8"=>"\xD0\xA8","\xD9"=>"\xD0\xA9","\xDA"=>"\xD0\xAA","\xDB"=>"\xD0\xAB","\xDC"=>"\xD0\xAC",
|
||||
"\xDD"=>"\xD0\xAD","\xDE"=>"\xD0\xAE","\xDF"=>"\xD0\xAF","\xAF"=>"\xD0\x87","\xB2"=>"\xD0\x86",
|
||||
"\xAA"=>"\xD0\x84","\xA1"=>"\xD0\x8E","\xE0"=>"\xD0\xB0","\xE1"=>"\xD0\xB1","\xE2"=>"\xD0\xB2",
|
||||
"\xE3"=>"\xD0\xB3","\xE4"=>"\xD0\xB4","\xE5"=>"\xD0\xB5","\xB8"=>"\xD1\x91","\xE6"=>"\xD0\xB6",
|
||||
"\xE7"=>"\xD0\xB7","\xE8"=>"\xD0\xB8","\xE9"=>"\xD0\xB9","\xEA"=>"\xD0\xBA","\xEB"=>"\xD0\xBB",
|
||||
"\xEC"=>"\xD0\xBC","\xED"=>"\xD0\xBD","\xEE"=>"\xD0\xBE","\xEF"=>"\xD0\xBF","\xF0"=>"\xD1\x80",
|
||||
"\xF1"=>"\xD1\x81","\xF2"=>"\xD1\x82","\xF3"=>"\xD1\x83","\xF4"=>"\xD1\x84","\xF5"=>"\xD1\x85",
|
||||
"\xF6"=>"\xD1\x86","\xF7"=>"\xD1\x87","\xF8"=>"\xD1\x88","\xF9"=>"\xD1\x89","\xFA"=>"\xD1\x8A",
|
||||
"\xFB"=>"\xD1\x8B","\xFC"=>"\xD1\x8C","\xFD"=>"\xD1\x8D","\xFE"=>"\xD1\x8E","\xFF"=>"\xD1\x8F",
|
||||
"\xB3"=>"\xD1\x96","\xBF"=>"\xD1\x97","\xBA"=>"\xD1\x94","\xA2"=>"\xD1\x9E");
|
||||
|
||||
?>
|
137
src/webim/libs/operator.php
Normal file
137
src/webim/libs/operator.php
Normal file
@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
function operator_by_login($login) {
|
||||
$link = connect();
|
||||
$operator = select_one_row(
|
||||
"select * from chatoperator where vclogin = '".mysql_real_escape_string($login)."'", $link );
|
||||
mysql_close($link);
|
||||
return $operator;
|
||||
}
|
||||
|
||||
function get_operators() {
|
||||
$link = connect();
|
||||
|
||||
$query = "select * from chatoperator order by vclogin";
|
||||
$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query);
|
||||
|
||||
$operators = array();
|
||||
while ($op = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
$operators[] = $op;
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
mysql_close($link);
|
||||
return $operators;
|
||||
}
|
||||
|
||||
function update_operator($operatorid,$login,$password,$localename,$commonname) {
|
||||
$link = connect();
|
||||
$query = sprintf(
|
||||
"update chatoperator set vclogin = '%s',%s vclocalename = '%s',vccommonname = '%s' where operatorid = %s",
|
||||
mysql_real_escape_string($login),
|
||||
($password ? " vcpassword='".md5($password)."'," : ""),
|
||||
mysql_real_escape_string($localename),
|
||||
mysql_real_escape_string($commonname),
|
||||
$operatorid );
|
||||
|
||||
perform_query($query,$link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
function create_operator($login,$password,$localename,$commonname) {
|
||||
$link = connect();
|
||||
|
||||
$query = sprintf(
|
||||
"insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname) values ('%s','%s','%s','%s')",
|
||||
mysql_real_escape_string($login),
|
||||
md5($password),
|
||||
mysql_real_escape_string($localename),
|
||||
mysql_real_escape_string($commonname) );
|
||||
|
||||
perform_query($query,$link);
|
||||
$id = mysql_insert_id($link);
|
||||
|
||||
$newop = select_one_row("select * from chatoperator where operatorid = $id", $link );
|
||||
mysql_close($link);
|
||||
return $newop;
|
||||
}
|
||||
|
||||
function notify_operator_alive($operatorid) {
|
||||
$link = connect();
|
||||
perform_query("update chatoperator set dtmlastvisited = CURRENT_TIMESTAMP where operatorid = $operatorid",$link);
|
||||
mysql_close($link);
|
||||
}
|
||||
|
||||
function has_online_operators() {
|
||||
global $online_timeout;
|
||||
$link = connect();
|
||||
$row = select_one_row("select min(unix_timestamp(CURRENT_TIMESTAMP)-unix_timestamp(dtmlastvisited)) as time from chatoperator",$link);
|
||||
mysql_close($link);
|
||||
return $row['time'] < $online_timeout;
|
||||
}
|
||||
|
||||
function get_operator_name($operator) {
|
||||
global $home_locale, $current_locale;
|
||||
if( $home_locale == $current_locale )
|
||||
return $operator['vclocalename'];
|
||||
else
|
||||
return $operator['vccommonname'];
|
||||
}
|
||||
|
||||
function generate_button($title,$locale,$inner) {
|
||||
return "<!-- webim button -->".get_popup("/webim/client.php". ($locale?"?locale=".$locale : ""), $inner, $title, "webim", "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=600,height=420,resizable=1" )."<!-- /webim button -->";
|
||||
}
|
||||
|
||||
function check_login() {
|
||||
if( !isset( $_SESSION['operator'] ) ) {
|
||||
if( isset($_COOKIE['webim_lite']) ) {
|
||||
list($login,$pwd) = split(",", $_COOKIE['webim_lite'], 2);
|
||||
$op = operator_by_login($login);
|
||||
if( $op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd ) {
|
||||
$_SESSION['operator'] = $op;
|
||||
return $op;
|
||||
}
|
||||
}
|
||||
$_SESSION['backpath'] = $_SERVER['PHP_SELF'];
|
||||
header("Location: /webim/operator/login.php");
|
||||
exit;
|
||||
}
|
||||
return $_SESSION['operator'];
|
||||
}
|
||||
|
||||
function get_logged_in() {
|
||||
return isset( $_SESSION['operator'] ) ? $_SESSION['operator'] : FALSE;
|
||||
}
|
||||
|
||||
function login_operator($operator,$remember) {
|
||||
$_SESSION['operator'] = $operator;
|
||||
if( $remember ) {
|
||||
$value = $operator['vclogin'].",".md5($operator['vcpassword']);
|
||||
setcookie('webim_lite', $value, time()+60*60*24*1000, "/webim/");
|
||||
|
||||
} else if( isset($_COOKIE['webim_lite']) ) {
|
||||
setcookie('webim_lite', '', time() - 3600, "/webim/");
|
||||
}
|
||||
}
|
||||
|
||||
function logout_operator() {
|
||||
$_SESSION['operator'] = NULL;
|
||||
$_SESSION['backpath'] = NULL;
|
||||
if( isset($_COOKIE['webim_lite']) ) {
|
||||
setcookie('webim_lite', '', time() - 3600, "/webim/");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
50
src/webim/mail.php
Normal file
50
src/webim/mail.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('libs/common.php');
|
||||
require('libs/chat.php');
|
||||
|
||||
$token = verifyparam( "token", "/^\d{1,8}$/");
|
||||
$threadid = verifyparam( "thread", "/^\d{1,8}$/");
|
||||
|
||||
$thread = thread_by_id($threadid);
|
||||
if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) {
|
||||
die("wrong thread");
|
||||
}
|
||||
|
||||
$mail = getparam('email');
|
||||
$page['email'] = $mail;
|
||||
|
||||
// TODO check email
|
||||
|
||||
$history = "";
|
||||
$lastid = -1;
|
||||
$output = get_messages( $threadid, "text", $lastid );
|
||||
foreach( $output as $msg ) {
|
||||
$history .= $msg;
|
||||
}
|
||||
|
||||
$subject = getstring("mail.user.history.subject");
|
||||
$body = getstring2("mail.user.history.body", array($thread['userName'],$history) );
|
||||
|
||||
$headers = 'From: '.$webim_from_email."\r\n" .
|
||||
'Reply-To: '.$webim_from_email."\r\n" .
|
||||
'X-Mailer: PHP/'.phpversion();
|
||||
|
||||
mail($mail,$subject,wordwrap($body,70),$headers);
|
||||
|
||||
start_html_output();
|
||||
require('view/chat_mailsent.php');
|
||||
|
||||
?>
|
55
src/webim/operator/agent.php
Normal file
55
src/webim/operator/agent.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/chat.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$threadid = verifyparam( "thread", "/^\d{1,8}$/");
|
||||
|
||||
if( !isset($_GET['token']) ) {
|
||||
|
||||
if( get_remote_level($_SERVER['HTTP_USER_AGENT']) != "ajaxed" ) {
|
||||
die("old browser is used, please update it");
|
||||
}
|
||||
|
||||
$thread = thread_by_id($threadid);
|
||||
if( !$thread || !isset($thread['ltoken']) ) {
|
||||
die("wrong thread");
|
||||
}
|
||||
|
||||
$operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname'];
|
||||
|
||||
take_thread($thread,$operatorName);
|
||||
|
||||
$token = $thread['ltoken'];
|
||||
header("Location: ".$_SERVER['PHP_SELF']."?thread=$threadid&token=$token");
|
||||
exit;
|
||||
}
|
||||
|
||||
$token = verifyparam( "token", "/^\d{1,8}$/");
|
||||
|
||||
$thread = thread_by_id($threadid);
|
||||
if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) {
|
||||
die("wrong thread");
|
||||
}
|
||||
|
||||
setup_chatview_for_operator($thread);
|
||||
|
||||
start_html_output();
|
||||
require('../view/chat_ajaxed.php');
|
||||
|
||||
?>
|
35
src/webim/operator/getcode.php
Normal file
35
src/webim/operator/getcode.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$lang = verifyparam("lang", "/^\w\w$/", "");
|
||||
if( !$lang || !in_array($lang,$available_locales) )
|
||||
$lang = $current_locale;
|
||||
|
||||
$file = "../images/webim/webim_${lang}_on.gif";
|
||||
$size = get_gifimage_size($file);
|
||||
|
||||
$message = get_image("/webim/button.php?lang=$lang",$size[0],$size[1]);
|
||||
|
||||
$page = array();
|
||||
$page['operator'] = get_operator_name($operator);
|
||||
$page['buttonCode'] = generate_button("",$lang,$message);
|
||||
|
||||
start_html_output();
|
||||
require('../view/gen_button.php');
|
||||
?>
|
24
src/webim/operator/index.php
Normal file
24
src/webim/operator/index.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$page = array( 'operator' => get_operator_name($operator) );
|
||||
|
||||
start_html_output();
|
||||
require('../view/menu.php');
|
||||
?>
|
42
src/webim/operator/login.php
Normal file
42
src/webim/operator/login.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$errors = array();
|
||||
if( isset($_POST['login']) && isset($_POST['password']) ) {
|
||||
$login = getparam('login');
|
||||
$password = getparam('password');
|
||||
$remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on";
|
||||
|
||||
$operator = operator_by_login( $login );
|
||||
if( $operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) ) {
|
||||
|
||||
$target = isset($_SESSION['backpath'])
|
||||
? $_SESSION['backpath']
|
||||
: dirname($_SERVER['PHP_SELF'])."/index.php";
|
||||
|
||||
login_operator($operator,$remember);
|
||||
header("Location: $target");
|
||||
exit;
|
||||
} else {
|
||||
$errors[] = getstring("page_login.error");
|
||||
}
|
||||
}
|
||||
|
||||
$page = array( 'backPath' => '' );
|
||||
start_html_output();
|
||||
require('../view/login.php');
|
||||
?>
|
24
src/webim/operator/logout.php
Normal file
24
src/webim/operator/logout.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
logout_operator();
|
||||
|
||||
$target = dirname($_SERVER['PHP_SELF'])."/login.php";
|
||||
header("Location: $target");
|
||||
exit;
|
||||
|
||||
?>
|
85
src/webim/operator/operator.php
Normal file
85
src/webim/operator/operator.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$page = array('agentId' => '');
|
||||
$errors = array();
|
||||
|
||||
if( isset($_POST['login']) && isset($_POST['password']) ) {
|
||||
$agentId = verifyparam( "agentId", "/^(\d{1,9})?$/", "");
|
||||
$login = getparam('login');
|
||||
$password = getparam('password');
|
||||
$passwordConfirm = getparam('passwordConfirm');
|
||||
$name = getparam('name');
|
||||
$commonname = getparam('commonname');
|
||||
|
||||
if( !$name )
|
||||
$errors[] = no_field("form.field.agent_name");
|
||||
|
||||
if( !$commonname )
|
||||
$errors[] = no_field("form.field.agent_commonname");
|
||||
|
||||
if( !$login )
|
||||
$errors[] = no_field("form.field.login");
|
||||
|
||||
if( !$agentId && !$password )
|
||||
$errors[] = no_field("form.field.password");
|
||||
|
||||
if( $password != $passwordConfirm )
|
||||
$errors[] = getstring("my_settings.error.password_match");
|
||||
|
||||
$login_operator = operator_by_login($login);
|
||||
if( (!$agentId && $login_operator) ||
|
||||
( $agentId && $login_operator && $agentId != $login_operator['operatorid']) )
|
||||
$errors[] = getstring("page_agent.error.duplicate_login");
|
||||
|
||||
if( count($errors) == 0 ) {
|
||||
if( $agentId ) {
|
||||
update_operator($agentId,$login,$password,$name,$commonname);
|
||||
} else {
|
||||
create_operator($login,$password,$name,$commonname);
|
||||
}
|
||||
header("Location: ".dirname($_SERVER['PHP_SELF'])."/operators.php");
|
||||
exit;
|
||||
} else {
|
||||
$page['formlogin'] = $login;
|
||||
$page['formname'] = $name;
|
||||
$page['formcommonname'] = $commonname;
|
||||
$page['agentId'] = $agentId;
|
||||
}
|
||||
|
||||
} else if( isset($_GET['op']) ) {
|
||||
$login = verifyparam( 'op', "/^[\w_]+$/");
|
||||
$op = operator_by_login( $login );
|
||||
|
||||
if( !$op ) {
|
||||
$errors[] = getstring("no_such_operator");
|
||||
$page['formlogin'] = $login;
|
||||
} else {
|
||||
$page['formlogin'] = $op['vclogin'];
|
||||
$page['formname'] = $op['vclocalename'];
|
||||
$page['formcommonname'] = $op['vccommonname'];
|
||||
$page['agentId'] = $op['operatorid'];
|
||||
}
|
||||
}
|
||||
|
||||
$page['operator'] = get_operator_name($operator);
|
||||
|
||||
start_html_output();
|
||||
require('../view/agent.php');
|
||||
?>
|
26
src/webim/operator/operators.php
Normal file
26
src/webim/operator/operators.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$page = array();
|
||||
$page['allowedAgents'] = get_operators();
|
||||
$page['operator'] = get_operator_name($operator);
|
||||
|
||||
start_html_output();
|
||||
require('../view/agents.php');
|
||||
?>
|
93
src/webim/operator/update.php
Normal file
93
src/webim/operator/update.php
Normal file
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/chat.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = get_logged_in();
|
||||
if( !$operator ) {
|
||||
start_xml_output();
|
||||
echo "<error><descr>".myiconv($webim_encoding,"utf-8",escape_with_cdata(getstring("agent.not_logged_in")))."</descr></error>";
|
||||
exit;
|
||||
}
|
||||
|
||||
$threadstate_to_string = array(
|
||||
$state_queue => "wait",
|
||||
$state_waiting => "prio",
|
||||
$state_chatting => "chat",
|
||||
$state_closed => "closed"
|
||||
);
|
||||
|
||||
$threadstate_key = array(
|
||||
$state_queue => "chat.thread.state_wait",
|
||||
$state_waiting => "chat.thread.state_wait_for_another_agent",
|
||||
$state_chatting => "chat.thread.state_chatting_with_agent",
|
||||
$state_closed => "chat.thread.state_closed"
|
||||
);
|
||||
|
||||
function thread_to_xml($thread) {
|
||||
global $threadstate_to_string, $threadstate_key;
|
||||
$state = $threadstate_to_string[$thread['istate']];
|
||||
$result = "<thread id=\"".$thread['threadid']."\" stateid=\"$state\"";
|
||||
if( $state == "closed" )
|
||||
return $result."/>";
|
||||
|
||||
$state = getstring($threadstate_key[$thread['istate']]);
|
||||
$result .= " canopen=\"true\" state=\"$state\">";
|
||||
$result .= "<name>".htmlspecialchars($thread['userName'])."</name>";
|
||||
$result .= "<addr>".htmlspecialchars($thread['remote'])."</addr>";
|
||||
$result .= "<agent>".htmlspecialchars($thread['agentName'] ? $thread['agentName'] : "-")."</agent>";
|
||||
$result .= "<time>".$thread['unix_timestamp(dtmcreated)']."000</time>";
|
||||
$result .= "<modified>".$thread['unix_timestamp(dtmmodified)']."000</modified>";
|
||||
$result .= "</thread>";
|
||||
return $result;
|
||||
}
|
||||
|
||||
function print_pending_threads($since) {
|
||||
global $webim_encoding;
|
||||
$link = connect();
|
||||
|
||||
$revision = $since;
|
||||
$output = array();
|
||||
$query = "select threadid, userName, agentName, unix_timestamp(dtmcreated), unix_timestamp(dtmmodified), lrevision, istate, remote from chatthread where lrevision > $since ORDER BY threadid";
|
||||
$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query);
|
||||
|
||||
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
$thread = thread_to_xml($row);
|
||||
$output[] = $thread;
|
||||
if( $row['lrevision'] > $revision )
|
||||
$revision = $row['lrevision'];
|
||||
}
|
||||
|
||||
mysql_free_result($result);
|
||||
mysql_close($link);
|
||||
|
||||
start_xml_output();
|
||||
echo "<threads revision=\"$revision\" time=\"".time()."000\">";
|
||||
foreach( $output as $thr ) {
|
||||
print myiconv($webim_encoding,"utf-8",$thr);
|
||||
}
|
||||
echo "</threads>";
|
||||
}
|
||||
|
||||
////////
|
||||
|
||||
$since = verifyparam( "since", "/^\d{1,9}$/", 0);
|
||||
|
||||
print_pending_threads($since);
|
||||
notify_operator_alive($operator['operatorid']);
|
||||
exit;
|
||||
|
||||
?>
|
26
src/webim/operator/users.php
Normal file
26
src/webim/operator/users.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('../libs/common.php');
|
||||
require('../libs/operator.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
notify_operator_alive($operator['operatorid']);
|
||||
|
||||
$page = array( 'operator' => get_operator_name($operator) );
|
||||
|
||||
start_html_output();
|
||||
require('../view/pending_users.php');
|
||||
?>
|
74
src/webim/thread.php
Normal file
74
src/webim/thread.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
|
||||
require('libs/common.php');
|
||||
require('libs/chat.php');
|
||||
|
||||
$act = verifyparam( "act", "/^(refresh|post|rename|close|ping)$/");
|
||||
$token = verifyparam( "token", "/^\d{1,9}$/");
|
||||
$threadid = verifyparam( "thread", "/^\d{1,9}$/");
|
||||
$isuser = verifyparam( "user", "/^true$/", "false") == 'true';
|
||||
$outformat = (verifyparam( "html", "/^on$/", "off") == 'on') ? "html" : "xml";
|
||||
|
||||
$thread = thread_by_id($threadid);
|
||||
if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) {
|
||||
die("wrong thread");
|
||||
}
|
||||
|
||||
if( $act == "refresh" ) {
|
||||
$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1);
|
||||
ping_thread($thread, $isuser);
|
||||
print_thread_mesages($threadid, $token, $lastid, $isuser,$outformat);
|
||||
exit;
|
||||
|
||||
} else if( $act == "post" ) {
|
||||
$lastid = verifyparam( "lastid", "/^\d{1,9}$/", -1);
|
||||
$message = getrawparam('message');
|
||||
|
||||
$kind = $isuser ? $kind_user : $kind_agent;
|
||||
$from = $isuser ? $thread['userName'] : $thread['agentName'];
|
||||
|
||||
post_message($threadid,$kind,$message,$from);
|
||||
ping_thread($thread, $isuser);
|
||||
print_thread_mesages($threadid, $token, $lastid, $isuser, $outformat);
|
||||
exit;
|
||||
|
||||
} else if( $act == "rename" ) {
|
||||
$newname = getrawparam('name');
|
||||
|
||||
ping_thread($thread, $isuser);
|
||||
rename_user($thread, $newname);
|
||||
setcookie($namecookie, $newname, time()+60*60*24*365);
|
||||
start_xml_output();
|
||||
echo "<changedname></changedname>";
|
||||
exit;
|
||||
|
||||
} else if( $act == "ping" ) {
|
||||
|
||||
ping_thread($thread, $isuser);
|
||||
start_xml_output();
|
||||
echo "<ping></ping>";
|
||||
exit;
|
||||
|
||||
} else if( $act == "close" ) {
|
||||
|
||||
ping_thread($thread, $isuser);
|
||||
close_thread($thread, $isuser);
|
||||
start_xml_output();
|
||||
echo "<closed></closed>";
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
?>
|
1
src/webim/view/.htaccess
Normal file
1
src/webim/view/.htaccess
Normal file
@ -0,0 +1 @@
|
||||
Deny from all
|
144
src/webim/view/agent.php
Normal file
144
src/webim/view/agent.php
Normal file
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("page_agent.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">
|
||||
<h1><?php echo getstring("page_agent.title") ?></h1>
|
||||
</td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/operators.php" title="<?php echo getstring("menu.agents") ?>"><?php echo getstring("menu.agents") ?></a></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table>
|
||||
|
||||
|
||||
<?php if( $page['agentId'] ) { ?>
|
||||
<?php echo getstring("page_agent.intro") ?>
|
||||
<?php } ?>
|
||||
<?php if( !$page['agentId'] ) { ?>
|
||||
<?php echo getstring("page_agent.create_new") ?>
|
||||
<?php } ?>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if( isset($errors) && count($errors) > 0 ) { ?>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td>
|
||||
<td width="10"></td>
|
||||
<td class="text">
|
||||
<?php if( isset($errors) && count($errors) > 0 ) {
|
||||
print getstring("errors.header");
|
||||
foreach( $errors as $e ) {
|
||||
print getstring("errors.prefix");
|
||||
print $e;
|
||||
print getstring("errors.suffix");
|
||||
}
|
||||
print getstring("errors.footer");
|
||||
} ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<form name="agentForm" method="post" action="/webim/operator/operator.php">
|
||||
<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'>
|
||||
<tr><td class='formauth'><?php echo getstring('form.field.login') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
|
||||
<input type="text" name="login" size="40" value="<?php echo form_value('login') ?>" class="formauth"/>
|
||||
</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.login.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
|
||||
|
||||
<tr><td class='formauth'><?php echo getstring('form.field.password') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
|
||||
<input type="password" name="password" size="40" value="" class="formauth"/>
|
||||
</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.password.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
|
||||
|
||||
<tr><td class='formauth'><?php echo getstring('form.field.password_confirm') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
|
||||
<input type="password" name="passwordConfirm" size="40" value="" class="formauth"/>
|
||||
</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.password_confirm.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
|
||||
|
||||
<tr><td class='formauth'><?php echo getstring('form.field.agent_name') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
|
||||
<input type="text" name="name" size="40" value="<?php echo form_value('name') ?>" class="formauth"/>
|
||||
</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.agent_name.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
|
||||
|
||||
<tr><td class='formauth'><?php echo getstring('form.field.agent_commonname') ?><b><font class='red'>*</font></b></td><td width='10'><img width='10' height='1' border='0' alt='' src='/webim/images/free.gif'></td><td></td></tr><tr><td height='2' colspan='3'></td></tr><tr><td>
|
||||
<input type="text" name="commonname" size="40" value="<?php echo form_value('commonname') ?>" class="formauth"/>
|
||||
</td><td></td><td class='formauth'><span class='formdescr'> — <?php echo getstring('form.field.agent_commonname.description') ?></span></td></tr><tr><td colspan='3' height='10'></td></tr>
|
||||
|
||||
<tr><td colspan='3' height='20'></td></tr><tr><td colspan='3' background='/webim/images/formline.gif'><img src='/webim/images/formline.gif' width='1' height='2' border='0' alt=''></td></tr><tr><td colspan='3' height='10'></td></tr>
|
||||
<tr>
|
||||
<td class="formauth"><input type="hidden" name="agentId" value="<?php echo $page['agentId'] ?>"/>
|
||||
<input type="image" name="" src='<?php echo getstring("image.button.save") ?>' border="0" alt='<?php echo getstring("button.save") ?>'/>
|
||||
</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"></td>
|
||||
<td class="formauth"><span class="formdescr"><?php echo getstring("common.asterisk_explanation") ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
122
src/webim/view/agents.php
Normal file
122
src/webim/view/agents.php
Normal file
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("page_agents.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">
|
||||
<h1><?php echo getstring("page_agents.title") ?></h1>
|
||||
</td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table>
|
||||
|
||||
|
||||
<?php echo getstring("page_agents.intro") ?>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="text"><b><?php echo getstring("page_agents.agents") ?></b></td>
|
||||
<td align="right">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src='/webim/images/buttons/createagent.gif' border="0" altKey="page_agents.new_agent" /></td>
|
||||
<td width="10"></td>
|
||||
<td class="text">
|
||||
<a href='/webim/operator/operator.php' title="<?php echo getstring("page_agents.new_agent") ?>">
|
||||
<?php echo getstring("page_agents.new_agent") ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="15"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.login") ?></span></td><td width='3'></td>
|
||||
<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_name") ?></span></td><td width='3'></td>
|
||||
<td class='table' bgcolor='#276db8' height='30'><span class='header'><?php echo getstring("page_agents.agent_commonname") ?></span></td>
|
||||
</tr>
|
||||
<?php foreach( $page['allowedAgents'] as $a ) { ?>
|
||||
<tr>
|
||||
<td height='45' class='table'>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src='/webim/images/tbliclogin.gif' width="10" height="15" border="0" alt="" /></td>
|
||||
<td class="table">
|
||||
<a href='/webim/operator/operator.php?op=<?php echo $a['vclogin'] ?>'>
|
||||
<?php echo htmlspecialchars($a['vclogin']) ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td>
|
||||
<td height='45' class='table'>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td>
|
||||
<td class="table"><?php echo htmlspecialchars($a['vclocalename']) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td><td background='/webim/images/tablediv3.gif'><img width='3' height='1' border='0' alt='' src='/webim/images/free.gif'></td>
|
||||
<td height='45' class='table'>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src='/webim/images/tbllabyel.gif' width="5" height="5" border="0" alt="" /></td>
|
||||
<td class="table"><?php echo htmlspecialchars($a['vccommonname']) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td height='2' colspan='7'></td></tr><tr><td bgcolor='#e1e1e1' colspan='7'><img width='1' height='1' border='0' alt='' src='/webim/images/free.gif'></td></tr><tr><td height='2' colspan='7'></td></tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
250
src/webim/view/chat_ajaxed.php
Normal file
250
src/webim/view/chat_ajaxed.php
Normal file
@ -0,0 +1,250 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo getstring("chat.window.title.agent") ?></title>
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">
|
||||
<link rel="stylesheet" type="text/css" href="/webim/chat.css" />
|
||||
<script type="text/javascript" language="javascript" src="/webim/js/common.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script>
|
||||
<script language="javascript"><!--
|
||||
var threadParams = { servl:"/webim/thread.php",frequency:2,<?php if( $page['user'] ) { ?>user:"true",<?php } ?>threadid:<?php echo $page['ct.chatThreadId'] ?>,token:<?php echo $page['ct.token'] ?> };
|
||||
//--></script>
|
||||
<script type="text/javascript" language="javascript" src="/webim/js/page_chat.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn">
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="50%" valign="top">
|
||||
<table width="135" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="25"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><?php if( $page['ct.company.chatLogoURL'] ) { ?><img src="<?php echo $page['ct.company.chatLogoURL'] ?>" width="85" height="45" border="0" alt=""><?php } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="50%" align="right" valign="top">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="25" align="right">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="text"><?php echo getstring("chat.window.product_name") ?></td>
|
||||
<td width="5"></td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="95" height="13" bgcolor="#D09221" align="center" class="www"><a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("site.title") ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="5"></td>
|
||||
<td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"><img src='/webim/images/buttons/closewin.gif' width="15" height="15" border="0" altKey="chat.window.close_link_text"/></a></td>
|
||||
<td width="5"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="60" align="right">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<?php if( $page['agent'] ) { ?>
|
||||
<td class="text" nowrap>
|
||||
<?php echo getstring("chat.window.chatting_with") ?> <b><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.chatting_with") ?> <?php echo $page['ct.user.name'] ?>"><?php echo $page['ct.user.name'] ?></a></b><br>
|
||||
</td>
|
||||
<?php } ?><?php if( $page['user'] ) { ?>
|
||||
<td class="text" nowrap>
|
||||
<div id="changename1" style="display:<?php echo $page['displ1'] ?>;">
|
||||
<table cellspacing="0" cellpadding="0" border="0"><tr>
|
||||
<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td>
|
||||
<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td>
|
||||
<td><input id="uname" type="text" size="12" value="<?php echo $page['ct.user.name'] ?>" class="username"></td>
|
||||
<td width="5" valign="top"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td>
|
||||
<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/exec.gif' width="25" height="25" border="0" alt=">>" /></a></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div id="changename2" style="display:<?php echo $page['displ2'] ?>;">
|
||||
<table cellspacing="0" cellpadding="0" border="0"><tr>
|
||||
<td class="text" nowrap><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><?php echo getstring("chat.client.changename") ?></a></td>
|
||||
<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td>
|
||||
<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="" /></a></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php if( $page['agent'] ) { ?>
|
||||
<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td>
|
||||
<td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>">
|
||||
<img src='/webim/images/buttons/close.gif' width="25" height="25" border="0" altKey="chat.window.close_link_text"/></a></td>
|
||||
<?php } ?>
|
||||
<!--
|
||||
<td><img src='/webim/images/buttons/changeuser.gif' width="25" height="25" border="0" alt="Change User" /></td>
|
||||
-->
|
||||
|
||||
<td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td>
|
||||
<?php if( $page['user'] ) { ?>
|
||||
<td><a href="<?php echo $page['selfLink'] ?>&page=mailthread" target="_blank" title="<?php echo getstring("chat.window.toolbar.mail_history") ?>" onclick="this.newWindow = window.open('<?php echo $page['selfLink'] ?>&page=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src='/webim/images/buttons/email.gif' width="25" height="25" border="0" alt="Mail "/></a></td>
|
||||
<?php } ?>
|
||||
<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>">
|
||||
<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh " /></a></td>
|
||||
|
||||
<td width="20" valign="top"><img src='/webim/images/free.gif' width="20" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td valign="top">
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="" /></td>
|
||||
<td colspan="2" width="100%" height="100%" valign="top" id="chatwndtd">
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="100%" height="100%" bgcolor="#FFFFFF" valign="top">
|
||||
<iframe id="chatwnd" width="100%" height="100%" src="" frameborder="0" style="overflow:auto;">
|
||||
Sorry, your browser does not support iframes; try a browser that supports W3 standards.
|
||||
</iframe>
|
||||
</td>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if( $page['canpost'] ) { ?>
|
||||
<tr>
|
||||
<td colspan="3" height="5" style="cursor:n-resize;" id="spl1"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="20" valign="top"><img src='<?php echo getstring("image.chat.message") ?>' width="20" height="85" border="0" alt="" /></td>
|
||||
<td width="100%" height="100" valign="top" id="msgwndtd">
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="100%" height="100%" bgcolor="#FFFFFF" valign="top">
|
||||
<textarea id="msgwnd" class="message" tabindex="0"></textarea>
|
||||
</td>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="center" id="avatarwnd"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="45"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="33%">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="20"></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="33%" align="center" class="copyr"><?php echo getstring("chat.window.poweredby") ?> <a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("chat.window.poweredreftext") ?></a></td>
|
||||
<td width="33%" align="right">
|
||||
|
||||
<?php if( $page['canpost'] ) { ?>
|
||||
<table cellspacing="0" cellpadding="0" border="0" id="postmessage">
|
||||
|
||||
<tr>
|
||||
<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td>
|
||||
<td background="/webim/images/submitbg.gif" valign="top" class="submit">
|
||||
<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br>
|
||||
<a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><?php echo getstring("chat.window.send_message_short") ?></a><br>
|
||||
</td>
|
||||
<td width="10"><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td>
|
||||
<td width="100%"><img src='/webim/images/free.gif' width="585" height="1" border="0" alt="" /></td>
|
||||
<td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
108
src/webim/view/chat_error.php
Normal file
108
src/webim/view/chat_error.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo getstring("chat.error_page.title") ?></title>
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" href="/webim/chat.css" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="75"></td>
|
||||
<td class="window">
|
||||
<h1><?php echo getstring("chat.error_page.head") ?></h1>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="100%"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr>
|
||||
<td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy">
|
||||
|
||||
<?php if( isset($errors) && count($errors) > 0 ) {
|
||||
print getstring("errors.header");
|
||||
foreach( $errors as $e ) {
|
||||
print getstring("errors.prefix");
|
||||
print $e;
|
||||
print getstring("errors.suffix");
|
||||
}
|
||||
print getstring("errors.footer");
|
||||
} ?>
|
||||
|
||||
|
||||
</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="70"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="100%" align="right">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:window.close();" title="<?php echo getstring("chat.error_page.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
|
||||
<td width="5"></td>
|
||||
<td class="button"><a href="javascript:window.close();" title="<?php echo getstring("chat.error_page.close") ?>"><?php echo getstring("chat.error_page.close") ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
<td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
108
src/webim/view/chat_mailsent.php
Normal file
108
src/webim/view/chat_mailsent.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo getstring("chat.window.title.user") ?></title>
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" href="/webim/chat.css" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="75"></td>
|
||||
<td class="window">
|
||||
<h1><?php echo getstring("chat.mailthread.sent.title") ?></h1>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="100%"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy">
|
||||
|
||||
<?php echo getstring2("chat.mailthread.sent.content",array($page['email'])) ?><br/>
|
||||
<a href="javascript:window.close();"><?php echo getstring("chat.mailthread.sent.closewindow") ?></a>
|
||||
|
||||
</td>
|
||||
<td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="70"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="100%" align="right">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:window.close();" title="<?php echo getstring("chat.mailthread.sent.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
|
||||
<td width="5"></td>
|
||||
<td class="button"><a href="javascript:window.close();" title="<?php echo getstring("chat.mailthread.sent.close") ?>"><?php echo getstring("chat.mailthread.sent.close") ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
<td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
132
src/webim/view/chat_mailthread.php
Normal file
132
src/webim/view/chat_mailthread.php
Normal file
@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo getstring("chat.window.title.user") ?></title>
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" href="/webim/chat.css" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<form name="mailThreadForm" method="post" action="/webim/mail.php">
|
||||
<input type="hidden" name="thread" value="<?php echo $page['ct.chatThreadId'] ?>"/><input type="hidden" name="token" value="<?php echo $page['ct.token'] ?>"/><input type="hidden" name="level" value="<?php echo $page['level'] ?>"/>
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="75"></td>
|
||||
<td class="window">
|
||||
<h1><?php echo getstring("mailthread.title") ?></h1>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="60"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="text"><?php echo getstring("mailthread.enter_email") ?></td>
|
||||
<td width="10"></td>
|
||||
<td><input type="text" name="email" size="20" value="<?php echo form_value('email') ?>" class="username"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="70"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="50%">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" alt="" /></a></td>
|
||||
<td background="/webim/images/submitbg.gif" valign="top" class="submit">
|
||||
<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br>
|
||||
<a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><?php echo getstring("mailthread.perform") ?></a><br>
|
||||
</td>
|
||||
<td width="10"><a href="javascript:document.mailThreadForm.submit();" title="<?php echo getstring("mailthread.perform") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" alt="" /></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="50%" align="right">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
|
||||
<td width="5"></td>
|
||||
<td class="button"><a href="javascript:window.close();" title="<?php echo getstring("mailthread.close") ?>"><?php echo getstring("mailthread.close") ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
<td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
99
src/webim/view/chat_oldbrowser.php
Normal file
99
src/webim/view/chat_oldbrowser.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo getstring("page.chat.old_browser.title") ?></title>
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" href="/webim/chat.css" />
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="20"></td>
|
||||
<td class="window">
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="100%"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"><tr>
|
||||
<td width="15"><img src='/webim/images/wincrnlt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td width="100%" background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="15"><img src='/webim/images/wincrnrt.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr><tr><td height="100%" bgcolor="#FED840"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy">
|
||||
|
||||
<?php echo getstring("page.chat.old_browser.content") ?>
|
||||
|
||||
</td><td bgcolor="#E8A400"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr><tr><td><img src='/webim/images/wincrnlb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td background="/webim/images/winbg.gif" class="bgcy"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td><img src='/webim/images/wincrnrb.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="70"></td>
|
||||
<td>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="100%" align="right">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><a href="javascript:window.close();" title="<?php echo getstring("page.chat.old_browser.close") ?>"><img src='/webim/images/buttons/back.gif' width="25" height="25" border="0" alt="" /></a></td>
|
||||
<td width="5"></td>
|
||||
<td class="button"><a href="javascript:window.close();" title="<?php echo getstring("page.chat.old_browser.close") ?>"><?php echo getstring("page.chat.old_browser.close") ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
<td width="100%"><img src='/webim/images/free.gif' width="540" height="1" border="0" alt="" /></td>
|
||||
<td width="30"><img src='/webim/images/free.gif' width="30" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
239
src/webim/view/chat_simple.php
Normal file
239
src/webim/view/chat_simple.php
Normal file
@ -0,0 +1,239 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo getstring("chat.window.title.user") ?></title>
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1251">
|
||||
<link rel="stylesheet" type="text/css" href="/webim/chat.css" />
|
||||
<script type="text/javascript" language="javascript" src="/webim/js/brws.js"></script>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" background="/webim/images/bg.gif" text="#000000" link="#C28400" vlink="#C28400" alink="#C28400" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
|
||||
|
||||
<table width="600" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
|
||||
<table width="600" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2" height="100" background="/webim/images/banner.gif" valign="top" class="bgrn">
|
||||
<table width="590" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="135" valign="top">
|
||||
<table width="135" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="25"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><?php if( $page['ct.company.chatLogoURL'] ) { ?><img src="<?php echo $page['ct.company.chatLogoURL'] ?>" width="85" height="45" border="0" alt="<?php echo $page['ct.company.name'] ?>"><?php } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" class="text"><?php echo $page['ct.company.name'] ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="455" align="right" valign="top">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td height="25" align="right">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="text"><?php echo getstring("chat.window.product_name") ?></td>
|
||||
<td width="5"></td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="95" height="13" bgcolor="#D09221" align="center" class="www"><a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("site.title") ?></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="5"></td>
|
||||
<td><a class="closethread" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.close_title") ?>"><img src='/webim/images/buttons/closewin.gif' width="15" height="15" border="0" altKey="chat.window.close_title"/></a></td>
|
||||
<td width="5"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="60" align="right">
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
|
||||
<td class="text" nowrap><?php echo getstring("chat.client.name") ?></td>
|
||||
<td width="10" valign="top"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td>
|
||||
<td><input id="uname" type="text" size="12" value="<?php echo $page['ct.user.name'] ?>" class="username"></td>
|
||||
<td width="5" valign="top"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td>
|
||||
<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.client.changename") ?>"><img src='/webim/images/buttons/exec.gif' width="25" height="25" border="0" alt=">>" /></a></td>
|
||||
|
||||
<td><img src='/webim/images/buttondiv.gif' width="35" height="45" border="0" alt="" /></td>
|
||||
|
||||
<td><a href="<?php echo $page['selfLink'] ?>&page=mailthread" target="_blank" title="<?php echo getstring("chat.window.toolbar.mail_history") ?>" onclick="this.newWindow = window.open('<?php echo $page['selfLink'] ?>&page=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src='/webim/images/buttons/email.gif' width="25" height="25" border="0" alt="Mail" /></a></td>
|
||||
|
||||
<td><a id="refresh" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.toolbar.refresh") ?>">
|
||||
<img src='/webim/images/buttons/refresh.gif' width="25" height="25" border="0" alt="Refresh" /></a></td>
|
||||
|
||||
|
||||
|
||||
<td width="20"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td valign="top">
|
||||
|
||||
<table width="585" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="20" valign="top"><img src='<?php echo getstring("image.chat.history") ?>' width="20" height="80" border="0" alt="History" /></td>
|
||||
<td width="565" valign="top" id="chatwndtd">
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="100%" bgcolor="#FFFFFF" valign="top">
|
||||
<iframe name="chatwndiframe" width="100%" height="175" src="/webim/thread.php?act=refresh&thread=<?php echo $page['ct.chatThreadId'] ?>&token=<?php echo $page['ct.token'] ?>&html=on&user=true" frameborder="0" style="overflow:auto;">
|
||||
Sorry, your browser does not support iframes; try a browser that supports W3 standards.
|
||||
</iframe>
|
||||
</td>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" height="5"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="20" valign="top"><img src='<?php echo getstring("image.chat.message") ?>' width="20" height="85" border="0" alt="Message" /></td>
|
||||
<td width="565" valign="top">
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="565" height="85" bgcolor="#FFFFFF" valign="top">
|
||||
<form id="messageform" method="post" action="/webim/thread.php" target="chatwndiframe" width="565" height="85">
|
||||
<input type="hidden" name="act" value="post"/><input type="hidden" name="html" value="on"/><input type="hidden" name="thread" value="<?php echo $page['ct.chatThreadId'] ?>"/><input type="hidden" name="token" value="<?php echo $page['ct.token'] ?>"/><input type="hidden" name="user" value="true"/>
|
||||
<input type="hidden" id="message" name="message" value=""/>
|
||||
<textarea id="messagetext" cols="50" rows="4" class="message" style="width:550px;" tabindex="0"></textarea>
|
||||
</form>
|
||||
</td>
|
||||
<td bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" bgcolor="#A1A1A1"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="45"></td>
|
||||
<td>
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="33%">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="20"></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="33%" align="center" class="copyr"><?php echo getstring("chat.window.poweredby") ?> <a href="<?php echo getstring("site.url") ?>" title="<?php echo getstring("company.title") ?>" target="_blank"><?php echo getstring("chat.window.poweredreftext") ?></a></td>
|
||||
<td width="33%" align="right">
|
||||
<table cellspacing="0" cellpadding="0" border="0" id="postmessage">
|
||||
|
||||
<tr>
|
||||
<td><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submit.gif' width="40" height="35" border="0" altKey="chat.window.send_message_short"/></a></td>
|
||||
<td background="/webim/images/submitbg.gif" valign="top" class="submit">
|
||||
<img src='/webim/images/free.gif' width="1" height="10" border="0" alt="" /><br>
|
||||
<a id="msgsend1" href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><?php echo getstring("chat.window.send_message_short") ?></a><br>
|
||||
</td>
|
||||
<td width="10"><a href="javascript:void(0)" onclick="return false;" title="<?php echo getstring("chat.window.send_message") ?>"><img src='/webim/images/submitrest.gif' width="10" height="35" border="0" altKey="chat.window.send_message_short"/></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="10"><img src='/webim/images/free.gif' width="10" height="1" border="0" alt="" /></td>
|
||||
<td width="585"><img src='/webim/images/free.gif' width="585" height="1" border="0" alt="" /></td>
|
||||
<td width="5"><img src='/webim/images/free.gif' width="5" height="1" border="0" alt="" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
function sendmessage(){
|
||||
getEl('message').value = getEl('messagetext').value;
|
||||
getEl('messagetext').value = '';
|
||||
getEl('messageform').submit();
|
||||
}
|
||||
getEl('messagetext').onkeydown = function(k) {
|
||||
if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey; }
|
||||
if( (k==13 && ctrl) || (k==10) ) {
|
||||
sendmessage();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
getEl('msgsend1').onclick = function() {
|
||||
sendmessage();
|
||||
return false;
|
||||
}
|
||||
//--></script>
|
||||
|
||||
</body>
|
||||
</html>
|
97
src/webim/view/gen_button.php
Normal file
97
src/webim/view/gen_button.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("page.gen_button.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">
|
||||
<h1><?php echo getstring("page.gen_button.title") ?></h1>
|
||||
</td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table>
|
||||
|
||||
|
||||
<?php echo getstring("page.gen_button.intro") ?>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<a href="/webim/operator/getcode.php?lang=en"><?php echo getstring("get_button_en") ?></a><br/>
|
||||
<a href="/webim/operator/getcode.php?lang=ru"><?php echo getstring("get_button_ru") ?></a><br/>
|
||||
<br/>
|
||||
|
||||
<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'>
|
||||
<tr>
|
||||
<td class="formauth"><?php echo getstring("page.gen_button.code") ?></td>
|
||||
<td width="10"><img src="/webim/images/free.gif" width="10" height="1" border="0" alt=""></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><textarea cols="60" rows="15"><?php echo $page['buttonCode'] ?></textarea></td>
|
||||
<td></td>
|
||||
<td class="formauth" valign="top" nowrap><span class="formdescr"><?php echo getstring("page.gen_button.code.description") ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="10"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="formauth"><?php echo getstring("page.gen_button.sample") ?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" height="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $page['buttonCode'] ?></td>
|
||||
<td></td>
|
||||
<td class="formauth" valign="top" nowrap><span class="formdescr"></span></td>
|
||||
</tr>
|
||||
</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
143
src/webim/view/login.php
Normal file
143
src/webim/view/login.php
Normal file
@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("page_login.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<h1><?php echo getstring("page_login.title") ?></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if( isset($errors) && count($errors) > 0 ) { ?>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td valign="top"><img src='/webim/images/icon_err.gif' width="40" height="40" border="0" alt="" /></td>
|
||||
<td width="10"></td>
|
||||
<td class="text">
|
||||
<?php if( isset($errors) && count($errors) > 0 ) {
|
||||
print getstring("errors.header");
|
||||
foreach( $errors as $e ) {
|
||||
print getstring("errors.prefix");
|
||||
print $e;
|
||||
print getstring("errors.suffix");
|
||||
}
|
||||
print getstring("errors.footer");
|
||||
} ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
|
||||
<form name="loginForm" method="post" action="/webim/operator/login.php">
|
||||
<table cellspacing='0' cellpadding='0' border='0'><tr><td background='/webim/images/loginbg.gif'><table cellspacing='0' cellpadding='0' border='0'><tr><td><img src='/webim/images/logincrnlt.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrt.gif' width='16' height='16' border='0' alt=''></td></tr><tr><td></td><td align='center'><table border='0' cellspacing='0' cellpadding='0'>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="formauth"><?php echo getstring("page_login.login") ?></td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="login" size="20" value="<?php echo form_value('login') ?>" class="formauth"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" height="10"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="formauth"><?php echo getstring("page_login.password") ?></td>
|
||||
<td></td>
|
||||
<td><input type="password" name="password" size="20" value="" class="formauth"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" height="5"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="formauth"></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><input type="checkbox" name="isRemember" value="on" checked="checked"/></td>
|
||||
<td width="5"></td>
|
||||
<td class="formauth" nowrap><span><?php echo getstring("page_login.remember") ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td colspan='2' height='20'></td></tr><tr><td colspan='2' background='/webim/images/formline.gif'><img src='/webim/images/formline.gif' width='1' height='2' border='0' alt=''></td></tr><tr><td colspan='2' height='10'></td></tr>
|
||||
|
||||
<tr>
|
||||
<td><input type="hidden" name="backPath" value="<?php echo $page['backPath'] ?>"/> <input type="image" name="" src='<?php echo getstring("image.button.login") ?>' border="0" alt='<?php echo getstring("button.enter") ?>'/>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table></td><td></td></tr><tr><td><img src='/webim/images/logincrnlb.gif' width='16' height='16' border='0' alt=''></td><td></td><td><img src='/webim/images/logincrnrb.gif' width='16' height='16' border='0' alt=''></td></tr></table></td></tr></table>
|
||||
</form>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
71
src/webim/view/menu.php
Normal file
71
src/webim/view/menu.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("topMenu.admin") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">
|
||||
<h1><?php echo getstring("topMenu.admin") ?></h1>
|
||||
</td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td></tr></table></td></tr></table>
|
||||
|
||||
|
||||
<?php echo getstring("admin.content.description") ?>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
|
||||
<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/operators.php'><?php echo getstring('leftMenu.client_agents') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('admin.content.client_agents') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
|
||||
|
||||
<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/users.php'><?php echo getstring('topMenu.users') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('page_client.pending_users') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
|
||||
|
||||
<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/getcode.php'><?php echo getstring('leftMenu.client_gen_button') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('admin.content.client_gen_button') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
|
||||
|
||||
<tr><td width='20' valign='top'><img src='/webim/images/lidiv.gif' width='5' height='45' border='0' alt=''></td><td valign='top' class='text'><a href='/webim/operator/logout.php'><?php echo getstring('topMenu.logoff') ?></a><br><img src='/webim/images/free.gif' width='1' height='10' border='0' alt=''><br><?php echo getstring('content.logoff') ?><br></td></tr><tr><td colspan='2' height='20'></td></tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
176
src/webim/view/pending_users.php
Normal file
176
src/webim/view/pending_users.php
Normal file
@ -0,0 +1,176 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of Web Instant Messenger project.
|
||||
*
|
||||
* Copyright (c) 2005-2007 Internet Services Ltd.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Evgeny Gryaznov - initial API and implementation
|
||||
*/
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all" href="/webim/styles.css" />
|
||||
<script type="text/javascript" language="javascript" src="/webim/js/common.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script><!--
|
||||
var localized = new Array(
|
||||
"<?php echo getstring("pending.table.speak") ?>",
|
||||
"<?php echo getstring("pending.table.view") ?>",
|
||||
"<?php echo getstring("pending.table.ban") ?>"
|
||||
);
|
||||
var updaterOptions = {
|
||||
url:"/webim/operator/update.php",
|
||||
|
||||
agentservl:"/webim/operator/agent.php",
|
||||
noclients:"<?php echo getstring("clients.no_clients") ?>" };
|
||||
//--></script>
|
||||
<script type="text/javascript" language="javascript" src="/webim/js/page_pendingclients.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/webim/images/favicon.ico" type="image/x-icon"/>
|
||||
<title>
|
||||
<?php echo getstring("app.title") ?> - <?php echo getstring("clients.title") ?>
|
||||
</title>
|
||||
|
||||
<meta http-equiv="keywords" content="<?php echo getstring("page.main_layout.meta_keyword") ?>">
|
||||
<meta http-equiv="description" content="<?php echo getstring("page.main_layout.meta_description") ?>">
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#2971C1" vlink="#2971C1" alink="#2971C1">
|
||||
|
||||
<table width="100%" cellpadding="2" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td valign="top" class="text">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">
|
||||
<h1><?php echo getstring("clients.title") ?></h1>
|
||||
</td><td align="right" class="text" valign="top"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="textform"><?php echo getstring2("menu.operator",array($page['operator'])) ?></td><td class="textform"><img src='/webim/images/topdiv.gif' width="25" height="15" border="0" alt="|" /></td><td class="textform"><a href="/webim/operator/index.php" title="<?php echo getstring("menu.main") ?>"><?php echo getstring("menu.main") ?></a></td></tr></table></td></tr></table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php echo getstring("clients.intro") ?><br>
|
||||
|
||||
<?php echo getstring("clients.how_to") ?><br>
|
||||
<br>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td></tr>
|
||||
<tr><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
<td width="100%">
|
||||
|
||||
<!-- Pending -->
|
||||
|
||||
<table width="100%" id="threadlist" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td width="150" height="30" bgcolor="#276DB8" class="table"><span class="header"><?php echo getstring("pending.table.head.name") ?></span></td>
|
||||
<td width="3"></td>
|
||||
<td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.contactid") ?></span></td>
|
||||
<td width="3"></td>
|
||||
<td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.state") ?></span></td>
|
||||
<td width="3"></td>
|
||||
<td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.operator") ?></span></td>
|
||||
<td width="3"></td>
|
||||
<td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.total") ?></span></td>
|
||||
<td width="3"></td>
|
||||
<td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.waittime") ?></span></td>
|
||||
<td width="3"></td>
|
||||
<td bgcolor="#276DB8" align="center" class="table" nowrap><span class="header"><?php echo getstring("pending.table.head.etc") ?></span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="13" height="2"></td>
|
||||
</tr>
|
||||
|
||||
<tr id="prio">
|
||||
<td colspan="13" height="30" bgcolor="#F5F5F5" class="table">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src='/webim/images/tblicusers.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td class="table"><span class="black"><?php echo getstring("clients.queue.prio") ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="prioend">
|
||||
<td colspan="13" height="30" class="table" id="status"></td>
|
||||
</tr>
|
||||
|
||||
<tr id="wait">
|
||||
<td colspan="13" height="30" bgcolor="#F5F5F5" class="table">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src='/webim/images/tblicusers2.gif' width="15" height="15" border="0" alt="" /></td>
|
||||
<td class="table"><span class="black"><?php echo getstring("clients.queue.wait") ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="waitend">
|
||||
<td colspan="13" height="30" class="table" id="status"></td>
|
||||
</tr>
|
||||
|
||||
<tr id="chat">
|
||||
<td colspan="13" height="30" bgcolor="#F5F5F5" class="table">
|
||||
<table cellspacing="0" cellpadding="0" border="0"><tr>
|
||||
<td><img src='/webim/images/tblicusers3.gif' width="30" height="15" border="0" alt="" /></td>
|
||||
<td class="table"><span class="black"><?php echo getstring("clients.queue.chat") ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr id="chatend">
|
||||
<td colspan="13" height="30" class="table" id="status"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td><td bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr><tr>
|
||||
<td colspan="3" bgcolor="#DADADA"><img src='/webim/images/free.gif' width="1" height="1" border="0" alt="" /></td>
|
||||
</tr></table>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><td colspan="2" height="15"></td></tr>
|
||||
<tr>
|
||||
<td class="text"></td>
|
||||
<td align="right" class="text" id="connstatus">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
132
src/webim/view/properties_en
Normal file
132
src/webim/view/properties_en
Normal file
@ -0,0 +1,132 @@
|
||||
app.title=Web Instant Messenger
|
||||
site.url=http://i-services.ru
|
||||
site.title=i-services.ru
|
||||
company.title=Internet Services
|
||||
page.main_layout.meta_keyword=live chat,live help,live support
|
||||
page.main_layout.meta_description=Live chat, live help, and live support for websites
|
||||
page_login.title=Login
|
||||
page_login.login=Login:
|
||||
page_login.password=Password:
|
||||
page_login.remember=Remember
|
||||
page_login.error=Entered login/password is incorrect
|
||||
agent.not_logged_in=Your session is expired please login again
|
||||
page_client.pending_users=Your can find awaiting visitors.
|
||||
chat.window.title.agent=Web Messenger
|
||||
chat.window.title.user=Web Messenger
|
||||
chat.window.product_name=Web <span class="grey">Messenger</span>
|
||||
chat.window.close_title=Close chat
|
||||
chat.window.chatting_with=You chat with:
|
||||
chat.window.poweredby=Powered by:
|
||||
chat.window.poweredreftext=i-services.ru
|
||||
chat.window.send_message=Send message
|
||||
chat.window.send_message_short=Send (Ctrl-Enter)
|
||||
chat.window.toolbar.mail_history=Send chat history by e-mail
|
||||
chat.window.toolbar.refresh=Refresh
|
||||
chat.client.name=Your name:
|
||||
chat.client.changename=Change name
|
||||
chat.status.operator.left=Operator {0} left the chat
|
||||
chat.status.user.left=Visitor {0} left the chat
|
||||
chat.status.operator.joined=Operator {0} joined the chat
|
||||
chat.status.user.changedname=Visitor changed the name {0} to {1}
|
||||
chat.status.user.reopenedthread=Visitor joined chat again
|
||||
chat.status.operator.changed=Operator {0} changed operator {1}
|
||||
chat.default.username=Visitor
|
||||
chat.error_page.title=Error
|
||||
chat.error_page.head=Error occurred:
|
||||
chat.error_page.close=Close...
|
||||
page.chat.old_browser.title=Please, use newer browser
|
||||
page.chat.old_browser.close=Close...
|
||||
page.chat.old_browser.content=Your web browser is not fully supported by Web Messenger. \nPlease, use one of the following web browsers: \n<p><ul>\n<li>Internet Explorer 5.5+\n<li>Firefox 1.0+\n<li>Opera 8.0+\n<li>Mozilla 1.4+\n<li>Netscape 7.1+\n<li>Safari 1.2+\n</ul></p>\nAlso, we support some old browsers:\n<p><ul>\n<li>Internet Explorer 5.0\n<li>Opera 7.0\n</ul></p>
|
||||
chat.wait=Thank you for contacting us. An operator will be with you shortly...
|
||||
mailthread.title=Send chat history<br>by mail
|
||||
mailthread.enter_email=Enter your e-mail:
|
||||
mailthread.perform=Send
|
||||
mailthread.close=Close...
|
||||
chat.mailthread.sent.title=Sent
|
||||
chat.mailthread.sent.content=History of your chat was sent on address {0}
|
||||
chat.mailthread.sent.closewindow=Click on this link to close the window
|
||||
chat.mailthread.sent.close=Close...
|
||||
chat.thread.state_wait=In queue
|
||||
chat.thread.state_wait_for_another_agent=Waiting for operator
|
||||
chat.thread.state_chatting_with_agent=In chat
|
||||
chat.thread.state_closed=Closed
|
||||
clients.title=List of awaiting visitors
|
||||
clients.no_clients=The of awaiting visitors is empty
|
||||
clients.intro=The page displays list of awaiting visitors.
|
||||
clients.how_to=To answer the visitor click on his/her name in the list.
|
||||
clients.queue.prio=Priority visitors queue
|
||||
clients.queue.wait=Waiting for operator for the first time
|
||||
clients.queue.chat=Visitors in dialogs
|
||||
pending.table.head.name=Name
|
||||
pending.table.head.contactid=Visitor's address
|
||||
pending.table.head.state=State
|
||||
pending.table.head.operator=Operator
|
||||
pending.table.head.total=Total time
|
||||
pending.table.head.waittime=Waiting time
|
||||
pending.table.head.etc=Misc
|
||||
pending.table.speak=Click to chat with the visitor
|
||||
pending.table.view=Watch the chat
|
||||
pending.table.ban=Ban the visitor
|
||||
common.asterisk_explanation=<b><font class="red">*</font></b> - mandatory fields
|
||||
page_agents.title=Agents
|
||||
page_agents.agents=Agents full list:
|
||||
page_agents.new_agent=Create new agent...
|
||||
page_agents.agent_name=Name
|
||||
page_agents.login=Login
|
||||
page_agents.intro=This page displays list of company agents it also allows add new ones if you permissions
|
||||
page_agent.title=Operator details
|
||||
page_agent.intro=This page displays agent details, if you have access rights you can edit them.
|
||||
page_agent.error.duplicate_login=Please choose another login, because agent with entered login is already registered in the system.
|
||||
my_settings.error.password_match=Entered passwords do not match
|
||||
topMenu.admin=Administration
|
||||
topMenu.users=Visitors
|
||||
topMenu.logoff=Exit
|
||||
leftMenu.client_agents=Agents
|
||||
leftMenu.client_gen_button=Button code
|
||||
admin.content.description=Functions available for power users.
|
||||
admin.content.client_agents=Create, delete company agents. Manage theirs permissions.
|
||||
admin.content.client_gen_button=Button HTML code generation.
|
||||
page.gen_button.title=Button HTML code generation
|
||||
page.gen_button.intro=You can generate HTML code to place at your site here.
|
||||
page.gen_button.code=HTML code
|
||||
page.gen_button.sample=Example
|
||||
page.gen_button.code.description=<strong>Caution!</strong> Please don't change<br/> the code manually because<br/> we don't guarantee that<br/> it will work!
|
||||
mail.user.history.subject=Web Messenger: dialog history
|
||||
mail.user.history.body=Hello, {0}!\n\nYour chat history: \n\n{1}\n--- \nKind Regards,\nThe I-Services Support Team
|
||||
errors.header=<font color="#c13030"><b>Correct the mistakes:</b><br/><br/><ul>
|
||||
errors.prefix=<li class="error">
|
||||
errors.suffix=</li>
|
||||
errors.footer=</ul></font>
|
||||
errors.required=Please fill "{0}".
|
||||
form.field.login=Login
|
||||
form.field.login.description=Login can consist of small Latin letters<br/> and underscore.
|
||||
form.field.agent_name=Name
|
||||
form.field.agent_name.description=This name will be seen by your visitors.
|
||||
form.field.password_confirm=Confirmation
|
||||
form.field.password_confirm.description=Confirm new password
|
||||
form.field.password=Password
|
||||
form.field.password.description=
|
||||
button.enter=Enter
|
||||
button.save=Save
|
||||
image.chat.history=/webim/images/en/history.gif
|
||||
image.chat.message=/webim/images/en/message.gif
|
||||
image.button.login=/webim/images/en/login.gif
|
||||
image.button.save=/webim/images/en/save.gif
|
||||
content.logoff=Log out of the system.
|
||||
form.field.agent_commonname=International name (Latin)
|
||||
form.field.agent_commonname.description=This name will be seen by your visitors
|
||||
get_button_en=Get button code for English pages
|
||||
get_button_ru=Get button code for Russian pages
|
||||
install.create_db_link=Create tables in MySQL database
|
||||
install.license=Software license agreement
|
||||
install.message=We are ready to complete installation by creating tables.
|
||||
install.title=System setup
|
||||
installed.login_link=Proceed to login page
|
||||
installed.message=Tables were created successfully. You can logon as admin with empty password. For security reasons, please <br/>change your password immediately and remove /webim/install folder from your server.
|
||||
installed.title=Application installed successfully
|
||||
menu.agents=Agents list
|
||||
menu.main=Main
|
||||
menu.operator=You are {0}
|
||||
no_such_operator=No such operator
|
||||
page_agent.create_new=Here you can create new operator
|
||||
page_agents.agent_commonname=International name
|
132
src/webim/view/properties_ru
Normal file
132
src/webim/view/properties_ru
Normal file
@ -0,0 +1,132 @@
|
||||
app.title=Вэб мессенджер
|
||||
site.url=http://i-services.ru
|
||||
site.title=i-services.ru
|
||||
company.title=Internet Services
|
||||
page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm
|
||||
page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем
|
||||
page_login.title=Вход в систему
|
||||
page_login.login=Логин:
|
||||
page_login.password=Пароль:
|
||||
page_login.remember=Запомнить
|
||||
page_login.error=Введен неправильный логин или пароль
|
||||
agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова
|
||||
page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей.
|
||||
chat.window.title.agent=Вэб Мессенджер
|
||||
chat.window.title.user=Вэб Мессенджер
|
||||
chat.window.product_name=Вэб <span class="grey">Мессенджер</span>
|
||||
chat.window.close_title=Закрыть диалог
|
||||
chat.window.chatting_with=Вы общаетесь с:
|
||||
chat.window.poweredby=Предоставлено:
|
||||
chat.window.poweredreftext=i-services.ru
|
||||
chat.window.send_message=Отправить сообщение
|
||||
chat.window.send_message_short=Отправить (Ctrl-Enter)
|
||||
chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте
|
||||
chat.window.toolbar.refresh=Обновить содержимое диалога
|
||||
chat.client.name=Ваше имя:
|
||||
chat.client.changename=Изменить имя
|
||||
chat.status.operator.left=Оператор {0} покинул диалог
|
||||
chat.status.user.left=Посетитель {0} покинул диалог
|
||||
chat.status.operator.joined=Оператор {0} включился в разговор
|
||||
chat.status.user.changedname=Посетитель сменил имя {0} на {1}
|
||||
chat.status.user.reopenedthread=Посетитель заново вошел в диалог
|
||||
chat.status.operator.changed=Оператор {0} сменил оператора {1}
|
||||
chat.default.username=Посетитель
|
||||
chat.error_page.title=Ошибка
|
||||
chat.error_page.head=Произошла ошибка:
|
||||
chat.error_page.close=Закрыть...
|
||||
page.chat.old_browser.title=Используйте более новый browser
|
||||
page.chat.old_browser.close=Закрыть...
|
||||
page.chat.old_browser.content=К сожалению, для работы этой страницы необходим более новый браузер. Для лучшего просмотра используйте:\n<p><ul>\n<li>Internet Explorer 5.5+\n<li>Firefox 1.0+\n<li>Opera 8.0+\n<li>Mozilla 1.4+\n<li>Netscape 7.1+\n<li>Safari 1.2+\n</ul></p>\nТакже поддерживаются некоторые старые браузеры:\n<p><ul>\n<li>Internet Explorer 5.0\n<li>Opera 7.0\n</ul></p>
|
||||
chat.wait=Пожалуйста, подождите немного, к Вам присоединится оператор..
|
||||
mailthread.title=Отправить историю разговора<br>на почтовый ящик
|
||||
mailthread.enter_email=Введите Ваш E-mail:
|
||||
mailthread.perform=Отправить
|
||||
mailthread.close=Закрыть...
|
||||
chat.mailthread.sent.title=Отправлено
|
||||
chat.mailthread.sent.content=История Вашего разговора была отправлена на адрес {0}
|
||||
chat.mailthread.sent.closewindow=Нажмите на эту ссылку чтобы закрыть окно
|
||||
chat.mailthread.sent.close=Закрыть...
|
||||
chat.thread.state_wait=В очереди
|
||||
chat.thread.state_wait_for_another_agent=Ожидание оператора
|
||||
chat.thread.state_chatting_with_agent=В диалоге
|
||||
chat.thread.state_closed=Закрыто
|
||||
clients.title=Список ожидающих посетителей
|
||||
clients.no_clients=В этой очереди ожидающих посетителей нет
|
||||
clients.intro=На этой странице можно просмотреть список ожидающих ответа посетителей.
|
||||
clients.how_to=Для ответа посетителю кликните на соответствующее имя в списке.
|
||||
clients.queue.prio=Приоритетная очередь посетителей
|
||||
clients.queue.wait=Ожидающие оператора в первый раз
|
||||
clients.queue.chat=Посетители в диалогах
|
||||
pending.table.head.name=Имя
|
||||
pending.table.head.contactid=Адрес посетителя
|
||||
pending.table.head.state=Состояние
|
||||
pending.table.head.operator=Оператор
|
||||
pending.table.head.total=Общее время
|
||||
pending.table.head.waittime=Время ожидания
|
||||
pending.table.head.etc=Разное
|
||||
pending.table.speak=Нажмите для того, чтобы обслужить посетителя
|
||||
pending.table.view=Подключиться к диалогу в режиме просмотра
|
||||
pending.table.ban=Пометить посетителя как нежелательного
|
||||
common.asterisk_explanation=<b><font class="red">*</font></b> - поля, обязательные для заполнения
|
||||
page_agents.title=Агенты
|
||||
page_agents.agents=Полный список агентов:
|
||||
page_agents.new_agent=Создать нового агента...
|
||||
page_agents.agent_name=Имя
|
||||
page_agents.login=Логин
|
||||
page_agents.intro=На этой странице можно просмотреть список агентов компании, добавить нового при наличии соответствующих прав доступа
|
||||
page_agent.title=Детали агента
|
||||
page_agent.intro=На этой странице Вы можете просмотреть детали и свойства агента и отредактировать их
|
||||
page_agent.error.duplicate_login=Выберите другой логин, т.к. агент с введенным логином уже зарегистрирован в системе.
|
||||
my_settings.error.password_match=Введенные пароли должны совпадать
|
||||
topMenu.admin=Операторское меню
|
||||
topMenu.users=Посетители
|
||||
topMenu.logoff=Выход
|
||||
leftMenu.client_agents=Агенты
|
||||
leftMenu.client_gen_button=Код кнопки
|
||||
admin.content.description=Набор функций, доступный только зарегистрированным операторам
|
||||
admin.content.client_agents=Создание, удаление агентов компании. Управление их правами и возможностями.
|
||||
admin.content.client_gen_button=Получение HTML-кода для кнопки "Вэб Мессенджера".
|
||||
page.gen_button.title=Получение HTML-кода кнопки
|
||||
page.gen_button.intro=На этой старнице Вы можете получить HTML-код кнопки "Вэб Мессенджера" для размещения на своем сайте.
|
||||
page.gen_button.code=HTML-код
|
||||
page.gen_button.sample=Пример
|
||||
page.gen_button.code.description=<strong>Внимание!</strong> При внесении<br/> каких-либо изменений<br/> в этот код работоспособность<br/> кнопки не гарантируется!
|
||||
mail.user.history.subject=Вэб Мессенджер: история диалога
|
||||
mail.user.history.body=Здраствуйте, {0}!\n\nПо Вашему запросу, высылаем историю: \n\n{1}\n--- \nС уважением,\nСлужба поддержки i-services.ru
|
||||
errors.header=<font color="#c13030"><b>Исправьте ошибки:</b><br/><br/><ul>
|
||||
errors.prefix=<li class="error">
|
||||
errors.suffix=</li>
|
||||
errors.footer=</ul></font>
|
||||
errors.required=Заполните поле "{0}".
|
||||
form.field.login=Логин
|
||||
form.field.login.description=Логин может состоять из маленьких латинских<br/> букв и знака подчеркивания.
|
||||
form.field.agent_name=Имя
|
||||
form.field.agent_name.description=Под этим именем Вас увидят ваши посетители, <br/> по нему же к Вам будет обращаться система.
|
||||
form.field.password_confirm=Подтверждение
|
||||
form.field.password_confirm.description=Подтвердите введенный пароль
|
||||
form.field.password=Пароль
|
||||
form.field.password.description=
|
||||
button.enter=Войти
|
||||
button.save=Сохранить
|
||||
image.chat.history=/webim/images/ru/history.gif
|
||||
image.chat.message=/webim/images/ru/message.gif
|
||||
image.button.login=/webim/images/ru/login.gif
|
||||
image.button.save=/webim/images/ru/save.gif
|
||||
content.logoff=Покинуть систему.
|
||||
form.field.agent_commonname=Интернациональное имя (латиницей)
|
||||
form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран
|
||||
get_button_en=Получить код кнопки для английских страниц
|
||||
get_button_ru=Получить код кнопки для русских страниц
|
||||
install.create_db_link=Создать необходимые таблицы в базе данных
|
||||
install.license=Лицензионное соглашение о программном обеспечении
|
||||
install.message=Для окончания установки необходимо создать таблицы.
|
||||
install.title=Установка
|
||||
installed.login_link=Войти в систему
|
||||
installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.<br/>В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль.
|
||||
installed.title=Установка завершена
|
||||
menu.agents=Список агентов
|
||||
menu.main=Главная
|
||||
menu.operator=Вы {0}
|
||||
no_such_operator=Запрашиваемая учетная запись не существует
|
||||
page_agent.create_new=Создание нового оператора
|
||||
page_agents.agent_commonname=Интернациональное имя
|
Loading…
Reference in New Issue
Block a user