diff --git a/src/webim/INSTALL.txt b/src/webim/INSTALL.txt new file mode 100644 index 00000000..346dbb69 --- /dev/null +++ b/src/webim/INSTALL.txt @@ -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:///webim/install/ and + hit "Create tables" +5. Remove /webim/install/ directory from your server +6. Logon as + user: admin + password: +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. diff --git a/src/webim/button.php b/src/webim/button.php new file mode 100644 index 00000000..8e870e97 --- /dev/null +++ b/src/webim/button.php @@ -0,0 +1,30 @@ + \ No newline at end of file diff --git a/src/webim/client.php b/src/webim/client.php new file mode 100644 index 00000000..6e632adf --- /dev/null +++ b/src/webim/client.php @@ -0,0 +1,66 @@ + \ No newline at end of file diff --git a/src/webim/index.php b/src/webim/index.php new file mode 100644 index 00000000..7cc35a98 --- /dev/null +++ b/src/webim/index.php @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/webim/install/index.php b/src/webim/install/index.php new file mode 100644 index 00000000..6ee0cc8f --- /dev/null +++ b/src/webim/install/index.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/src/webim/install/install.php b/src/webim/install/install.php new file mode 100644 index 00000000..1e0f3378 --- /dev/null +++ b/src/webim/install/install.php @@ -0,0 +1,89 @@ + \ No newline at end of file diff --git a/src/webim/install/view_index.php b/src/webim/install/view_index.php new file mode 100644 index 00000000..2aa594b5 --- /dev/null +++ b/src/webim/install/view_index.php @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("install.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +

+ + + +
+
+ + + +
+
+ + +
+ + + + diff --git a/src/webim/install/view_install.php b/src/webim/install/view_install.php new file mode 100644 index 00000000..3e5b5b00 --- /dev/null +++ b/src/webim/install/view_install.php @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("installed.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +

+ + + +
+
+ + + +
+
+ + +
+ + + + diff --git a/src/webim/libs/.htaccess b/src/webim/libs/.htaccess new file mode 100644 index 00000000..14249c50 --- /dev/null +++ b/src/webim/libs/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/src/webim/libs/chat.php b/src/webim/libs/chat.php new file mode 100644 index 00000000..02acfb8d --- /dev/null +++ b/src/webim/libs/chat.php @@ -0,0 +1,350 @@ + "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*/','$0',$escaped_text); + $multiline = str_replace("\n","
",$text_w_links); + return $multiline; +} + +function message_to_html($msg) { + global $kind_to_string; + $message = "".date("H:i:s",$msg['created'])." "; + $kind = $kind_to_string{$msg['ikind']}; + if( $msg['tname'] ) + $message.= "".htmlspecialchars($msg['tname']).": "; + $message.= "".prepare_html_message($msg['tmessage'])."
"; + 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(""); + foreach( $output as $msg ) { + print "".myiconv($webim_encoding,"utf-8",escape_with_cdata($msg))."\n"; + } + print(""); + } else if( $format == "html" ) { + start_html_output(); + $url = "$webimroot/thread.php?act=refresh&thread=$threadid&token=$token&html=on&user=".($isuser?"true":"false"); + + print("\n". + "\n". + "\n". + "\n". + "". + "". + "
" ); + + foreach( $output as $msg ) { + print $msg; + } + + print( + "
". + "" ); + } +} + +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; +} + +?> \ No newline at end of file diff --git a/src/webim/libs/common.php b/src/webim/libs/common.php new file mode 100644 index 00000000..81fe1942 --- /dev/null +++ b/src/webim/libs/common.php @@ -0,0 +1,243 @@ +Wrong parameter used or absent: ".$name.""; + exit; +} + +function debugexit_print( $var ) { + echo "
";
+	print_r( $var );
+	echo "
"; + 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 ""; +} + +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 "", "]]>]]>"; +} + +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 "
$message"; +} + +function get_image($href,$width,$height) { + if( $width != 0 && $height != 0 ) + return ""; + return ""; +} + +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); +} + +?> \ No newline at end of file diff --git a/src/webim/libs/config.php b/src/webim/libs/config.php new file mode 100644 index 00000000..8a9451e8 --- /dev/null +++ b/src/webim/libs/config.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/src/webim/libs/converter.php b/src/webim/libs/converter.php new file mode 100644 index 00000000..ff12a479 --- /dev/null +++ b/src/webim/libs/converter.php @@ -0,0 +1,48 @@ +"\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"); + +?> \ No newline at end of file diff --git a/src/webim/libs/operator.php b/src/webim/libs/operator.php new file mode 100644 index 00000000..d2a944db --- /dev/null +++ b/src/webim/libs/operator.php @@ -0,0 +1,137 @@ +".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" ).""; +} + +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/"); + } +} + +?> \ No newline at end of file diff --git a/src/webim/mail.php b/src/webim/mail.php new file mode 100644 index 00000000..1f3b0120 --- /dev/null +++ b/src/webim/mail.php @@ -0,0 +1,50 @@ + \ No newline at end of file diff --git a/src/webim/operator/agent.php b/src/webim/operator/agent.php new file mode 100644 index 00000000..471dd790 --- /dev/null +++ b/src/webim/operator/agent.php @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/src/webim/operator/getcode.php b/src/webim/operator/getcode.php new file mode 100644 index 00000000..9fc1e43f --- /dev/null +++ b/src/webim/operator/getcode.php @@ -0,0 +1,35 @@ + \ No newline at end of file diff --git a/src/webim/operator/index.php b/src/webim/operator/index.php new file mode 100644 index 00000000..0f82d3e0 --- /dev/null +++ b/src/webim/operator/index.php @@ -0,0 +1,24 @@ + get_operator_name($operator) ); + +start_html_output(); +require('../view/menu.php'); +?> \ No newline at end of file diff --git a/src/webim/operator/login.php b/src/webim/operator/login.php new file mode 100644 index 00000000..8a4dacc2 --- /dev/null +++ b/src/webim/operator/login.php @@ -0,0 +1,42 @@ + '' ); +start_html_output(); +require('../view/login.php'); +?> \ No newline at end of file diff --git a/src/webim/operator/logout.php b/src/webim/operator/logout.php new file mode 100644 index 00000000..01215e2d --- /dev/null +++ b/src/webim/operator/logout.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/src/webim/operator/operator.php b/src/webim/operator/operator.php new file mode 100644 index 00000000..a25f7e26 --- /dev/null +++ b/src/webim/operator/operator.php @@ -0,0 +1,85 @@ + ''); +$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'); +?> \ No newline at end of file diff --git a/src/webim/operator/operators.php b/src/webim/operator/operators.php new file mode 100644 index 00000000..f6daac45 --- /dev/null +++ b/src/webim/operator/operators.php @@ -0,0 +1,26 @@ + \ No newline at end of file diff --git a/src/webim/operator/update.php b/src/webim/operator/update.php new file mode 100644 index 00000000..67fbf8e7 --- /dev/null +++ b/src/webim/operator/update.php @@ -0,0 +1,93 @@ +".myiconv($webim_encoding,"utf-8",escape_with_cdata(getstring("agent.not_logged_in"))).""; + 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 = ""; + + $state = getstring($threadstate_key[$thread['istate']]); + $result .= " canopen=\"true\" state=\"$state\">"; + $result .= "".htmlspecialchars($thread['userName']).""; + $result .= "".htmlspecialchars($thread['remote']).""; + $result .= "".htmlspecialchars($thread['agentName'] ? $thread['agentName'] : "-").""; + $result .= ""; + $result .= "".$thread['unix_timestamp(dtmmodified)']."000"; + $result .= ""; + 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 ""; + foreach( $output as $thr ) { + print myiconv($webim_encoding,"utf-8",$thr); + } + echo ""; +} + +//////// + +$since = verifyparam( "since", "/^\d{1,9}$/", 0); + +print_pending_threads($since); +notify_operator_alive($operator['operatorid']); +exit; + +?> \ No newline at end of file diff --git a/src/webim/operator/users.php b/src/webim/operator/users.php new file mode 100644 index 00000000..b1c954ac --- /dev/null +++ b/src/webim/operator/users.php @@ -0,0 +1,26 @@ + get_operator_name($operator) ); + +start_html_output(); +require('../view/pending_users.php'); +?> \ No newline at end of file diff --git a/src/webim/thread.php b/src/webim/thread.php new file mode 100644 index 00000000..905830c4 --- /dev/null +++ b/src/webim/thread.php @@ -0,0 +1,74 @@ +"; + exit; + +} else if( $act == "ping" ) { + + ping_thread($thread, $isuser); + start_xml_output(); + echo ""; + exit; + +} else if( $act == "close" ) { + + ping_thread($thread, $isuser); + close_thread($thread, $isuser); + start_xml_output(); + echo ""; + exit; + +} + +?> \ No newline at end of file diff --git a/src/webim/view/.htaccess b/src/webim/view/.htaccess new file mode 100644 index 00000000..14249c50 --- /dev/null +++ b/src/webim/view/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/src/webim/view/agent.php b/src/webim/view/agent.php new file mode 100644 index 00000000..91134ad3 --- /dev/null +++ b/src/webim/view/agent.php @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("page_agent.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +
+

+
|">|">
+ + + + + + + + +
+
+ + + + + + + + + 0 ) { ?> + + + + + + +
+ 0 ) { + print getstring("errors.header"); + foreach( $errors as $e ) { + print getstring("errors.prefix"); + print $e; + print getstring("errors.suffix"); + } + print getstring("errors.footer"); + } ?> + +
+ + +
+
+ + + + + + + + + + + + + + + + + +
*
+ +
*
+ +
*
+ +
*
+ +
*
+ +
+ +
+ + + + + + + + + + + + + + +
+ + +
+ +
+ + + + diff --git a/src/webim/view/agents.php b/src/webim/view/agents.php new file mode 100644 index 00000000..567ea504 --- /dev/null +++ b/src/webim/view/agents.php @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("page_agents.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +
+

+
|">
+ + + + +

+ + + + + + + + + +
+ + + + + + +
+ "> + + +
+
+ + + + + + + + + + + + + + + +
+ + + + + +
+ '> + + +
+
+ + + + + +
+
+ + + + + +
+
+
+ + + + diff --git a/src/webim/view/chat_ajaxed.php b/src/webim/view/chat_ajaxed.php new file mode 100644 index 00000000..56d06161 --- /dev/null +++ b/src/webim/view/chat_ajaxed.php @@ -0,0 +1,250 @@ + + + + +<?php echo getstring("chat.window.title.agent") ?> + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + +
+ + + + +
" title="" target="_blank">
+
">
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ ">
+
+
+ + + + + + +
">>>
+
+
+ + + + +
">">
+
+
"> + " onclick="this.newWindow = window.open('&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;">Mail "> + Refresh 
+ +
+
+
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + + + + +
+
" title="" target="_blank"> + + + + + + + + + +
"> +
+ ">
+
">
+ +
+
+ +
+ + + diff --git a/src/webim/view/chat_error.php b/src/webim/view/chat_error.php new file mode 100644 index 00000000..4b28d55d --- /dev/null +++ b/src/webim/view/chat_error.php @@ -0,0 +1,108 @@ + + + + +<?php echo getstring("chat.error_page.title") ?> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + + + +
+ + 0 ) { + print getstring("errors.header"); + foreach( $errors as $e ) { + print getstring("errors.prefix"); + print $e; + print getstring("errors.suffix"); + } + print getstring("errors.footer"); + } ?> + + +
+ +
+ + + + + +
+ + + + + + +
">">
+
+ +
+ +
+ + + + diff --git a/src/webim/view/chat_mailsent.php b/src/webim/view/chat_mailsent.php new file mode 100644 index 00000000..779a63e6 --- /dev/null +++ b/src/webim/view/chat_mailsent.php @@ -0,0 +1,108 @@ + + + + +<?php echo getstring("chat.window.title.user") ?> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + +
+ + + + + + +
">">
+
+ +
+ +
+ + + + diff --git a/src/webim/view/chat_mailthread.php b/src/webim/view/chat_mailthread.php new file mode 100644 index 00000000..0a0d7ac5 --- /dev/null +++ b/src/webim/view/chat_mailthread.php @@ -0,0 +1,132 @@ + + + + +<?php echo getstring("chat.window.title.user") ?> + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +
+ +
+ + + + + + +
+ + + + + + +
"> +
+ ">
+
">
+
+ + + + + + +
">">
+
+ +
+ +
+ + + +
+ + + + diff --git a/src/webim/view/chat_oldbrowser.php b/src/webim/view/chat_oldbrowser.php new file mode 100644 index 00000000..4c3a3b05 --- /dev/null +++ b/src/webim/view/chat_oldbrowser.php @@ -0,0 +1,99 @@ + + + + +<?php echo getstring("page.chat.old_browser.title") ?> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+ + + +
+ +
+ + + + + +
+ + + + + + +
">">
+
+ +
+ + +
+ + + + diff --git a/src/webim/view/chat_simple.php b/src/webim/view/chat_simple.php new file mode 100644 index 00000000..934ace01 --- /dev/null +++ b/src/webim/view/chat_simple.php @@ -0,0 +1,239 @@ + + + + +<?php echo getstring("chat.window.title.user") ?> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
<?php echo $page['ct.company.name'] ?>
+
+ + + + + + + + +
+ + + + + + + + + + +
+ + + + +
" title="" target="_blank">
+
">
+ +
+ + + + + + + + + + + + + + + + + + + + +
">>>" onclick="this.newWindow = window.open('&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;">Mail"> + Refresh
+ +
+
+
+ + + + + + + + + + + + + + + +
History + + + + + + + + + + + + +
+ +
+
Message + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+ + + + + + +
+ + + + + +
+
" title="" target="_blank"> + + + + + + + +
"> +
+ ">
+
">
+
+
+ +
+ + + + + diff --git a/src/webim/view/gen_button.php b/src/webim/view/gen_button.php new file mode 100644 index 00000000..0d48c388 --- /dev/null +++ b/src/webim/view/gen_button.php @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("page.gen_button.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +
+

+
|">
+ + + +
+
+ +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + diff --git a/src/webim/view/login.php b/src/webim/view/login.php new file mode 100644 index 00000000..454c89ad --- /dev/null +++ b/src/webim/view/login.php @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("page_login.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +

+ + + + + + + + + + + + + + + + + + 0 ) { ?> + + + + + + +
+ 0 ) { + print getstring("errors.header"); + foreach( $errors as $e ) { + print getstring("errors.prefix"); + print $e; + print getstring("errors.suffix"); + } + print getstring("errors.footer"); + } ?> + +
+ + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+
+
+
+
+ + +
+ + + + diff --git a/src/webim/view/menu.php b/src/webim/view/menu.php new file mode 100644 index 00000000..7e45b2cf --- /dev/null +++ b/src/webim/view/menu.php @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("topMenu.admin") ?> + + +"> +"> + + + + + + + + + + + + +
+ +
+

+
+ + + +
+
+ + + + + + + + + + + +












+
+ + + + diff --git a/src/webim/view/pending_users.php b/src/webim/view/pending_users.php new file mode 100644 index 00000000..e515d5fe --- /dev/null +++ b/src/webim/view/pending_users.php @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("clients.title") ?> + + +"> +"> + + + + + + + + + + + + +
+ +
+

+
|">
+ + + + + + + +
+ +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+ +
+ + + + diff --git a/src/webim/view/properties_en b/src/webim/view/properties_en new file mode 100644 index 00000000..5d85a6d1 --- /dev/null +++ b/src/webim/view/properties_en @@ -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 Messenger +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

\nAlso, we support some old browsers:\n

+chat.wait=Thank you for contacting us. An operator will be with you shortly... +mailthread.title=Send chat history
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=* - 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=Caution! Please don't change
the code manually because
we don't guarantee that
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=Correct the mistakes:

    +errors.prefix=
  • +errors.suffix=
  • +errors.footer=
+errors.required=Please fill "{0}". +form.field.login=Login +form.field.login.description=Login can consist of small Latin letters
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
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 diff --git a/src/webim/view/properties_ru b/src/webim/view/properties_ru new file mode 100644 index 00000000..ab32a363 --- /dev/null +++ b/src/webim/view/properties_ru @@ -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=Вэб Мессенджер +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

\nТакже поддерживаются некоторые старые браузеры:\n

+chat.wait=Пожалуйста, подождите немного, к Вам присоединится оператор.. +mailthread.title=Отправить историю разговора
на почтовый ящик +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=* - поля, обязательные для заполнения +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=Внимание! При внесении
каких-либо изменений
в этот код работоспособность
кнопки не гарантируется! +mail.user.history.subject=Вэб Мессенджер: история диалога +mail.user.history.body=Здраствуйте, {0}!\n\nПо Вашему запросу, высылаем историю: \n\n{1}\n--- \nС уважением,\nСлужба поддержки i-services.ru +errors.header=Исправьте ошибки:

    +errors.prefix=
  • +errors.suffix=
  • +errors.footer=
+errors.required=Заполните поле "{0}". +form.field.login=Логин +form.field.login.description=Логин может состоять из маленьких латинских
букв и знака подчеркивания. +form.field.agent_name=Имя +form.field.agent_name.description=Под этим именем Вас увидят ваши посетители,
по нему же к Вам будет обращаться система. +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 с пустым паролем.
В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. +installed.title=Установка завершена +menu.agents=Список агентов +menu.main=Главная +menu.operator=Вы {0} +no_such_operator=Запрашиваемая учетная запись не существует +page_agent.create_new=Создание нового оператора +page_agents.agent_commonname=Интернациональное имя