/* stardevelop.com Live Help International Copyright stardevelop.com You may not distribute this program in any manner, modified or otherwise, without the express, written consent from stardevelop.com You may make modifications, but only for your own use and within the confines of the License Agreement. All rights reserved. Selling the code for this program without prior written consent is expressly forbidden. Obtain permission before redistributing this program over the Internet or in any other medium. In all cases copyright and header must remain intact. */ if (!isset($_REQUEST['URL'])){ $_REQUEST['URL'] = ''; } if (!isset($_REQUEST['SERVER'])){ $_REQUEST['SERVER'] = ''; } if (!isset($_REQUEST['TITLE'])){ $_REQUEST['TITLE'] = ''; } if (!isset($_REQUEST['DEPARTMENT'])){ $_REQUEST['DEPARTMENT'] = ''; } if (!isset($_REQUEST['ERROR'])){ $_REQUEST['ERROR'] = ''; } $installed = false; $database = include('./include/config_database.php'); if ($database) { include('./include/block_spiders.php'); include('./include/class.mysql.php'); include('./include/version.php'); $installed = include('./include/config.php'); } else { $installed = false; } if ($installed == false) { header('Location: ./offline.php'); exit(); } $error = $_REQUEST['ERROR']; if ($installed == true) { $department = $_REQUEST['DEPARTMENT']; $current_page = $_REQUEST['URL']; $title = urldecode($_REQUEST['TITLE']); // Update the Current URL, URL Title and Referer in the requests table. $current_page = $_REQUEST['URL']; for ($i = 0; $i < 3; $i++) { $substr_pos = strpos($current_page, '/'); if ($substr_pos === false) { $current_page = ''; break; } if ($i < 2) { $current_page = substr($current_page, $substr_pos + 1); } elseif ($i >= 2) { $current_page = substr($current_page, $substr_pos); } } // Get the current host from the request data $current_host = $_REQUEST['URL']; $str_start = 0; for ($i = 0; $i < 3; $i++) { $substr_pos = strpos($current_host, '/'); if ($substr_pos === false) { break; } if ($i < 2) { $current_host = substr($current_host, $substr_pos + 1); $str_start += $substr_pos + 1; } elseif ($i >= 2) { $current_host = substr($_REQUEST['URL'], 0, $substr_pos + $str_start); } } // Update the current URL statistics within the requests tables if ($current_page == '') { $current_page = '/'; } $query = "SELECT `path` FROM " . $table_prefix . "requests WHERE `id` = '$request_id'"; $row = $SQL->selectquery($query); if (is_array($row)) { $current_page = urldecode($current_page); $prev_path = explode('; ', $row['path']); $current_path = $row['path']; end($prev_path); $index = key($prev_path); if ($current_page != $prev_path[$index]) { $query = "UPDATE " . $table_prefix . "requests SET `url` = '$current_page', `title` = '$title', `path` = '$current_path; $current_page' WHERE `id` = '$request_id'"; $SQL->insertquery($query); } } if (!isset($_COOKIE['LiveHelpSession'])) { header('Location: ./cookies.php?SERVER=' . $_REQUEST['SERVER'] . '&LANGUAGE=' . LANGUAGE_TYPE); exit(); } // Checks if any users in user table are online if ($error == '') { $query = "SELECT `id` FROM " . $table_prefix . "users WHERE (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`refresh`)) < '$connection_timeout' AND `status` = '1'"; if ($department != '' && $_SETTINGS['DEPARTMENTS'] == true) { $query .= " AND department LIKE '%$department%'"; } $row = $SQL->selectquery($query); if(!is_array($row)) { header('Location: ./offline.php?SERVER=' . $_REQUEST['SERVER'] . '&LANGUAGE=' . LANGUAGE_TYPE); exit(); } } if ($_SETTINGS['LOGINDETAILS'] == false) { header('Location: ./frames.php?URL=' . $_REQUEST['URL'] . '&SERVER=' . $_REQUEST['SERVER'] . '&LANGUAGE=' . LANGUAGE_TYPE); exit(); } } header('Content-type: te
wmwdhelrvrdlmzqnvzjqelrzigqojst