From f168f1baaf9ed74988c12f35c88a531943d29f58 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Wed, 10 Oct 2007 15:15:47 +0000 Subject: [PATCH] fix eol, add agentId into chatmessage and chatthread, minor changes in html, several utility functions git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@27 c66351dc-e62f-0410-b875-e3a5c0b9693f --- src/webim/button.php | 60 +- src/webim/client.php | 134 ++-- src/webim/install/index.php | 38 +- src/webim/install/install.php | 186 +++--- src/webim/install/view_index.php | 121 ++-- src/webim/install/view_install.php | 121 ++-- src/webim/libs/chat.php | 873 +++++++++++++------------ src/webim/libs/common.php | 626 +++++++++--------- src/webim/libs/config.php | 178 ++--- src/webim/libs/converter.php | 94 +-- src/webim/libs/operator.php | 298 ++++----- src/webim/libs/pagination.php | 196 +++--- src/webim/mail.php | 98 +-- src/webim/operator/agent.php | 110 ++-- src/webim/operator/getcode.php | 128 ++-- src/webim/operator/history.php | 108 +-- src/webim/operator/index.php | 76 +-- src/webim/operator/login.php | 82 +-- src/webim/operator/logout.php | 46 +- src/webim/operator/operator.php | 168 ++--- src/webim/operator/operators.php | 50 +- src/webim/operator/threadprocessor.php | 62 +- src/webim/operator/update.php | 194 +++--- src/webim/operator/users.php | 50 +- src/webim/thread.php | 172 ++--- src/webim/view/agent.php | 273 ++++---- src/webim/view/agents.php | 237 ++++--- src/webim/view/chat_ajaxed.php | 504 +++++++------- src/webim/view/chat_error.php | 212 +++--- src/webim/view/chat_mailsent.php | 212 +++--- src/webim/view/chat_mailthread.php | 260 ++++---- src/webim/view/chat_oldbrowser.php | 194 +++--- src/webim/view/chat_simple.php | 478 +++++++------- src/webim/view/gen_button.php | 261 ++++---- src/webim/view/login.php | 267 ++++---- src/webim/view/menu.php | 169 +++-- src/webim/view/pending_users.php | 332 +++++----- src/webim/view/properties_en | 304 ++++----- src/webim/view/properties_ru | 304 ++++----- src/webim/view/thread_log.php | 164 +++-- src/webim/view/thread_search.php | 228 ++++--- 41 files changed, 4299 insertions(+), 4369 deletions(-) diff --git a/src/webim/button.php b/src/webim/button.php index 95328d9f..ed885f7a 100644 --- a/src/webim/button.php +++ b/src/webim/button.php @@ -1,31 +1,31 @@ - \ No newline at end of file diff --git a/src/webim/client.php b/src/webim/client.php index 61166005..933b8542 100644 --- a/src/webim/client.php +++ b/src/webim/client.php @@ -1,68 +1,68 @@ - \ No newline at end of file diff --git a/src/webim/install/index.php b/src/webim/install/index.php index 0e4f02df..4a2cd1e5 100644 --- a/src/webim/install/index.php +++ b/src/webim/install/index.php @@ -1,19 +1,19 @@ - + diff --git a/src/webim/install/install.php b/src/webim/install/install.php index b47e3929..cbdf2b68 100644 --- a/src/webim/install/install.php +++ b/src/webim/install/install.php @@ -1,90 +1,98 @@ - \ No newline at end of file diff --git a/src/webim/install/view_index.php b/src/webim/install/view_index.php index 5b32c2a2..461ad0c6 100644 --- a/src/webim/install/view_index.php +++ b/src/webim/install/view_index.php @@ -1,64 +1,57 @@ - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("install.title") ?> - - -"> -"> - - - - - - - - - - - - -
- -

- - - -
-
- - - -
-
- - -
- - - - + + + + + + + + + + + + <?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 index 3e5b5b00..5633634a 100644 --- a/src/webim/install/view_install.php +++ b/src/webim/install/view_install.php @@ -1,64 +1,57 @@ - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("installed.title") ?> - - -"> -"> - - - - - - - - - - - - -
- -

- - - -
-
- - - -
-
- - -
- - - - + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("installed.title") ?> + + +"> +"> + + + + + + + + +
+ +

+ + + +
+
+ + + +
+
+ + +
+ + + + diff --git a/src/webim/libs/chat.php b/src/webim/libs/chat.php index ee7547b7..a09a4515 100644 --- a/src/webim/libs/chat.php +++ b/src/webim/libs/chat.php @@ -1,435 +1,438 @@ - "user", $kind_agent => "agent", $kind_for_agent => "hidden", - $kind_info => "inf", $kind_conn => "conn", $kind_events => "event" ); - - - -function next_token() { - return rand(99999,99999999); -} - -function next_revision($link) { - perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link); - $val = mysql_insert_id($link); - return $val; -} - -function post_message_($threadid,$kind,$message,$link,$from=null,$time=null) { - $query = sprintf( - "insert into chatmessage (threadid,ikind,tmessage,tname,dtmcreated) values (%s, %s,'%s',%s,%s)", - $threadid, - $kind, - quote_smart($message,$link), - $from ? "'".quote_smart($from,$link)."'" : "null", - $time ? "FROM_UNIXTIME($time)" : "CURRENT_TIMESTAMP" ); - - perform_query($query,$link); -} - -function post_message($threadid,$kind,$message,$from=null) { - $link = connect(); - post_message_($threadid,$kind,$message,$link,$from); - mysql_close($link); -} - -function prepare_html_message($text) { - $escaped_text = htmlspecialchars($text); - $text_w_links = preg_replace('/(http|ftp):\/\/\S*/','$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,$isuser,&$lastid) { - global $kind_for_agent; - $link = connect(); - - $query = sprintf( - "select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ". - "where threadid = %s and messageid > %s %s order by messageid", - $threadid, $lastid, $isuser ? "and ikind <> $kind_for_agent" : "" ); - - $messages = array(); - $result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); - - while ($msg = mysql_fetch_array($result, MYSQL_ASSOC)) { - $message = ($meth == 'text') ? message_to_text($msg) : message_to_html($msg); - $messages[] = $message; - if( $msg['messageid'] > $lastid ) - $lastid = $msg['messageid']; - } - - mysql_free_result($result); - mysql_close($link); - return $messages; -} - -function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) { - global $webim_encoding, $webimroot; - $output = get_messages($threadid,"html",$isuser,$lastid); - - if( $format == "xml" ) { - start_xml_output(); - print(""); - 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 get_user_name($name, $id="") { - global $presentable_name_pattern; - return str_replace("{id}", $id, str_replace("{name}", $name, $presentable_name_pattern)); -} - -function setup_chatview_for_user($thread,$level) { - global $page, $webimroot, $user_can_change_name, $company_logo_link, $company_name; - $page = array(); - $page['agent'] = false; - $page['user'] = true; - $page['canpost'] = true; - $nameisset = getstring("chat.default.username") != $thread['userName']; - $page['displ1'] = $nameisset ? "none" : "inline"; - $page['displ2'] = $nameisset ? "inline" : "none"; - $page['level'] = $level; - $page['ct.chatThreadId'] = $thread['threadid']; - $page['ct.token'] = $thread['ltoken']; - $page['ct.user.name'] = $thread['userName']; - $page['canChangeName'] = $user_can_change_name; - - $page['ct.company.name'] = $company_name; - $page['ct.company.chatLogoURL'] = $company_logo_link; - - $params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; - $page['selfLink'] = "$webimroot/client.php?".$params."&level=".$level; -} - -function setup_chatview_for_operator($thread,$operator) { - global $page, $webimroot, $company_logo_link, $company_name; - $page = array(); - $page['agent'] = true; - $page['user'] = false; - $page['canpost'] = true; - $page['ct.chatThreadId'] = $thread['threadid']; - $page['ct.token'] = $thread['ltoken']; - $page['ct.user.name'] = get_user_name($thread['userName']); - - $page['ct.company.name'] = $company_name; - $page['ct.company.chatLogoURL'] = $company_logo_link; - - // TODO - $page['namePostfix'] = ""; -} - -function is_ajax_browser($name,$ver,$useragent) { - if( $name == "opera" ) - return $ver >= 8.02; - if( $name == "safari" ) - return $ver >= 125; - if( $name == "msie" ) - return $ver >= 5.5 && !strstr($useragent, "powerpc"); - if( $name == "netscape" ) - return $ver >= 7.1; - if( $name == "mozilla") - return $ver >= 1.4; - if( $name == "firefox") - return $ver >= 1.0; - - return false; -} - -function is_old_browser($name,$ver) { - if( $name == "opera" ) - return $ver < 7.0; - if( $name == "msie" ) - return $ver < 5.0; - return false; -} - -$knownAgents = array("opera","msie","safari","firefox","netscape","mozilla"); - -function get_remote_level($useragent) { - global $knownAgents; - $useragent = strtolower($useragent); - foreach( $knownAgents as $agent ) { - if( strstr($useragent,$agent) ) { - if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) { - $ver = $matches[1]; - - if( is_ajax_browser($agent,$ver,$useragent) ) - return "ajaxed"; - else if( is_old_browser($agent,$ver) ) - return "old"; - - return "simple"; - } - } - } - return "simple"; -} - -function update_thread_access($threadid, $params, $link) { - $clause = ""; - foreach( $params as $k => $v ) { - if( strlen($clause) > 0 ) - $clause .= ", "; - $clause .= $k."=".$v; - } - perform_query( - "update chatthread set $clause ". - "where threadid = ".$threadid,$link); -} - -function get_access_time($threadid, $isuser, $link) { - return select_one_row(sprintf( - "select unix_timestamp(%s) as lastping, ". - "unix_timestamp(CURRENT_TIMESTAMP) as current ". - "from chatthread where threadid = %s", - $isuser ? "lastpinguser" : "lastpingagent", - $threadid), $link); -} - -function ping_thread($thread, $isuser) { - global $kind_for_agent, $state_chatting, $state_waiting, $kind_conn, $connection_timeout; - $link = connect(); - $params = array(($isuser ? "lastpinguser" : "lastpingagent") => "CURRENT_TIMESTAMP" ); - - $access = get_access_time($thread['threadid'], !$isuser, $link); - if( $access['lastping'] > 0 && abs($access['current']-$access['lastping']) > $connection_timeout ) { - $params[$isuser ? "lastpingagent" : "lastpinguser"] = "0"; - if( !$isuser ) { - $message_to_post = getstring_("chat.status.user.dead", $thread['locale']); - post_message_($thread['threadid'],$kind_for_agent,$message_to_post,$link,null,$access['lastping']+$connection_timeout); - } else if( $thread['istate'] == $state_chatting ) { - - $message_to_post = getstring_("chat.status.operator.dead", $thread['locale']); - post_message_($thread['threadid'],$kind_conn,$message_to_post,$link,null,$access['lastping']+$connection_timeout); - $params['istate'] = $state_waiting; - commit_thread($thread['threadid'], $params, $link); - mysql_close($link); - return; - } - } - - update_thread_access($thread['threadid'], $params, $link); - mysql_close($link); -} - -function commit_thread($threadid,$params,$link) { - $query = "update chatthread set lrevision = ".next_revision($link).", dtmmodified = CURRENT_TIMESTAMP"; - foreach( $params as $k => $v ) { - $query .= ", ".$k."=".$v; - } - $query .= " where threadid = ".$threadid; - - perform_query($query,$link); -} - -function rename_user($thread, $newname) { - global $kind_events; - - $link = connect(); - commit_thread( $thread['threadid'], array('userName' => "'".mysql_real_escape_string($newname)."'"), $link); - mysql_close($link); - - if( $thread['userName'] != $newname ) { - post_message($thread['threadid'],$kind_events, - getstring2_("chat.status.user.changedname",array($thread['userName'], $newname), $thread['locale'])); - } -} - -function close_thread($thread,$isuser) { - global $state_closed, $kind_events; - - if( $thread['istate'] != $state_closed ) { - $link = connect(); - commit_thread( $thread['threadid'], array('istate' => $state_closed), $link); - mysql_close($link); - } - - $message = $isuser ? getstring2_("chat.status.user.left", array($thread['userName']), $thread['locale']) - : getstring2_("chat.status.operator.left", array($thread['agentName']), $thread['locale']); - post_message($thread['threadid'], $kind_events, $message); -} - -function create_thread($username,$remote,$referer,$lang) { - $link = connect(); - - $query = sprintf( - "insert into chatthread (userName,"."ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ". - "('%s',"."%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)", - mysql_real_escape_string($username), - next_token(), - mysql_real_escape_string($remote), - mysql_real_escape_string($referer), - next_revision($link), - mysql_real_escape_string($lang) ); - - perform_query($query,$link); - $id = mysql_insert_id($link); - - $newthread = select_one_row("select * from chatthread where threadid = ". $id, $link ); - mysql_close($link); - return $newthread; -} - -function do_take_thread($threadid,$operatorName) { - global $state_chatting; - $link = connect(); - commit_thread( $threadid, - array("istate" => $state_chatting, - "agentName" => "'".mysql_real_escape_string($operatorName)."'"), $link); - mysql_close($link); -} - -function reopen_thread($threadid) { - global $state_queue,$state_waiting,$state_chatting,$state_closed,$kind_events; - $thread = thread_by_id($threadid); - - if( !$thread ) - return FALSE; - - if( $thread['istate'] == $state_closed ) - return FALSE; - - if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) { - $link = connect(); - commit_thread( $threadid, - array("istate" => $state_waiting ), $link); - mysql_close($link); - } - - post_message($thread['threadid'], $kind_events, getstring_("chat.status.user.reopenedthread", $thread['locale'])); - return $thread; -} - -function take_thread($thread,$operator) { - global $state_queue, $state_waiting, $state_chatting, $kind_events, $home_locale; - - $state = $thread['istate']; - $threadid = $thread['threadid']; - $message_to_post = ""; - - $operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; - - if( $state == $state_queue || $state == $state_waiting) { - do_take_thread($threadid, $operatorName); - - if( $state == $state_waiting ) { - $message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); - } else { - $message_to_post = getstring2_("chat.status.operator.joined", array($operatorName), $thread['locale']); - } - } else if( $state == $state_chatting ) { - if( $operatorName != $thread['agentName'] ) { - do_take_thread($threadid, $operatorName); - $message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']); - } - } else { - die("cannot take thread"); - } - - if( $message_to_post ) - post_message($threadid,$kind_events,$message_to_post); -} - -function check_for_reassign($thread,$operator) { - global $state_waiting, $home_locale, $kind_events; - $operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; - if( $thread['istate'] == $state_waiting && - ( $thread['agentName'] == $operatorName )) { - do_take_thread($thread['threadid'], $operatorName); - $message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); - post_message($thread['threadid'],$kind_events,$message_to_post); - } -} - -function thread_by_id($id) { - $link = connect(); - $thread = select_one_row("select * from chatthread where threadid = ". $id, $link ); - mysql_close($link); - return $thread; -} - -function visitor_from_request() { - global $namecookie; - $userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username"); - - return array( 'name' => $userName ); -} - -?> + "user", $kind_agent => "agent", $kind_for_agent => "hidden", + $kind_info => "inf", $kind_conn => "conn", $kind_events => "event" ); + + + +function next_token() { + return rand(99999,99999999); +} + +function next_revision($link) { + perform_query("update chatrevision set id=LAST_INSERT_ID(id+1)",$link); + $val = mysql_insert_id($link); + return $val; +} + +function post_message_($threadid,$kind,$message,$link,$from=null,$time=null,$opid=null) { + $query = sprintf( + "insert into chatmessage (threadid,ikind,tmessage,tname,agentId,dtmcreated) values (%s, %s,'%s',%s,%s,%s)", + $threadid, + $kind, + quote_smart($message,$link), + $from ? "'".quote_smart($from,$link)."'" : "null", + $opid ? $opid : "0", + $time ? "FROM_UNIXTIME($time)" : "CURRENT_TIMESTAMP" ); + + perform_query($query,$link); +} + +function post_message($threadid,$kind,$message,$from=null,$agentid=null) { + $link = connect(); + post_message_($threadid,$kind,$message,$link,$from,null,$agentid); + mysql_close($link); +} + +function prepare_html_message($text) { + $escaped_text = htmlspecialchars($text); + $text_w_links = preg_replace('/(http|ftp):\/\/\S*/','$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,$isuser,&$lastid) { + global $kind_for_agent; + $link = connect(); + + $query = sprintf( + "select messageid,ikind,unix_timestamp(dtmcreated) as created,tname,tmessage from chatmessage ". + "where threadid = %s and messageid > %s %s order by messageid", + $threadid, $lastid, $isuser ? "and ikind <> $kind_for_agent" : "" ); + + $messages = array(); + $result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); + + while ($msg = mysql_fetch_array($result, MYSQL_ASSOC)) { + $message = ($meth == 'text') ? message_to_text($msg) : message_to_html($msg); + $messages[] = $message; + if( $msg['messageid'] > $lastid ) + $lastid = $msg['messageid']; + } + + mysql_free_result($result); + mysql_close($link); + return $messages; +} + +function print_thread_mesages($threadid, $token, $lastid, $isuser,$format) { + global $webim_encoding, $webimroot; + $output = get_messages($threadid,"html",$isuser,$lastid); + + if( $format == "xml" ) { + start_xml_output(); + print(""); + 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 get_user_name($name, $id="") { + global $presentable_name_pattern; + return str_replace("{id}", $id, str_replace("{name}", $name, $presentable_name_pattern)); +} + +function setup_chatview_for_user($thread,$level) { + global $page, $webimroot, $user_can_change_name, $company_logo_link, $company_name; + $page = array(); + $page['agent'] = false; + $page['user'] = true; + $page['canpost'] = true; + $nameisset = getstring("chat.default.username") != $thread['userName']; + $page['displ1'] = $nameisset ? "none" : "inline"; + $page['displ2'] = $nameisset ? "inline" : "none"; + $page['level'] = $level; + $page['ct.chatThreadId'] = $thread['threadid']; + $page['ct.token'] = $thread['ltoken']; + $page['ct.user.name'] = $thread['userName']; + $page['canChangeName'] = $user_can_change_name; + + $page['ct.company.name'] = $company_name; + $page['ct.company.chatLogoURL'] = $company_logo_link; + + $params = "thread=".$thread['threadid']."&token=".$thread['ltoken']; + $page['selfLink'] = "$webimroot/client.php?".$params."&level=".$level; +} + +function setup_chatview_for_operator($thread,$operator) { + global $page, $webimroot, $company_logo_link, $company_name; + $page = array(); + $page['agent'] = true; + $page['user'] = false; + $page['canpost'] = true; + $page['ct.chatThreadId'] = $thread['threadid']; + $page['ct.token'] = $thread['ltoken']; + $page['ct.user.name'] = get_user_name($thread['userName']); + + $page['ct.company.name'] = $company_name; + $page['ct.company.chatLogoURL'] = $company_logo_link; + + // TODO + $page['namePostfix'] = ""; +} + +function is_ajax_browser($name,$ver,$useragent) { + if( $name == "opera" ) + return $ver >= 8.02; + if( $name == "safari" ) + return $ver >= 125; + if( $name == "msie" ) + return $ver >= 5.5 && !strstr($useragent, "powerpc"); + if( $name == "netscape" ) + return $ver >= 7.1; + if( $name == "mozilla") + return $ver >= 1.4; + if( $name == "firefox") + return $ver >= 1.0; + + return false; +} + +function is_old_browser($name,$ver) { + if( $name == "opera" ) + return $ver < 7.0; + if( $name == "msie" ) + return $ver < 5.0; + return false; +} + +$knownAgents = array("opera","msie","safari","firefox","netscape","mozilla"); + +function get_remote_level($useragent) { + global $knownAgents; + $useragent = strtolower($useragent); + foreach( $knownAgents as $agent ) { + if( strstr($useragent,$agent) ) { + if( preg_match( "/".$agent."[\\s\/]?(\\d+(\\.\\d+)?)/", $useragent, $matches ) ) { + $ver = $matches[1]; + + if( is_ajax_browser($agent,$ver,$useragent) ) + return "ajaxed"; + else if( is_old_browser($agent,$ver) ) + return "old"; + + return "simple"; + } + } + } + return "simple"; +} + +function update_thread_access($threadid, $params, $link) { + $clause = ""; + foreach( $params as $k => $v ) { + if( strlen($clause) > 0 ) + $clause .= ", "; + $clause .= $k."=".$v; + } + perform_query( + "update chatthread set $clause ". + "where threadid = ".$threadid,$link); +} + +function get_access_time($threadid, $isuser, $link) { + return select_one_row(sprintf( + "select unix_timestamp(%s) as lastping, ". + "unix_timestamp(CURRENT_TIMESTAMP) as current ". + "from chatthread where threadid = %s", + $isuser ? "lastpinguser" : "lastpingagent", + $threadid), $link); +} + +function ping_thread($thread, $isuser) { + global $kind_for_agent, $state_chatting, $state_waiting, $kind_conn, $connection_timeout; + $link = connect(); + $params = array(($isuser ? "lastpinguser" : "lastpingagent") => "CURRENT_TIMESTAMP" ); + + $access = get_access_time($thread['threadid'], !$isuser, $link); + if( $access['lastping'] > 0 && abs($access['current']-$access['lastping']) > $connection_timeout ) { + $params[$isuser ? "lastpingagent" : "lastpinguser"] = "0"; + if( !$isuser ) { + $message_to_post = getstring_("chat.status.user.dead", $thread['locale']); + post_message_($thread['threadid'],$kind_for_agent,$message_to_post,$link,null,$access['lastping']+$connection_timeout); + } else if( $thread['istate'] == $state_chatting ) { + + $message_to_post = getstring_("chat.status.operator.dead", $thread['locale']); + post_message_($thread['threadid'],$kind_conn,$message_to_post,$link,null,$access['lastping']+$connection_timeout); + $params['istate'] = $state_waiting; + commit_thread($thread['threadid'], $params, $link); + mysql_close($link); + return; + } + } + + update_thread_access($thread['threadid'], $params, $link); + mysql_close($link); +} + +function commit_thread($threadid,$params,$link) { + $query = "update chatthread set lrevision = ".next_revision($link).", dtmmodified = CURRENT_TIMESTAMP"; + foreach( $params as $k => $v ) { + $query .= ", ".$k."=".$v; + } + $query .= " where threadid = ".$threadid; + + perform_query($query,$link); +} + +function rename_user($thread, $newname) { + global $kind_events; + + $link = connect(); + commit_thread( $thread['threadid'], array('userName' => "'".mysql_real_escape_string($newname)."'"), $link); + mysql_close($link); + + if( $thread['userName'] != $newname ) { + post_message($thread['threadid'],$kind_events, + getstring2_("chat.status.user.changedname",array($thread['userName'], $newname), $thread['locale'])); + } +} + +function close_thread($thread,$isuser) { + global $state_closed, $kind_events; + + if( $thread['istate'] != $state_closed ) { + $link = connect(); + commit_thread( $thread['threadid'], array('istate' => $state_closed), $link); + mysql_close($link); + } + + $message = $isuser ? getstring2_("chat.status.user.left", array($thread['userName']), $thread['locale']) + : getstring2_("chat.status.operator.left", array($thread['agentName']), $thread['locale']); + post_message($thread['threadid'], $kind_events, $message); +} + +function create_thread($username,$remote,$referer,$lang) { + $link = connect(); + + $query = sprintf( + "insert into chatthread (userName,"."ltoken,remote,referer,lrevision,locale,dtmcreated,dtmmodified) values ". + "('%s',"."%s,'%s','%s',%s,'%s',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)", + mysql_real_escape_string($username), + next_token(), + mysql_real_escape_string($remote), + mysql_real_escape_string($referer), + next_revision($link), + mysql_real_escape_string($lang) ); + + perform_query($query,$link); + $id = mysql_insert_id($link); + + $newthread = select_one_row("select * from chatthread where threadid = ". $id, $link ); + mysql_close($link); + return $newthread; +} + +function do_take_thread($threadid,$operatorId,$operatorName) { + global $state_chatting; + $link = connect(); + commit_thread( $threadid, + array("istate" => $state_chatting, + "agentId" => $operatorId, + "agentName" => "'".mysql_real_escape_string($operatorName)."'"), $link); + mysql_close($link); +} + +function reopen_thread($threadid) { + global $state_queue,$state_waiting,$state_chatting,$state_closed,$kind_events; + $thread = thread_by_id($threadid); + + if( !$thread ) + return FALSE; + + if( $thread['istate'] == $state_closed ) + return FALSE; + + if( $thread['istate'] != $state_chatting && $thread['istate'] != $state_queue ) { + $link = connect(); + commit_thread( $threadid, + array("istate" => $state_waiting ), $link); + mysql_close($link); + } + + post_message($thread['threadid'], $kind_events, getstring_("chat.status.user.reopenedthread", $thread['locale'])); + return $thread; +} + +function take_thread($thread,$operator) { + global $state_queue, $state_waiting, $state_chatting, $kind_events, $home_locale; + + $state = $thread['istate']; + $threadid = $thread['threadid']; + $message_to_post = ""; + + $operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; + + if( $state == $state_queue || $state == $state_waiting) { + do_take_thread($threadid, $operator['operatorid'], $operatorName); + + if( $state == $state_waiting ) { + $message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); + } else { + $message_to_post = getstring2_("chat.status.operator.joined", array($operatorName), $thread['locale']); + } + } else if( $state == $state_chatting ) { + if( $operator['operatorid'] != $thread['agentId'] ) { + do_take_thread($threadid, $operator['operatorid'], $operatorName); + $message_to_post = getstring2_("chat.status.operator.changed", array($operatorName, $thread['agentName']), $thread['locale']); + } + } else { + die("cannot take thread"); + } + + if( $message_to_post ) { + post_message($threadid,$kind_events,$message_to_post); + } +} + +function check_for_reassign($thread,$operator) { + global $state_waiting, $home_locale, $kind_events; + $operatorName = ($thread['locale'] == $home_locale) ? $operator['vclocalename'] : $operator['vccommonname']; + if( $thread['istate'] == $state_waiting && + ( $thread['agentId'] == $operator['operatorid'] )) { + do_take_thread($thread['threadid'], $operator['operatorid'], $operatorName); + $message_to_post = getstring2_("chat.status.operator.changed", array($operatorName,$thread['agentName']), $thread['locale']); + post_message($thread['threadid'],$kind_events,$message_to_post); + } +} + +function thread_by_id($id) { + $link = connect(); + $thread = select_one_row("select * from chatthread where threadid = ". $id, $link ); + mysql_close($link); + return $thread; +} + +function visitor_from_request() { + global $namecookie; + $userName = isset($_COOKIE[$namecookie]) ? $_COOKIE[$namecookie] : getstring("chat.default.username"); + + return array( 'name' => $userName ); +} + +?> diff --git a/src/webim/libs/common.php b/src/webim/libs/common.php index db11676e..c9931e26 100644 --- a/src/webim/libs/common.php +++ b/src/webim/libs/common.php @@ -1,293 +1,335 @@ -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, $force_charset_in_connection; - $link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) - or die('Could not connect: ' . mysql_error()); - mysql_select_db($mysqldb) or die('Could not select database'); - if( $force_charset_in_connection ) - mysql_query("SET character set $dbencoding", $link); - return $link; -} - -function perform_query($query,$link) { - mysql_query($query,$link) or die(' Query failed: ' . - mysql_error().": ".$query); -} - -function select_one_row($query,$link) { - $result = mysql_query($query,$link) or die(' Query failed: ' . - mysql_error().": ".$query); - $line = mysql_fetch_array($result, MYSQL_ASSOC); - mysql_free_result($result); - return $line; -} - -function start_xml_output() { - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Content-type: text/xml"); - echo ""; -} - -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 form_value_cb($key) { - global $page; - if( isset($page) && isset($page["form$key"]) ) - return $page["form$key"] === true; - return false; -} - -function no_field($key) { - return getstring2("errors.required",array(getstring($key))); -} - -function get_popup($href,$message,$title,$wndName,$options) { - return "
$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); -} - -function add_params($servlet, $params) { - $infix = '?'; - if( strstr($servlet,$infix) !== FALSE ) - $infix = '&'; - foreach($params as $k => $v) { - $servlet .= $infix.$k."=".$v; - $infix = '&'; - } - return $servlet; -} - -function div($a,$b) { - return ($a-($a % $b)) / $b; -} - -function date_diff($seconds) { - $minutes = div($seconds,60); - $seconds = $seconds % 60; - if( $minutes < 60 ) { - return sprintf("%02d:%02d",$minutes, $seconds); - } else { - $hours = div($minutes,60); - $minutes = $minutes % 60; - return sprintf("%02d:%02d:%02d",$hours, $minutes, $seconds); - } -} - -function quote_smart($value,$link) { - if (get_magic_quotes_gpc()) { - $value = stripslashes($value); - } - return mysql_real_escape_string($value,$link); -} - -function get_app_location($showhost,$issecure) { - if( $showhost ) { - return ($issecure?"https://":"http://").$_SERVER['HTTP_HOST']."/webim"; - } else { - return "/webim"; - } -} - +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, $force_charset_in_connection; + $link = mysql_connect($mysqlhost,$mysqllogin ,$mysqlpass ) + or die('Could not connect: ' . mysql_error()); + mysql_select_db($mysqldb) or die('Could not select database'); + if( $force_charset_in_connection ) + mysql_query("SET character set $dbencoding", $link); + return $link; +} + +function perform_query($query,$link) { + mysql_query($query,$link) or die(' Query failed: ' . + mysql_error().": ".$query); +} + +function select_one_row($query,$link) { + $result = mysql_query($query,$link) or die(' Query failed: ' . + mysql_error().": ".$query); + $line = mysql_fetch_array($result, MYSQL_ASSOC); + mysql_free_result($result); + return $line; +} + +function select_multi_assoc($query,$link) { + $sqlresult = mysql_query($query,$link) or die(' Query failed: ' . + mysql_error().": ".$query); + + $result = array(); + while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) { + $result[] = $row; + } + mysql_free_result($sqlresult); + return $result; +} + +function start_xml_output() { + header("Cache-Control: no-store, no-cache, must-revalidate"); + header("Content-type: text/xml"); + echo ""; +} + +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 form_value_cb($key) { + global $page; + if( isset($page) && isset($page["form$key"]) ) + return $page["form$key"] === true; + return false; +} + +function no_field($key) { + return getstring2("errors.required",array(getstring($key))); +} + +function get_popup($href,$message,$title,$wndName,$options) { + return "$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); +} + +function add_params($servlet, $params) { + $infix = '?'; + if( strstr($servlet,$infix) !== FALSE ) + $infix = '&'; + foreach($params as $k => $v) { + $servlet .= $infix.$k."=".$v; + $infix = '&'; + } + return $servlet; +} + +function div($a,$b) { + return ($a-($a % $b)) / $b; +} + +function date_diff($seconds) { + $minutes = div($seconds,60); + $seconds = $seconds % 60; + if( $minutes < 60 ) { + return sprintf("%02d:%02d",$minutes, $seconds); + } else { + $hours = div($minutes,60); + $minutes = $minutes % 60; + return sprintf("%02d:%02d:%02d",$hours, $minutes, $seconds); + } +} + +function quote_smart($value,$link) { + if (get_magic_quotes_gpc()) { + $value = stripslashes($value); + } + return mysql_real_escape_string($value,$link); +} + +function get_app_location($showhost,$issecure) { + if( $showhost ) { + return ($issecure?"https://":"http://").$_SERVER['HTTP_HOST']."/webim"; + } else { + return "/webim"; + } +} + +function get_month_selection($fromtime,$totime) { + $start = getdate($fromtime); + $month = $start['mon']; + $year = $start['year']; + $result = array(); + do { + $current = mktime(0,0,0,$month,1,$year); + $result[date("m.y",$current)] = date("M, Y",$current); + $month++; + if( $month > 12 ) { + $month = 1; + $year++; + } + } while( $current < $totime ); + return $result; +} + +function get_form_date($day,$month) { + if( preg_match('/^(\d{2}).(\d{2})$/', $month, $matches)) { + return mktime(0,0,0,$matches[1],$day,$matches[2]); + } + return 0; +} + +function set_form_date($time,$prefix) { + global $page; + $page["form${prefix}day"] = date("d", $time); + $page["form${prefix}month"] = date("m.y", $time); +} + ?> \ No newline at end of file diff --git a/src/webim/libs/config.php b/src/webim/libs/config.php index 28d877d4..25d6d74f 100644 --- a/src/webim/libs/config.php +++ b/src/webim/libs/config.php @@ -1,89 +1,89 @@ - + diff --git a/src/webim/libs/converter.php b/src/webim/libs/converter.php index ff12a479..34145ede 100644 --- a/src/webim/libs/converter.php +++ b/src/webim/libs/converter.php @@ -1,48 +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"); - +"\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 index 027ad70e..3282ef62 100644 --- a/src/webim/libs/operator.php +++ b/src/webim/libs/operator.php @@ -1,150 +1,150 @@ -".get_popup($link, $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/"); - } -} - +".get_popup($link, $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/libs/pagination.php b/src/webim/libs/pagination.php index 627de9cf..34a57f63 100644 --- a/src/webim/libs/pagination.php +++ b/src/webim/libs/pagination.php @@ -1,99 +1,99 @@ -$title"; -} - -function generate_pagination_image($id) { - global $webimroot; - return ""; -} - -function setup_pagination($items,$default_items_per_page=15) { - global $page; - - if( $items ) { - $items_per_page = verifyparam("items", "/^\d{1,3}$/", $default_items_per_page); - if( $items_per_page < 2 ) - $items_per_page = 2; - - $total_pages = div(count($items) + $items_per_page - 1, $items_per_page); - $curr_page = verifyparam("page", "/^\d{1,6}$/", 1); - - if( $curr_page < 1 ) - $curr_page = 1; - if( $curr_page > $total_pages ) - $curr_page = $total_pages; - - $start_index = ($curr_page-1)*$items_per_page; - $end_index = min($start_index+$items_per_page, count($items)); - $page['pagination.items'] = array_slice($items, $start_index, $end_index-$start_index); - $page['pagination'] = - array( "page" => $curr_page, "items" => $items_per_page, "total" => $total_pages, - "count" => count($items), "start" => $start_index, "end" => $end_index ); - } else { - $page['pagination.items'] = false; - $page['pagination'] = true; - } -} - -function setup_empty_pagination() { - global $page; - $page['pagination.items'] = false; - $page['pagination'] = false; -} - -function generate_pagination($pagination) { - global $pagination_spacing, $links_on_page; - $result = getstring2("tag.pagination.info", - array($pagination['page'],$pagination['total'],$pagination['start']+1,$pagination['end'],$pagination['count']))."
"; - - if( $pagination['total'] > 1 ) { - $result.="
"; - } - return $result; -} - +$title"; +} + +function generate_pagination_image($id) { + global $webimroot; + return ""; +} + +function setup_pagination($items,$default_items_per_page=15) { + global $page; + + if( $items ) { + $items_per_page = verifyparam("items", "/^\d{1,3}$/", $default_items_per_page); + if( $items_per_page < 2 ) + $items_per_page = 2; + + $total_pages = div(count($items) + $items_per_page - 1, $items_per_page); + $curr_page = verifyparam("page", "/^\d{1,6}$/", 1); + + if( $curr_page < 1 ) + $curr_page = 1; + if( $curr_page > $total_pages ) + $curr_page = $total_pages; + + $start_index = ($curr_page-1)*$items_per_page; + $end_index = min($start_index+$items_per_page, count($items)); + $page['pagination.items'] = array_slice($items, $start_index, $end_index-$start_index); + $page['pagination'] = + array( "page" => $curr_page, "items" => $items_per_page, "total" => $total_pages, + "count" => count($items), "start" => $start_index, "end" => $end_index ); + } else { + $page['pagination.items'] = false; + $page['pagination'] = true; + } +} + +function setup_empty_pagination() { + global $page; + $page['pagination.items'] = false; + $page['pagination'] = false; +} + +function generate_pagination($pagination) { + global $pagination_spacing, $links_on_page; + $result = getstring2("tag.pagination.info", + array($pagination['page'],$pagination['total'],$pagination['start']+1,$pagination['end'],$pagination['count']))."
"; + + if( $pagination['total'] > 1 ) { + $result.="
"; + } + return $result; +} + ?> \ No newline at end of file diff --git a/src/webim/mail.php b/src/webim/mail.php index 89fffbb4..5944a5a0 100644 --- a/src/webim/mail.php +++ b/src/webim/mail.php @@ -1,50 +1,50 @@ - \ No newline at end of file diff --git a/src/webim/operator/agent.php b/src/webim/operator/agent.php index 732fdcf1..8da7a2b0 100644 --- a/src/webim/operator/agent.php +++ b/src/webim/operator/agent.php @@ -1,56 +1,56 @@ - \ No newline at end of file diff --git a/src/webim/operator/getcode.php b/src/webim/operator/getcode.php index a16926b3..1ec7c1dd 100644 --- a/src/webim/operator/getcode.php +++ b/src/webim/operator/getcode.php @@ -1,65 +1,65 @@ - \ No newline at end of file diff --git a/src/webim/operator/history.php b/src/webim/operator/history.php index 052a4b91..341b727a 100644 --- a/src/webim/operator/history.php +++ b/src/webim/operator/history.php @@ -1,55 +1,55 @@ - get_operator_name($operator) ); -$query = isset($_GET['q']) ? $_GET['q'] : false; - -if($query !== false) { - $link = connect(); - - $result = mysql_query( - "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ". - "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". - "chatthread.remote, chatthread.agentName, chatthread.userName ". - "from chatthread, chatmessage ". - "where chatmessage.threadid = chatthread.threadid and ". - "((chatthread.userName LIKE '%%$query%%') or ". - " (chatmessage.tmessage LIKE '%%$query%%'))". - "order by created DESC", $link) - or die(' Query failed: ' .mysql_error().": ".$query); - - $foundThreads = array(); - while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) { - $foundThreads[] = $thread; - } - - mysql_free_result($result); - mysql_close($link); - - $page['formq'] = $query; - setup_pagination($foundThreads); -} else { - setup_empty_pagination(); -} - -start_html_output(); -require('../view/thread_search.php'); + get_operator_name($operator) ); +$query = isset($_GET['q']) ? $_GET['q'] : false; + +if($query !== false) { + $link = connect(); + + $result = mysql_query( + "select DISTINCT unix_timestamp(chatthread.dtmcreated) as created, ". + "unix_timestamp(chatthread.dtmmodified) as modified, chatthread.threadid, ". + "chatthread.remote, chatthread.agentName, chatthread.userName ". + "from chatthread, chatmessage ". + "where chatmessage.threadid = chatthread.threadid and ". + "((chatthread.userName LIKE '%%$query%%') or ". + " (chatmessage.tmessage LIKE '%%$query%%'))". + "order by created DESC", $link) + or die(' Query failed: ' .mysql_error().": ".$query); + + $foundThreads = array(); + while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) { + $foundThreads[] = $thread; + } + + mysql_free_result($result); + mysql_close($link); + + $page['formq'] = $query; + setup_pagination($foundThreads); +} else { + setup_empty_pagination(); +} + +start_html_output(); +require('../view/thread_search.php'); ?> \ No newline at end of file diff --git a/src/webim/operator/index.php b/src/webim/operator/index.php index 7cb3c7f4..cfa3ef61 100644 --- a/src/webim/operator/index.php +++ b/src/webim/operator/index.php @@ -1,39 +1,39 @@ - get_operator_name($operator), - 'version' => 'v1.0.7' -); - -$localeLinks = ""; -foreach($available_locales as $k) { - if( strlen($localeLinks) > 0 ) - $localeLinks .= " • "; - if( $k == $current_locale ) - $localeLinks .= $k; - else - $localeLinks .= "$k"; -} - -$page['localeLinks'] = $localeLinks; - -start_html_output(); -require('../view/menu.php'); + get_operator_name($operator), + 'version' => 'v1.0.7' +); + +$localeLinks = ""; +foreach($available_locales as $k) { + if( strlen($localeLinks) > 0 ) + $localeLinks .= " • "; + if( $k == $current_locale ) + $localeLinks .= $k; + else + $localeLinks .= "$k"; +} + +$page['localeLinks'] = $localeLinks; + +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 index 00ada2c8..68f789cc 100644 --- a/src/webim/operator/login.php +++ b/src/webim/operator/login.php @@ -1,42 +1,42 @@ - '', 'formisRemember' => true ); -start_html_output(); -require('../view/login.php'); + '', 'formisRemember' => true ); +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 index 01215e2d..e71918a6 100644 --- a/src/webim/operator/logout.php +++ b/src/webim/operator/logout.php @@ -1,24 +1,24 @@ - \ No newline at end of file diff --git a/src/webim/operator/operator.php b/src/webim/operator/operator.php index a25f7e26..618aff09 100644 --- a/src/webim/operator/operator.php +++ b/src/webim/operator/operator.php @@ -1,85 +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'); + ''); +$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 index f6daac45..a63bf6bf 100644 --- a/src/webim/operator/operators.php +++ b/src/webim/operator/operators.php @@ -1,26 +1,26 @@ - \ No newline at end of file diff --git a/src/webim/operator/threadprocessor.php b/src/webim/operator/threadprocessor.php index e87d88ec..3eb81df7 100644 --- a/src/webim/operator/threadprocessor.php +++ b/src/webim/operator/threadprocessor.php @@ -1,32 +1,32 @@ - get_operator_name($operator) ); - - -if( isset($_GET['threadid'])) { - $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); - $lastid = -1; - $page['threadMessages'] = get_messages($threadid,"html",false,$lastid); -} - -start_html_output(); -require('../view/thread_log.php'); + get_operator_name($operator) ); + + +if( isset($_GET['threadid'])) { + $threadid = verifyparam( "threadid", "/^(\d{1,9})?$/", ""); + $lastid = -1; + $page['threadMessages'] = get_messages($threadid,"html",false,$lastid); +} + +start_html_output(); +require('../view/thread_log.php'); ?> \ No newline at end of file diff --git a/src/webim/operator/update.php b/src/webim/operator/update.php index 91abdc2e..b4fdfe1a 100644 --- a/src/webim/operator/update.php +++ b/src/webim/operator/update.php @@ -1,98 +1,98 @@ -".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']]); - $threadoperator = ($thread['agentName'] ? $thread['agentName'] : "-"); - - $result .= " canopen=\"true\""; - $result .= " state=\"$state\">"; - $result .= "".htmlspecialchars(htmlspecialchars(get_user_name($thread['userName']))).""; - $result .= "".htmlspecialchars(htmlspecialchars($thread['remote'])).""; - $result .= "".htmlspecialchars(htmlspecialchars($threadoperator)).""; - $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; - +".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']]); + $threadoperator = ($thread['agentName'] ? $thread['agentName'] : "-"); + + $result .= " canopen=\"true\""; + $result .= " state=\"$state\">"; + $result .= "".htmlspecialchars(htmlspecialchars(get_user_name($thread['userName']))).""; + $result .= "".htmlspecialchars(htmlspecialchars($thread['remote'])).""; + $result .= "".htmlspecialchars(htmlspecialchars($threadoperator)).""; + $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 index b1c954ac..55aed786 100644 --- a/src/webim/operator/users.php +++ b/src/webim/operator/users.php @@ -1,26 +1,26 @@ - get_operator_name($operator) ); - -start_html_output(); -require('../view/pending_users.php'); + 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 index 18ea0b75..53a679da 100644 --- a/src/webim/thread.php +++ b/src/webim/thread.php @@ -1,87 +1,87 @@ -"; - exit; - } - - $newname = getrawparam('name'); - - rename_user($thread, $newname); - setcookie($namecookie, $newname, time()+60*60*24*365); - start_xml_output(); - echo ""; - exit; - -} else if( $act == "ping" ) { - - start_xml_output(); - echo ""; - exit; - -} else if( $act == "close" ) { - - close_thread($thread, $isuser); - start_xml_output(); - echo ""; - exit; - -} - +"; + exit; + } + + $newname = getrawparam('name'); + + rename_user($thread, $newname); + setcookie($namecookie, $newname, time()+60*60*24*365); + start_xml_output(); + echo ""; + exit; + +} else if( $act == "ping" ) { + + start_xml_output(); + echo ""; + exit; + +} else if( $act == "close" ) { + + close_thread($thread, $isuser); + start_xml_output(); + echo ""; + exit; + +} + ?> \ No newline at end of file diff --git a/src/webim/view/agent.php b/src/webim/view/agent.php index 91134ad3..f498cafc 100644 --- a/src/webim/view/agent.php +++ b/src/webim/view/agent.php @@ -1,144 +1,129 @@ - - - - - - - - - - - - - - - <?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"); - } ?> - -
- - -
-
- - - - - - - - - - - - - - - - - -
*
- -
*
- -
*
- -
*
- -
*
- -
- -
- - - - - - - - - - - - - - -
- - -
- -
- - - - + + + + + + + + + + + + <?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 index 567ea504..4064b6b3 100644 --- a/src/webim/view/agents.php +++ b/src/webim/view/agents.php @@ -1,122 +1,115 @@ - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("page_agents.title") ?> - - -"> -"> - - - - - - - - - - - - -
- -
-

-
|">
- - - - -

- - - - - - - - - -
- - - - - - -
- "> - - -
-
- - - - - - - - - - - - - - - -
- - - - - -
- '> - - -
-
- - - - - -
-
- - - - - -
-
-
- - - - + + + + + + + + + + + + <?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 index a614648e..cf92be3d 100644 --- a/src/webim/view/chat_ajaxed.php +++ b/src/webim/view/chat_ajaxed.php @@ -1,252 +1,252 @@ - - - - -<?php echo getstring("chat.window.title.agent") ?> - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - -
-
- - - - - - - - -
- - - - - - - - - - -
- - - - -
" title="" target="_blank">
-
">
- -
- - - - - - - - - - - - - - - - - - - - - - - -
- ">
-
-
- - - - - - -
">>>
-
-
- - - - -
">">
-
-
"> - " onclick="this.newWindow = window.open('&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;">Mail "> - Refresh 
- -
-
-
- - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
- -
-
- - - - - - - - - - - - -
- -
-
- -
- - - - - - -
- - - - - - -
-
" title="" target="_blank"> - - - - - - - - - -
"> -
- ">
-
">
- -
-
- -
- - - - + + + + +<?php echo getstring("chat.window.title.agent") ?> + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + +
+ + + + +
" title="" target="_blank">
+
">
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ ">
+
+
+ + + + + + +
">>>
+
+
+ + + + +
">">
+
+
"> + " onclick="this.newWindow = window.open('&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;">Mail "> + Refresh 
+ +
+
+
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + +
+ +
+
+ +
+ + + + + + +
+ + + + + + +
+
" title="" target="_blank"> + + + + + + + + + +
"> +
+ ">
+
">
+ +
+
+ +
+ + + + diff --git a/src/webim/view/chat_error.php b/src/webim/view/chat_error.php index 4b28d55d..99ae633f 100644 --- a/src/webim/view/chat_error.php +++ b/src/webim/view/chat_error.php @@ -1,108 +1,104 @@ - - - - -<?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"); - } ?> - - -
- -
- - - - - -
- - - - - - -
">">
-
- -
- -
- - - - + + + + +<?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 index 779a63e6..0ef9799a 100644 --- a/src/webim/view/chat_mailsent.php +++ b/src/webim/view/chat_mailsent.php @@ -1,108 +1,104 @@ - - - - -<?php echo getstring("chat.window.title.user") ?> - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

-
- - - - - - - - - - - - - - - - - - - -
- -
- - -
- -
- - - - - -
- - - - - - -
">">
-
- -
- -
- - - - + + + + +<?php echo getstring("chat.window.title.user") ?> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + +
+ + + + + + +
">">
+
+ +
+ +
+ + + + diff --git a/src/webim/view/chat_mailthread.php b/src/webim/view/chat_mailthread.php index 0a0d7ac5..380fce47 100644 --- a/src/webim/view/chat_mailthread.php +++ b/src/webim/view/chat_mailthread.php @@ -1,132 +1,128 @@ - - - - -<?php echo getstring("chat.window.title.user") ?> - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
-

-
- - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- -
- -
- - - - - - -
- - - - - - -
"> -
- ">
-
">
-
- - - - - - -
">">
-
- -
- -
- - - -
- - - - + + + + +<?php echo getstring("chat.window.title.user") ?> + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +
+ +
+ + + + + + +
+ + + + + + +
"> +
+ ">
+
">
+
+ + + + + + +
">">
+
+ +
+ +
+ + + +
+ + + + diff --git a/src/webim/view/chat_oldbrowser.php b/src/webim/view/chat_oldbrowser.php index 4c3a3b05..88913dfd 100644 --- a/src/webim/view/chat_oldbrowser.php +++ b/src/webim/view/chat_oldbrowser.php @@ -1,99 +1,95 @@ - - - - -<?php echo getstring("page.chat.old_browser.title") ?> - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - -
- - - -
- -
- - - - - -
- - - - - - -
">">
-
- -
- - -
- - - - + + + + +<?php echo getstring("page.chat.old_browser.title") ?> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+ + + +
+ +
+ + + + + +
+ + + + + + +
">">
+
+ +
+ + +
+ + + + diff --git a/src/webim/view/chat_simple.php b/src/webim/view/chat_simple.php index d5d1376f..964c62bc 100644 --- a/src/webim/view/chat_simple.php +++ b/src/webim/view/chat_simple.php @@ -1,239 +1,239 @@ - - - - -<?php echo getstring("chat.window.title.user") ?> - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - - - - - - - - -
<?php echo $page['ct.company.name'] ?>
-
- - - - - - - - -
- - - - - - - - - - -
- - - - -
" title="" target="_blank">
-
">
- -
- - - - - - - - - - - - - - - - - - - - -
">>>" onclick="this.newWindow = window.open('&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;">Mail"> - Refresh
- -
-
-
- - - - - - - - - - - - - - - -
History - - - - - - - - - - - - -
- -
-
Message - - - - - - - - - - - - -
-
- - - -
-
-
- -
- - - - - - -
- - - - - -
-
" title="" target="_blank"> - - - - - - - -
"> -
- ">
-
">
-
-
- -
- - - - - + + + + +<?php echo getstring("chat.window.title.user") ?> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + +
<?php echo $page['ct.company.name'] ?>
+
+ + + + + + + + +
+ + + + + + + + + + +
+ + + + +
" title="" target="_blank">
+
">
+ +
+ + + + + + + + + + + + + + + + + + + + +
">>>" onclick="this.newWindow = window.open('&act=mailthread', 'ForwardMail', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,width=603,height=204,resizable=0');this.newWindow.focus();this.newWindow.opener=window;return false;">Mail"> + Refresh
+ +
+
+
+ + + + + + + + + + + + + + + +
History + + + + + + + + + + + + +
+ +
+
Message + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+ + + + + + +
+ + + + + +
+
" title="" target="_blank"> + + + + + + + +
"> +
+ ">
+
">
+
+
+ +
+ + + + + diff --git a/src/webim/view/gen_button.php b/src/webim/view/gen_button.php index 965be715..67f7ce64 100644 --- a/src/webim/view/gen_button.php +++ b/src/webim/view/gen_button.php @@ -1,134 +1,127 @@ - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("page.gen_button.title") ?> - - -"> -"> - - - - - - - - - - - - -
- -
-

-
|">
- - - -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- onchange="this.form.submit();"/> -
- onchange="this.form.submit();"/> -
-
-
- - - - + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("page.gen_button.title") ?> + + +"> +"> + + + + + + + + +
+ +
+

+
|">
+ + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ onchange="this.form.submit();"/> +
+ onchange="this.form.submit();"/> +
+
+
+ + + + diff --git a/src/webim/view/login.php b/src/webim/view/login.php index c9da53aa..d221fb17 100644 --- a/src/webim/view/login.php +++ b/src/webim/view/login.php @@ -1,143 +1,124 @@ - - - - - - - - - - - - - - - <?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"); - } ?> - -
- - -
-
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
/>
-
-
-
-
- - -
- - - - + + + + + + + + + + + + <?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 index 945292cd..cb664dde 100644 --- a/src/webim/view/menu.php +++ b/src/webim/view/menu.php @@ -1,88 +1,81 @@ - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("topMenu.admin") ?> - - -"> -"> - - - - - - - - - - - - -
- -
-

-
- - - -
-
- - - - - - - - - - - - - -















- - - - - - - - - - - -
- -Web Messenger/ - -
- - - - + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("topMenu.admin") ?> + + +"> +"> + + + + + + + + +
+ +
+

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















+ + + + + + + + + + + +
+ +Web Messenger/ + +
+ + + + diff --git a/src/webim/view/pending_users.php b/src/webim/view/pending_users.php index e515d5fe..ca1a8c34 100644 --- a/src/webim/view/pending_users.php +++ b/src/webim/view/pending_users.php @@ -1,176 +1,156 @@ - - - - - - - - - - - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("clients.title") ?> - - -"> -"> - - - - - - - - - - - - -
- -
-

-
|">
- - - - - - - -
- -
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-
- - - - - -
-
- - - - -
-
- -
- - - - - - - - -
-
- -
- - - - + + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("clients.title") ?> + + +"> +"> + + + + + + + + +
+ +
+

+
|">
+ + +
+ +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+
+ + + + +
+
+ +
+ + + + + + + + +
+
+ +
+ + + + diff --git a/src/webim/view/properties_en b/src/webim/view/properties_en index 6aede895..5c06e5e9 100644 --- a/src/webim/view/properties_en +++ b/src/webim/view/properties_en @@ -1,152 +1,152 @@ -app.title=Web Instant Messenger -site.url=http://i-services.ru -site.title=i-services.ru -company.title=Internet Services -page.main_layout.meta_keyword=live chat,live help,live support -page.main_layout.meta_description=Live chat, live help, and live support for websites -page_login.title=Login -page_login.login=Login: -page_login.password=Password: -page_login.remember=Remember -page_login.error=Entered login/password is incorrect -agent.not_logged_in=Your session is expired please login again -page_client.pending_users=Your can find awaiting visitors. -chat.window.title.agent=Web Messenger -chat.window.title.user=Web Messenger -chat.window.product_name=Web 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.user.dead=Visitor closed chat window -chat.status.operator.dead=Operator has connection issues, we temporarily moved you to foreground queue. Sorry for keeping you waiting. -chat.status.operator.joined=Operator {0} joined the chat -chat.status.user.changedname=Visitor changed the name {0} to {1} -chat.status.user.reopenedthread=Visitor joined chat again -chat.status.operator.changed=Operator {0} changed operator {1} -chat.default.username=Visitor -chat.error_page.title=Error -chat.error_page.head=Error occurred: -chat.error_page.close=Close... -page.chat.old_browser.title=Please, use newer browser -page.chat.old_browser.close=Close... -page.chat.old_browser.content=Your web browser is not fully supported by Web Messenger. \nPlease, use one of the following web browsers: \n

\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 -thread.chat_log=Chat log -thread.back_to_search=Go to search -thread.intro=The page displays chat -page_analysis.search.title=Chats history -page.analysis.search.head_name=Name -page.analysis.search.head_host=Visitor's address -page.analysis.search.head_operator=Operator -page.analysis.search.head_time=Time in chat -common.asterisk_explanation=* - 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.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 -button.search=Search -tag.pagination.info=Page {0} of {1}, {2}-{3} from {4} -tag.pagination.no_items=Found 0 elements -image.chat.history=/webim/images/en/history.gif -image.chat.message=/webim/images/en/message.gif -image.button.login=/webim/images/en/login.gif -image.button.save=/webim/images/en/save.gif -image.button.search=/webim/images/en/search.gif -chat.came.from=Vistor came from page {0} -content.history=Search the dialogs history -content.logoff=Log out of the system. -form.field.agent_commonname=International name (Latin) -form.field.agent_commonname.description=This name will be seen by your visitors -install.create_db_link=Create tables in MySQL database -install.license=Software license agreement -install.message=We are ready to complete installation by creating tables. -install.title=System setup -installed.login_link=Proceed to login page -installed.message=Tables were created successfully. You can logon as admin with empty password. For security reasons, please
change your password immediately and remove /webim/install folder from your server. -installed.title=Application installed successfully -menu.agents=Agents list -menu.main=Main -menu.operator=You are {0} -no_such_operator=No such operator -page.gen_button.choose_image=Choose image -page.gen_button.choose_locale=Target locale -page.gen_button.include_site_name=Include host name into code -page.gen_button.secure_links=Use secure links (https) -page_agent.create_new=Here you can create new operator -page_agents.agent_commonname=International name -page_analysis.full.text.search=User name or message text search: -page_search.intro=Search for chat history of a specified user or a specified phrase in a message. +app.title=Web Instant Messenger +site.url=http://i-services.ru +site.title=i-services.ru +company.title=Internet Services +page.main_layout.meta_keyword=live chat,live help,live support +page.main_layout.meta_description=Live chat, live help, and live support for websites +page_login.title=Login +page_login.login=Login: +page_login.password=Password: +page_login.remember=Remember +page_login.error=Entered login/password is incorrect +agent.not_logged_in=Your session is expired please login again +page_client.pending_users=Your can find awaiting visitors. +chat.window.title.agent=Web Messenger +chat.window.title.user=Web Messenger +chat.window.product_name=Web 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.user.dead=Visitor closed chat window +chat.status.operator.dead=Operator has connection issues, we temporarily moved you to foreground queue. Sorry for keeping you waiting. +chat.status.operator.joined=Operator {0} joined the chat +chat.status.user.changedname=Visitor changed the name {0} to {1} +chat.status.user.reopenedthread=Visitor joined chat again +chat.status.operator.changed=Operator {0} changed operator {1} +chat.default.username=Visitor +chat.error_page.title=Error +chat.error_page.head=Error occurred: +chat.error_page.close=Close... +page.chat.old_browser.title=Please, use newer browser +page.chat.old_browser.close=Close... +page.chat.old_browser.content=Your web browser is not fully supported by Web Messenger. \nPlease, use one of the following web browsers: \n

\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 +thread.chat_log=Chat log +thread.back_to_search=Go to search +thread.intro=The page displays chat +page_analysis.search.title=Chats history +page.analysis.search.head_name=Name +page.analysis.search.head_host=Visitor's address +page.analysis.search.head_operator=Operator +page.analysis.search.head_time=Time in chat +common.asterisk_explanation=* - 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.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 +button.search=Search +tag.pagination.info=Page {0} of {1}, {2}-{3} from {4} +tag.pagination.no_items=Found 0 elements +image.chat.history=/webim/images/en/history.gif +image.chat.message=/webim/images/en/message.gif +image.button.login=/webim/images/en/login.gif +image.button.save=/webim/images/en/save.gif +image.button.search=/webim/images/en/search.gif +chat.came.from=Vistor came from page {0} +content.history=Search the dialogs history +content.logoff=Log out of the system. +form.field.agent_commonname=International name (Latin) +form.field.agent_commonname.description=This name will be seen by your visitors +install.create_db_link=Create tables in MySQL database +install.license=Software license agreement +install.message=We are ready to complete installation by creating tables. +install.title=System setup +installed.login_link=Proceed to login page +installed.message=Tables were created successfully. You can logon as admin with empty password. For security reasons, please
change your password immediately and remove /webim/install folder from your server. +installed.title=Application installed successfully +menu.agents=Agents list +menu.main=Main +menu.operator=You are {0} +no_such_operator=No such operator +page.gen_button.choose_image=Choose image +page.gen_button.choose_locale=Target locale +page.gen_button.include_site_name=Include host name into code +page.gen_button.secure_links=Use secure links (https) +page_agent.create_new=Here you can create new operator +page_agents.agent_commonname=International name +page_analysis.full.text.search=User name or message text search: +page_search.intro=Search for chat history of a specified user or a specified phrase in a message. diff --git a/src/webim/view/properties_ru b/src/webim/view/properties_ru index cd200fec..43271c1a 100644 --- a/src/webim/view/properties_ru +++ b/src/webim/view/properties_ru @@ -1,152 +1,152 @@ -app.title=Вэб мессенджер -site.url=http://i-services.ru -site.title=i-services.ru -company.title=Internet Services -page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm -page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем -page_login.title=Вход в систему -page_login.login=Логин: -page_login.password=Пароль: -page_login.remember=Запомнить -page_login.error=Введен неправильный логин или пароль -agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова -page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей. -chat.window.title.agent=Вэб Мессенджер -chat.window.title.user=Вэб Мессенджер -chat.window.product_name=Вэб Мессенджер -chat.window.close_title=Закрыть диалог -chat.window.chatting_with=Вы общаетесь с: -chat.window.poweredby=Предоставлено: -chat.window.poweredreftext=i-services.ru -chat.window.send_message=Отправить сообщение -chat.window.send_message_short=Отправить (Ctrl-Enter) -chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте -chat.window.toolbar.refresh=Обновить содержимое диалога -chat.client.name=Ваше имя: -chat.client.changename=Изменить имя -chat.status.operator.left=Оператор {0} покинул диалог -chat.status.user.left=Посетитель {0} покинул диалог -chat.status.user.dead=Посетитель закрыл окно диалога -chat.status.operator.dead=У оператора возникли проблемы со связью, мы временно перевели Вас в приоритетную очередь. Приносим извинения за Ваше ожидание. -chat.status.operator.joined=Оператор {0} включился в разговор -chat.status.user.changedname=Посетитель сменил имя {0} на {1} -chat.status.user.reopenedthread=Посетитель заново вошел в диалог -chat.status.operator.changed=Оператор {0} сменил оператора {1} -chat.default.username=Посетитель -chat.error_page.title=Ошибка -chat.error_page.head=Произошла ошибка: -chat.error_page.close=Закрыть... -page.chat.old_browser.title=Используйте более новый browser -page.chat.old_browser.close=Закрыть... -page.chat.old_browser.content=К сожалению, для работы этой страницы необходим более новый браузер. Для лучшего просмотра используйте:\n

\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=Пометить посетителя как нежелательного -thread.chat_log=Протокол разговора -thread.back_to_search=Перейти в поиск -thread.intro=На данной странице Вы можете просмотреть диалог. -page_analysis.search.title=История диалогов -page.analysis.search.head_name=Имя -page.analysis.search.head_host=Адрес посетителя -page.analysis.search.head_operator=Оператор -page.analysis.search.head_time=Время в диалоге -common.asterisk_explanation=* - поля, обязательные для заполнения -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.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=Сохранить -button.search=Искать -tag.pagination.info=Страница {0} из {1}, показаны {2}-{3} из {4} -tag.pagination.no_items=Ничего не найдено -image.chat.history=/webim/images/ru/history.gif -image.chat.message=/webim/images/ru/message.gif -image.button.login=/webim/images/ru/login.gif -image.button.save=/webim/images/ru/save.gif -image.button.search=/webim/images/ru/search.gif -chat.came.from=Посетитель пришел со страницы {0} -content.history=Поиск по истории диалогов -content.logoff=Покинуть систему. -form.field.agent_commonname=Интернациональное имя (латиницей) -form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран -install.create_db_link=Создать необходимые таблицы в базе данных -install.license=Лицензионное соглашение о программном обеспечении -install.message=Для окончания установки необходимо создать таблицы. -install.title=Установка -installed.login_link=Войти в систему -installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.
В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. -installed.title=Установка завершена -menu.agents=Список агентов -menu.main=Главная -menu.operator=Вы {0} -no_such_operator=Запрашиваемая учетная запись не существует -page.gen_button.choose_image=Выбор картинки -page.gen_button.choose_locale=Для какой локали создавать кнопку -page.gen_button.include_site_name=Включать имя сайта в код -page.gen_button.secure_links=Использовать защищенное соединение (https) -page_agent.create_new=Создание нового оператора -page_agents.agent_commonname=Интернациональное имя -page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: -page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. +app.title=Вэб мессенджер +site.url=http://i-services.ru +site.title=i-services.ru +company.title=Internet Services +page.main_layout.meta_keyword=онлайн поддержка,онлайн консультант,онлайн помощь,улучшение сервиса,поддержка клиентов,центр поддержки,поддержка на сайте,центр сообщений,электронная коммерция,центр мгновенных сообщений,повышение продаж интернет магазина,интернет магазин,онлайн продажи,интернет продажи,посетители,покупатели,повышение коэффициента конверсии,online поддержка,online продажи, online обслуживание,online консультант,online помощь,обслуживание посетителей,обслуживание клиентов,качество обслуживания,бизнес-коммуникации,crm +page.main_layout.meta_description=повышение конвертации, повышение конверсии, увеличение процента покупателей,превращает посетителей в online покупателей,диалог с посетителем,чат с посетителем +page_login.title=Вход в систему +page_login.login=Логин: +page_login.password=Пароль: +page_login.remember=Запомнить +page_login.error=Введен неправильный логин или пароль +agent.not_logged_in=Ваша сессия устарела, войдите, пожалуйста, снова +page_client.pending_users=На этой странице можно просмотреть список ожидающих ответа посетителей. +chat.window.title.agent=Вэб Мессенджер +chat.window.title.user=Вэб Мессенджер +chat.window.product_name=Вэб Мессенджер +chat.window.close_title=Закрыть диалог +chat.window.chatting_with=Вы общаетесь с: +chat.window.poweredby=Предоставлено: +chat.window.poweredreftext=i-services.ru +chat.window.send_message=Отправить сообщение +chat.window.send_message_short=Отправить (Ctrl-Enter) +chat.window.toolbar.mail_history=Отправить историю диалога по электронной почте +chat.window.toolbar.refresh=Обновить содержимое диалога +chat.client.name=Ваше имя: +chat.client.changename=Изменить имя +chat.status.operator.left=Оператор {0} покинул диалог +chat.status.user.left=Посетитель {0} покинул диалог +chat.status.user.dead=Посетитель закрыл окно диалога +chat.status.operator.dead=У оператора возникли проблемы со связью, мы временно перевели Вас в приоритетную очередь. Приносим извинения за Ваше ожидание. +chat.status.operator.joined=Оператор {0} включился в разговор +chat.status.user.changedname=Посетитель сменил имя {0} на {1} +chat.status.user.reopenedthread=Посетитель заново вошел в диалог +chat.status.operator.changed=Оператор {0} сменил оператора {1} +chat.default.username=Посетитель +chat.error_page.title=Ошибка +chat.error_page.head=Произошла ошибка: +chat.error_page.close=Закрыть... +page.chat.old_browser.title=Используйте более новый browser +page.chat.old_browser.close=Закрыть... +page.chat.old_browser.content=К сожалению, для работы этой страницы необходим более новый браузер. Для лучшего просмотра используйте:\n

\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=Пометить посетителя как нежелательного +thread.chat_log=Протокол разговора +thread.back_to_search=Перейти в поиск +thread.intro=На данной странице Вы можете просмотреть диалог. +page_analysis.search.title=История диалогов +page.analysis.search.head_name=Имя +page.analysis.search.head_host=Адрес посетителя +page.analysis.search.head_operator=Оператор +page.analysis.search.head_time=Время в диалоге +common.asterisk_explanation=* - поля, обязательные для заполнения +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.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=Сохранить +button.search=Искать +tag.pagination.info=Страница {0} из {1}, показаны {2}-{3} из {4} +tag.pagination.no_items=Ничего не найдено +image.chat.history=/webim/images/ru/history.gif +image.chat.message=/webim/images/ru/message.gif +image.button.login=/webim/images/ru/login.gif +image.button.save=/webim/images/ru/save.gif +image.button.search=/webim/images/ru/search.gif +chat.came.from=Посетитель пришел со страницы {0} +content.history=Поиск по истории диалогов +content.logoff=Покинуть систему. +form.field.agent_commonname=Интернациональное имя (латиницей) +form.field.agent_commonname.description=Под этим именем Вас увидят ваши посетители из других стран +install.create_db_link=Создать необходимые таблицы в базе данных +install.license=Лицензионное соглашение о программном обеспечении +install.message=Для окончания установки необходимо создать таблицы. +install.title=Установка +installed.login_link=Войти в систему +installed.message=Необходимые таблицы были созданы. Вы можете войти в систему как admin с пустым паролем.
В целях безопасности, удалите, пожалуйста, каталог /webim/install с вашего сервера и поменяйте пароль. +installed.title=Установка завершена +menu.agents=Список агентов +menu.main=Главная +menu.operator=Вы {0} +no_such_operator=Запрашиваемая учетная запись не существует +page.gen_button.choose_image=Выбор картинки +page.gen_button.choose_locale=Для какой локали создавать кнопку +page.gen_button.include_site_name=Включать имя сайта в код +page.gen_button.secure_links=Использовать защищенное соединение (https) +page_agent.create_new=Создание нового оператора +page_agents.agent_commonname=Интернациональное имя +page_analysis.full.text.search=Поиск по имени посетителя или по тексту сообщения: +page_search.intro=На данной странице можно осуществить поиск диалогов по имени пользователя или фразе, встречающейся в сообщении. diff --git a/src/webim/view/thread_log.php b/src/webim/view/thread_log.php index 08e6b1c0..3a5bd124 100644 --- a/src/webim/view/thread_log.php +++ b/src/webim/view/thread_log.php @@ -1,88 +1,76 @@ - - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("thread.chat_log") ?> - - -"> -"> - - - - - - - - - - - - -
- -

- - - - - - - - - - -

- - - - - - - - - -
- -
- - - - - -
- -
- - -
- -
- - - - + + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("thread.chat_log") ?> + + +"> +"> + + + + + + + + +
+ +

+ + + + + +

+ + + + + + + + + +
+ +
+ + + + + +
+ +
+ + +
+ +
+ + + + diff --git a/src/webim/view/thread_search.php b/src/webim/view/thread_search.php index 613386b4..1103c6c7 100644 --- a/src/webim/view/thread_search.php +++ b/src/webim/view/thread_search.php @@ -1,117 +1,111 @@ - - - - - - - - - - - - - - - <?php echo getstring("app.title") ?> - <?php echo getstring("page_analysis.search.title") ?> - - -"> -"> - - - - - - - - - - - - -
- -
-

-
|">
- - - -
-
- - - - -
-
- - - - - - - - -
- -
-
- -
- - - - - - - - - - - - - - - - - -
- - - - - - - , -
-
- - - -

-
- - - -
- - -
- - - - + + + + + + + + + + + + <?php echo getstring("app.title") ?> - <?php echo getstring("page_analysis.search.title") ?> + + +"> +"> + + + + + + + + +
+ +
+

+
|">
+ + + +
+
+ + + + +
+
+ + + + + + + + + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + +
+ + + + + + + , +
+
+ + + +

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