state != Thread::STATE_CLOSED) { $msg = getstring2_("chat.client.visited.page", array($referer), $thread->locale); $thread->postMessage(Thread::KIND_FOR_AGENT, $msg); } } $image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "webim"); $lang = verifyparam(isset($_GET['language']) ? "language" : "lang", "/^[\w-]{2,5}$/", ""); if(!$lang || !locale_exists($lang)) { $lang = $current_locale; } $groupid = verifyparam( "group", "/^\d{1,8}$/", ""); if($groupid) { if(Settings::get('enablegroups') == '1') { $group = group_by_id($groupid); if(!$group) { $groupid = ""; } } else { $groupid = ""; } } $image_postfix = has_online_operators($groupid) ? "on" : "off"; $filename = "locales/${lang}/button/${image}_${image_postfix}.gif"; $fp = fopen($filename, 'rb') or die("no image"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Pragma: no-cache"); header("Content-Type: image/gif"); header("Content-Length: ".filesize($filename)); if(function_exists('fpassthru')){ @fpassthru($fp); } else { while( (!feof($fp)) && (connection_status()==0)){ print(fread($fp, 1024*8)); flush(); } fclose($fp); } exit; ?>