} else { echo "false"; } ?> ; var currentSession = "<?php echo $_GET["currentSession"]; ?> ";<?php require_once "../chat/chatSession.php"; $chat_session = new chatSession(); if ($utype == 0) { $chat_session->useSession($_GET["currentSession"]); echo "\nvar username = \"" . $chat_session->getName() . "\";"; } elseif ($utype == 1) { $chat_session->getUID(); $userResult = mysql_query("SELECT * FROM `tblclients` WHERE `id`='" . $uid . "';"); while ($uRow = mysql_fetch_array($userResult)) { switch ($chat_settings["ClientDisplayName"]) { case "l": $uname = $uRow["lastname"]; break; case "f": $uname = $uRow["firstname"]; break; case "fl": $uname = $uRow["firstname"] . " " . $uRow["lastname"]; break; case "lf": $uname = $uRow["lastname"] . " " . $uRow["firstname"]; break;
if ($row[0] == "SystemSSLURL") { if ($row[1] != "") { $url = $row[1]; } } if ($row[0] == "SystemURL") { if ($url == "") { $url = $row[1]; } } } $url = substr($url, 0, -1); if ($utype == 2) { // Client Info $env = $chat_sess->getEnvironment(); if ($chat_sess->getUID() != 0) { $bufferClientInfo .= "<div class=\"clientSummery\"><img src=\"images/details.gif\" alt=\"Client\" /> <a href=\"" . $url . "/" . $customadminpath . "/clientssummary.php?userid=" . $chat_sess->getUID() . "\" target=\"_blank\">Client Summary Page</a></div><br />"; } $bufferClientInfo .= "<strong>Inputted Data</strong><br />\n\t\t\n\t\t<table class=\"clientInfo\">\n\t\t\t<tr>\n\t\t\t\t<td>Name</td>\n\t\t\t\t<td>" . $chat_sess->getName() . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>Email</td>\n\t\t\t\t<td>" . $chat_sess->getEmail() . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>Question</td>\n\t\t\t\t<td>" . $chat_sess->getQuestion() . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>Session</td>\n\t\t\t\t<td>" . $chat_sess->getSession() . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>Remote IP</td>\n\t\t\t\t<td>" . $env["REMOTE_ADDR"] . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>HTTP User Agent</td>\n\t\t\t\t<td>" . $env["HTTP_USER_AGENT"] . "</td>\n\t\t\t</tr>\n\t\t</table>"; if ($chat_sess->getUID() == 0) { $guessBuffer = ""; $guessBuffer .= "<br /><strong>Intelligent Guess</strong><br /><table class=\"clientInfo\">"; $run = false; $result = mysql_query("SELECT * FROM `tblclients` WHERE `email` LIKE '" . $chat_sess->getEmail() . "' OR `ip`='" . $env["REMOTE_ADDR"] . "'"); while ($row = mysql_fetch_array($result)) { if ($clientSelected[$row["id"]] != "true") { $guessBuffer .= "<tr>\n\t\t\t\t<td>Client: <a href=\"" . $url . "/" . $customadminpath . "/clientssummary.php?userid=" . $row["id"] . "\" target=\"_blank\">" . $row["firstname"] . " " . $row["lastname"] . "</a></td>\n\t\t\t\t</tr>"; $clientSelected[$row["id"]] = "true"; $run = true; } }