/*$agent_id = 1; $query = "SELECT `id`, `username`, `status` FROM " . $table_prefix . "users WHERE (UNIX_TIMESTAMP(NOW()) - ". "UNIX_TIMESTAMP(`refresh`)) < '$connection_timeout' AND (`status` = '1' OR `status` = '2' OR `status` = '3') and id =" . $agent_id ." ORDER BY `username`"; error_log("agent_id : ".$agent_id."\n", 3, "users.log"); error_log("query: ".$query."\n", 3, "users.log"); */ $agent_id = 1; $rows = $SQL->selectall($query); if (is_array($rows)) { foreach ($rows as $key => $row) { if (is_array($row)) { $login_id = $row['id']; $status = $row['status']; $username = xmlinvalidchars($row['username']); /* // Count the total NEW messages that have been sent to the current login $query = "SELECT count(`id`) FROM " . $table_prefix . "administration WHERE `user` = '$login_id' AND ". "(UNIX_TIMESTAMP(`datetime`) - UNIX_TIMESTAMP('$login_datetime')) > '0'"; $row = $SQL->selectquery($query); if (is_array($row)) { $messages = $row['count(`id`)']; } */ $messages = 0; ?> <User ID='<?php echo $login_id;
echo xmlinvalidchars($current_email); ?> </Email> <Company><?php echo xmlinvalidchars($current_company); ?> </Company> <Phone><?php echo xmlinvalidchars($current_phone); ?> </Phone> <Date><?php echo xmlinvalidchars($current_date); ?> </Date> <Duration><?php echo xmlinvalidchars($current_duration); ?> </Duration> </Transcription> <?php } ?> <?php } } ?> </Transcriptions>
echo xmlinvalidchars($current_email); ?> </Email> <Company><?php echo xmlinvalidchars($current_company); ?> </Company> <Phone><?php echo xmlinvalidchars($current_phone); ?> </Phone> <Date><?php echo xmlinvalidchars($current_date); ?> </Date> <Domain><?php echo xmlinvalidchars($current_domain); ?> </Domain> <Comment><?php echo xmlinvalidchars($current_message); ?> </Comment> </Message> <?php } } ?> </Messages> <?php /*}*/
<?php $query = "SELECT id, username, message FROM " . $table_prefix . "messages WHERE session =" . $transcription_id . " ORDER BY datetime"; ?> <Messages> <?php $rows = $SQL->selectall($query); if (is_array($rows)) { foreach ($rows as $key => $row) { if (is_array($row)) { $current_chat_id = $row['id']; $current_username = $row['username']; $current_message = $row['message']; ?> <Message> <Username><?php echo xmlinvalidchars($current_username); ?> </Username> <Line><![CDATA[<?php echo $current_message; ?> ]]></Line> </Message> <?php } } } ?> </Messages>
echo $current_request_pagetime; ?> </TimeOnPage> <?php } elseif ($responceType == "lite") { ?> <TimeOnPage><?php echo $current_request_pagetime; ?> </TimeOnPage> <TimeOnSite><?php echo $current_request_sitetime; ?> </TimeOnSite> <CurrentPageTitle><?php echo xmlinvalidchars($current_request_current_page_title); ?> </CurrentPageTitle> <?php } ?> </Visitor> <?php } } ?> </SiteVisitors> <?php } } else { ?>
//------------------------------------------------------------------------ //Services // LiveHelp = 1 //----------------------------------------------------------------------- $_SESSION["services"] = 1; //-- $charset = 'utf-8'; header('Content-type: text/xml; charset=' . $charset); echo '<?xml version="1.0" encoding="' . $charset . '"?>' . "\n"; ?> <Login xmlns="urn:LiveHelp" ID="<?php echo $operator_login_id; ?> " Version="<?php echo $web_application_version; ?> " Name="<?php echo xmlinvalidchars($current_first_name . ' ' . $current_last_name); ?> " Access="<?php echo $current_privilege; ?> "> <services xmlns="urn: eserver "> </services> <id_service><?php echo $_SESSION["services"]; ?> </id_service> </Login>